[gst-devel] video playback fast (record with v4l2src)
Edgard Lima
edgard.lima at indt.org.br
Thu Sep 21 15:21:24 CEST 2006
Thank you Thomas (very clear), (thanks to Ronald and all other guys
involved in this thread)
yes, I understand regarding crystal colck drift...
....my question was related to encoder/muxer/media file format
...now I understand that we need to have equidistant timestamps to
encode in some formats.
I will try to find some time in my todo list to implement 'max-latency'
in 'videorate' ASAP - I Hope it works while we don't have better ways.
(and try to find some time to investigate encoder/muxer/media file
format deeply)
BR,
Edgard
ext Thomas Vander Stichele wrote:
> Hi,
>
>
>
>> I also have a TV tuner here, and v4l2 set the caps correctly 30000/1001
>> for NTSC. (so where is the problem? with drops?)
>>
>
> While the exact number sounds comforting, don't forget that this doesn't
> mean all that much. The card will be aproximately giving you this
> framerate according to *its internal clock* which at the end of the day
> is just a crystal that doesn't know about all its crystal friends out in
> the world. Your sound card has the same thing.
>
> So in a nutshell - if you trust your TV card to give you 30000/1001
> frames per second, and your sound card 44100 samples per second, but
> they do not agree on how long a second is (which you are pretty much
> guaranteed), you *will* go out of sync.
>
> The only way to do this correctly is to timestamp captures from separate
> devices according to a common clock. These can be:
> - "imaginary" clocks: you can timestamp using the system clock (but then
> you need to take into account the deltas between start of capture and
> getting the sample in user space)
> - slaved clocks: you can take either source as a "master clock" and
> trust its view of a second, then timestamp the other devices using
> samples from this master clock (again, you need to take into account
> various deltas)
> - synchronized real clocks: higher-end hardware allows being driven by
> an external clock, like an SMPTE word clock
>
> Hope that explains it,
>
> Thomas
>
>
More information about the gstreamer-devel
mailing list