[vlc-devel] Re: Pre-roll

Steve Lhomme steve.lhomme at free.fr
Fri Feb 18 09:53:22 CET 2005


Steve Lhomme a écrit :
> Steve Lhomme a écrit :
>> I managed to do this in the Matroska demuxer by setting a 
>> p_block->i_pts to -1 for the data (frames) that should be decoded but 
>> not used for rendering. But there are 2 problems :
>>
>> - even though the keyframe and all consecutive frames are supposed to 
>> be decoded, the first frame displayed shows that this isn't the case 
>> (like when you start decoding using a P/B frame).
>>
>> - The pre-roll time (the few seconds mentioned) is used during 
>> rendering. That means no audio or video for a few seconds. This time 
>> should be the shortest possible (in DirectShow it's less than a second).
> 
> 
> Thanx to fen, I managed to remove this problem. Now I only set the PCR 
> of data blocks that should be rendered. The other ones are just sent to 
> the decoder with their actual pts and dts values.
> 
> The problem is that we are back to the previous behaviour. That means 
> the keyframes don't seem to be used by the decoder, although I'm sure 
> they are sent by the demuxer. I think it happens because when 
> "displayable" frame are found we set the output clock, and due to 
> internal mechanisms of VLC "old" frames are discarded, maybe even at the 
> decoder level. Am I right on this ? Is there a way to avoid this ? 
> (existing or to code)

I still haven't managed to get what I want when seeking in Matroska...

What I need is frame (actually timecode) accurate seeking. This is very 
important for the menu feature, because a part of a menu is a part of 
the whole file. And you don't want a part of the previous menu do be 
displayed when starting a menu...

I have a major problem when seeking with reencoded content from the DVD 
(XviD & Vorbis) in MKV. You can get samples on 
http://mukoli.free.fr/matroska/ . When seeking inside the file while 
playing, I can get to the timecode I want and start playing from there. 
At least the displayed timecode in the UI and the progress bar are now 
correct. But there is a strange behaviour. The content is played (audio 
& video) and then all of a sudden it "jumps" to the actual time it 
should be playing and from that time everything is fine...

I assume it's the i_pts that I set to -1 that are decoded and played as 
possible and then when I send the correct i_pts (jump location reached) 
it can sync audio and video again. So the problem here seems to be that 
the data that I want to be decoded (at least for video) but _not_ 
rendered _are_ rendered... I tried to modify decoder.c not to render 
frames that have a negative i_pts but it didn't help...

Any other solution ?

-- 
robUx4 on blog <http://robux4.blogspot.com/>

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list