[FFmpeg-devel] [bug/patch] MPEG-TS muxer: PCR not in sync withPTS/DTS
belcampo
belcampo
Fri Oct 16 16:56:36 CEST 2009
Alexandre Ferrieux wrote:
> (resending, not sure the intended dest got it ;-)
>
> Hi Niobos,
>
>> Niobos wrote:
>>>
>>> I reviewed this patch since I needed some additional features:
>>> * Bugfix: In VBR mode, the SI-table period was calculated on the
>>> muxrate after it had been multiplied by 10. The resulting rates were
>>> 10x to slow.
>>> * Extra feature: Specifying a negative muxrate on the commandline
>>> overwrites the calculated muxrate, but still activates VBR.
>>> * I added an additional patch which includes some additional
>>> info/clarification and does not cause any changes in the compiled code.
>>>
>>> This extra feature is needed to produce a VBR MPEG-TS by
>>> remultiplexing a source ("-{a,v}codec copy"), since the bitrates
>>> can't be learned from the stearm.
>>>
>>> Attached patches are against r20080.
>
>
> As usual I tested your update. Indeed the fix of the SI table frequency
> has a nice effect on hardware decoders :-)
>
> Now I observed a regression wrt your previous patches: when muxing an
> audio-only TS, the PCR is wrong by a large factor (between 4 and 6 times
> too slow). When muxing video only or both, it is correct.
>
> -Alex
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
Not to interfere, maybe off-topic, not intended anyway, I think it's
relevant.
After applying the patch, ffmpeg-mpegts-vbr-4.diff, doing
ffmpeg -i 86240frames-h264.ts -an -vcodec copy -f rawvideo
86240frames.h264 produces the raw frames where last line is:
frame=172480 fps=2285 q=-1.0 Lsize= 3996695kB time=3449.58
bitrate=9491.3kbits/s
Notice frame vs. field problem.
ffmpeg -i 86240frames.h264 -an -vcodec copy -f mpegts new.ts
now produces
frame=172480 fps=1393 q=-1.0 Lsize= 7371403kB time=3449.62
bitrate=17505.3kbits/s
Notice size/bitrate increase
FFmpeg version SVN-r20199, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 16 2009 16:18:11 with gcc 4.2.2 20070909 (prerelease)
(4.2.2-0.RC.1mdv2008.0)
configuration: --prefix=/usr --enable-libx264 --enable-libxvid
--enable-gpl --enable-libfaac --enable-libmp3lame --enable-pthreads
--disable-ffserver --enable-libfaad --disable-ffplay --as=yasm
--enable-nonfree
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.36. 0 / 52.36. 0
libavformat 52.39. 0 / 52.39. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
More information about the ffmpeg-devel
mailing list