[vlc-devel] [Patch] Allow DV sources to skip frames

Paul Corke paul.corke at datatote.co.uk
Fri Apr 20 18:49:54 CEST 2007


I have a DV source (a Canopus ADVC300) that occasionally drops
frames (maybe 1 every 10 or 20 seconds) for some reason.

This causes a problem when streaming with VLC.  Because the rawdv
demux just increments it's PTS every time it gets a frame from
the source, it eventually drops behind real time (ie mdate()
increments faster that p_sys->i_pcr).  This results in a lot of:

[00000357] stream_out_transcode private debug: late picture skipped
(41806)
[00000357] stream_out_transcode private debug: late picture skipped
(32943)
[00000357] stream_out_transcode private debug: late picture skipped
(23502)
[00000357] stream_out_transcode private debug: late picture skipped
(15668)
[00000357] stream_out_transcode private debug: late picture skipped
(38214)

which means no more stream (there is no way for p_sys->i_pcr to
ever catch up).

The enclosed patch uses the current mdate() timestamp to calculate
the PTS for each frame.  This means that the DV source can stop
sending frames for a while, and when it starts up again vlc will
carry on streaming the content.  To turn on the new behaviour,
set the "rawdv-realtime" variable.  Example use:

dvgrab - \
| vlc -vvv --intf dummy --no-sub-autodetect-file - \
:demux=rawdv :rawdv-realtime=1 --sout '#something'

This is only useful for live streaming of DV content, and cases
where you don't want the occasional dropped frame to break the
stream.

Regards,

Paul.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rawdv.svn-diff.txt
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070420/acc1a7a0/attachment.txt>


More information about the vlc-devel mailing list