[FFmpeg-cvslog] r13969 - trunk/libavformat/utils.c

Michael Niedermayer michaelni
Tue Jul 8 17:17:01 CEST 2008


On Sat, Jun 28, 2008 at 06:37:55PM -0700, Baptiste Coudurier wrote:
> Hi,
> 
> Robert Swain wrote:
> > 2008/6/28 Michael Niedermayer <michaelni at gmx.at>:
> >> On Fri, Jun 27, 2008 at 11:57:56AM -0700, Baptiste Coudurier wrote:
> >>> Hi Michael,
> >>>
> >>> michael wrote:
> >>>> Author: michael
> >>>> Date: Wed Jun 25 20:15:04 2008
> >>>> New Revision: 13969
> >>>>
> >>>> Log:
> >>>> We cannot calculate the duration of vorbis packets even if we do know the
> >>>> "minimal" frame_size.
> >>> I dunno why yet, but this broke our ogg with vorbis, ffplay play them
> >>> very slowly, vlc stop playing them.
> >>>
> >>> ffmpeg -i <file> -vcodec vorbis test.ogg
> >> Please provide the sample, the ogg vorbis i tried works fine here.
> > 
> > Someone in #ffmpeg was complaining that when using vorbis + theora in
> > ogg, before this commit it worked in various players (VLC included, I
> > don't remember the others though he said the behaviour was consistent
> > across them) but after this commit the players wouldn't play any
> > video, only audio. I'll try to get a sample command line which allows
> > the issue to be reproduced.
> > 
> 
> It works fine with ffplay, yes. Vlc does not play the file however.
> 
> I generated ogg file using:
> ffmpeg -i source_nots.mp2 -acodec vorbis nots.ogg
> 
> Both mp2 and ogg files are on mplayerhq/incoming
> 
> [ogg @ 0x859faf4]av_read_packet stream=0, pts=0,
> dts=-9223372036854775808, size=112,  flags=0
> [ogg @ 0x859faf4]av_read_frame_internal stream=0, pts=0, dts=0,
> size=112, flags=1
> Input #0, ogg, from 'nots.ogg':
>   Duration: N/A, start: 0.000000, bitrate: N/A
>     Stream #0.0, 1/48000: Audio: vorbis, 48000 Hz, stereo
> Output #0, null, to '/dev/null':
>     Stream #0.0, 1/90000: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
> Stream mapping:
>   Stream #0.0 -> #0.0
> Press [q] to stop encoding
> [ogg @ 0x859faf4]av_read_packet stream=0, pts=0,
> dts=-9223372036854775808, size=108,  flags=0
> [ogg @ 0x859faf4]av_read_frame_internal stream=0, pts=0, dts=0,
> size=108, flags=1
> [ogg @ 0x859faf4]av_read_packet stream=0, pts=0,
> dts=-9223372036854775808, size=171,  flags=0
> [ogg @ 0x859faf4]av_read_frame_internal stream=0, pts=0, dts=0,
> size=171, flags=1
> [ogg @ 0x859faf4]av_read_packet stream=0, pts=0,
> dts=-9223372036854775808, size=153,  flags=0
> [ogg @ 0x859faf4]av_read_frame_internal stream=0, pts=0, dts=0,
> size=153, flags=1
> [ogg @ 0x859faf4]av_read_packet stream=0, pts=0,
> dts=-9223372036854775808, size=191,  flags=0
> [ogg @ 0x859faf4]av_read_frame_internal stream=0, pts=0, dts=0,
> size=191, flags=1
> 
> Seems all packet have dts 0.

yes, i can confirm that
It seems our vorbis encoder does not set coded_frame->pts while
our libvorbis wraper does.
Previously the missing timestamps were filled in by assuming constant bitrate
or constant framesize, this was incorrect as neither assumtation is correct
for vorbis.

Fix is to set coded_frame->pts in vorbis_enc.c
ffmpeg.c cannot know the timestamps accurately if the encoder doesnt
set them.

[...]
-- 
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: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080708/c2f6bf5b/attachment.pgp>



More information about the ffmpeg-cvslog mailing list