[FFmpeg-devel] [PATCH] ffmpeg: ignore forward gaps for subtitles streams
Michael Niedermayer
michaelni at gmx.at
Sun Aug 21 19:36:11 CEST 2011
On Tue, Aug 16, 2011 at 05:10:32PM +0200, Nicolas George wrote:
> ffmpeg: ignore forward gaps for subtitles streams
>
> In formats that have timestamps discontinuities (like MPEG-PS), ffmpeg (the
> command-line tool) detects gaps of more than 10ms (configurable) between a
> packet's timestamps and the expected timestamp as a discontinuity and adjust
> an offset for future adjustment.
>
> For subtitles streams, forward gaps of several seconds, er even dozens of
> minutes, are perfectly normal, but trigger this countermeasure. Thus:
>
> ./ffmpeg_g -v 10 -analyzeduration 10000000 -probesize 100000000 -copyinkf \
> -i some.vob -ac 2 -scodec dvdsub -f dvd -y /tmp/out.vob
>
> will first print something like that:
>
> timestamp discontinuity 28000000, new offset= -197672677.52
>
> and shortly after fail with:
>
> [dvd @ 0xbdbfa0] Application provided invalid, non monotonically increasing
> dts to muxer in stream 2: 676800 >= 676800
>
> The attached patch fixes that by ignoring positive gaps in subtitles
> streams.
>
> Regards,
>
> --
> Nicolas George
> ffmpeg.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> 5e92dacf3cc845a63e40506ccfb6d314f26ca78b 0001-ffmpeg-ignore-forward-gaps-for-subtitles-streams.patch
> From e22cc00dc2c861440f7bc4bea6a9ba435e6cb0c6 Mon Sep 17 00:00:00 2001
> From: Nicolas George <nicolas.george at normalesup.org>
> Date: Tue, 16 Aug 2011 15:49:17 +0200
> Subject: [PATCH] ffmpeg: ignore forward gaps for subtitles streams.
i dont think this will be the final solution but its an improvment so
LGTM, please commit & thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110821/64bddf65/attachment.asc>
More information about the ffmpeg-devel
mailing list