[Ffmpeg-devel] [BUG] no video transcoding

Michael Niedermayer michaelni
Sun Apr 15 15:26:22 CEST 2007


Hi

On Sun, Apr 15, 2007 at 08:13:37AM -0000, Wolfram Gloger wrote:
> Hi,
> 
> > On Sat, Apr 14, 2007 at 03:29:52PM +0200, Baptiste Coudurier wrote:
> > > Hi
> > >=20
> > > ffmpeg -v 3 -i no_video_transcoding.m2t test.mov
> > >=20
> > >=20
> > > FFmpeg version SVN-r8731, Copyright (c) 2000-2007 Fabrice Bellard, et al.
> > >   configuration: --cc=3Dgcc-4.2 --enable-libfaad --enable-libfaac
> > > --enable-gpl --enable-pthreads --enable-libmp3lame --enable-liba52
> > > --enable-x264 --enable-pp --disable-vhook
> > >   libavutil version: 49.4.0
> > >   libavcodec version: 51.40.3
> > >   libavformat version: 51.12.1
> > >   built on Apr 14 2007 15:14:53, gcc: 4.2.0 20070105 (prerelease)
> > > (Debian 4.2-20070105-1)
> > > Input #0, mpegts, from 'no_video_transcoding.m2t':
> > >   Duration: 00:00:05.8, start: 3494.827200, bitrate: 16775 kb/s
> > >   Stream #0.0[0x31], 1/90000: Video: mpeg2video, yuv420p, 1920x1080,
> > > 1001/30000, 18000 kb/s, 29.97 fps(r)
> > >   Stream #0.1[0x34](eng), 1/90000: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
> > > File 'test.mov' already exists. Overwrite ? [y/N] y
> > > Output #0, mov, to 'test.mov':
> > >   Stream #0.0, 1/90000: Video: mpeg4, yuv420p, 1920x1080, 1001/30000,
> > > q=3D2-31, 200 kb/s, 29.97 fps(c)
> > >   Stream #0.1, 1/90000: Audio: aac, 48000 Hz, 5:1, 64 kb/s
> > > Stream mapping:
> > >   Stream #0.0 -> #0.0
> > >   Stream #0.1 -> #0.1
> > > No accelerated IMDCT transform found
> > > Press [q] to stop encoding
> > > timestamp discontinuity 3495197367, new offset=3D -6990024567
> > > timestamp discontinuity 9223372033359578441, new offset=3D 92233720333599=
> > 48608
> > > timestamp discontinuity 3494859200, new offset=3D 9223372029865089408
> > > timestamp discontinuity -9223372036854404274, new offset=3D -6990057934
> > > timestamp discontinuity 9223372036854404274, new offset=3D 92233720298650=
> > 89408
> > 
> > this is caused by the 8464->8465 change in libavformat/utils.c
> > ---------
> > av_estimate_timings_from_pts() flushes the packet queue but doesn't
> > reset the streams' cur_dts values.  This can lead to a fatal "error,
> > non monotone timestamps ..." message later, because the out-of-date
> > cur_dts values are used to compute some packet's dts.
> > 
> > Fix this by calling av_read_frame_flush() and eliminate code
> > duplication in the process.
> > 
> > The additional hunk gives more detailed error messages.
> > 
> > patch by Wolfram Gloger, wmglo dent.med.uni-muenchen de
> > ---------
> > 
> > ill leave this to wolfram to debug as it is his patch which seems to
> > cause it ...
> 
> Ok that's probably true -- although I maintain the patch is correct,
> and the problem is just as well "caused" by your own change to
> libavformat/utils.c:
> 
> ========================================================================
> r8452 | michael | 2007-03-20 14:01:39 +0100 (Tue, 20 Mar 2007) | 2 lines
> 
> i think this is more correct
> ========================================================================
> 
> With both patches (i.e. in current svn) we lose all the cur_dts values
> after av_find_stream_info(), so if the first packets don't contain
> timestamps, we are in trouble generating any.
> 
> Baptiste, does the appended patch fix your case?
> It just remebers the first valid dts encountered
> and restores them after av_find_stream_info().
> (I have posted it before but only now regression-tested it..)

it doesnt look correct
1. the cur_dts should be set to the first known dts - the previous pkt 
   durations (this can be tricky with I/P/B)
2. why does it fail at all, it shouldnt, even if the first few timestamps
   are missing or wrong should ffmpeg.c not get stuck

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070415/90495738/attachment.pgp>



More information about the ffmpeg-devel mailing list