[FFmpeg-devel] [PATCH v2 2/8] ffmpeg: do packet ts rescaling in write_packet()
Michael Niedermayer
michael at niedermayer.cc
Tue Feb 21 23:47:36 EET 2017
On Wed, Feb 15, 2017 at 10:24:17AM +0100, wm4 wrote:
> From: Anton Khirnov <anton at khirnov.net>
>
> This will be useful in the following commit, after which the muxer
> timebase is not always available when encoding.
>
> This merges Libav commit 3e265ca. It was previously skipped.
>
> There is a minor change with setting the mux_timebase field only after
> the muxer's write_header function has been called, because it can
> readjust the timebase.
>
> Includes a minor merge fix by Mark Thompson, and
>
> avconv: Move rescale to stream timebase before monotonisation
>
> also by Mark Thompson <sw at jkqxz.net>.
>
> Signed-off-by: wm4 <nfxjfg at googlemail.com>
> ---
> ffmpeg.c | 39 ++++++++++++++++++++++-----------------
> ffmpeg.h | 2 ++
> 2 files changed, 24 insertions(+), 17 deletions(-)
Tests run against master with
cb6f1be864c64cfa1d48a5d3eadbecbc771402e7
9148290d71648b0c4295485e59f6541892041a6b
(taken from your git)
This causes a difference in:
./ffmpeg -i ~/tickets/1242/sample.mkv -vcodec copy -copyts -acodec copy -sn test.ts
Ive looked at the difference and it seems the first timestamp differs
0, -3780, 0, 0, 3056, 0x00f4902c, S=1, 1, 0x00e000e0
vs.
0, -3754, 0, 0, 3056, 0x00f4902c, S=1, 1, 0x00e000e0
3754 is closer to 90000/24000/1001
3780 is closer to the first timestamp from the source file
i dont really know what is better
with
./ffmpeg -i ~/tickets/2143/input.mpg -vcodec copy -acodec copy -ss 7 -t 7 test.mpg
this causes larger timestamp differences and a shower of warnings like
Non-monotonous DTS in output stream 0:0; previous: 483483, current: 483483; changing to 483484. This may result in incorrect timestamps in the output file.
previously no such warnings where generated
with
./ffmpeg -i ~/tickets/2424/aspect_bug.mkv -vcodec copy -acodec copy -t 1 test.mp4
Again the first timestamps change and here also the printed fps value
changes from 24 to 24.01
theres also a differene with Starship_Troopers.vob which i belive i reported
previously
and this also has different timestamps:
./ffmpeg -i ~/tickets/3547/sat_uplink_signalloss.ts -vcodec copy -acodec copy test.asf
interrestingly this is specific to asf output, other formats seem not
to show this
Thats all i could find for the 2 commits with some light analysis.
I Hope it helps
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170221/67ad2d3e/attachment.sig>
More information about the ffmpeg-devel
mailing list