[Ffmpeg-devel] Re: changes to asf demuxer

Jon Elwood jelwood
Sat Mar 24 18:21:26 CET 2007

>On Mon, 2007-03-19 at 21:09, Jon Elwood wrote:


>>On Mon, 2007-03-19 at 19:04, Uoti Urpala wrote:


>>On Mon, 2007-03-19 at 13:37 -0400, Jon Elwood wrote:

>>> av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den,

>>> get_std_framerate(j), 12*1001, INT_MAX);


>>> So, r_frame_rate.num and r_frame_rate.den must be set somewhere in here.

>>> The problem is I looked in av_reduce and I have no idea what this


>>> does.  What is the purpose of this function (I found it in fational.c,

but I

>>> didn't understand its purpose)?  What's interesting is I have at least


>>That call reduces the fraction get_std_framerate(j) / (12*1001) to

>>lowest terms, replacing it with the closest possible approximation with

>>the terms below INT_MAX if the original int64_t values were bigger

>>(seems unlikely in this case though), and places the resulting numerator

>>and denominator in st->r_frame_rate.num and st->r_frame_rate.den.


>>So basically it writes the fps value get_std_framerate(j)/(12*1001) to

>>the st->r_frame_rate fields.




>Thank you for responding and trying to help.  I feel bad because I just

>upgraded to the latest SVN and someone fixed this problem over the weekend

>(I didn't upgrade to the latest SVN over the weekend as I was tracing

>through the code).




>Thank you to whoever fixed the issue.


Unfortunately, I spoke too soon because this issue isn't completely fixed
(it is much better - it now works on 90% of my samples).  I have another
sample where the real fps is 25, but ffmpeg is detecting it as 8.33 (it is
really 25/1, but it is being detected as 25/3).  I've uploaded it to
upload.mplayerhq.hu/MPlayer/incoming/ Channel 4 News_Channel
4_20_10_2006_19_00_01.dvr-ms.  Below is the output of ffmpeg.  Whoever
looked at this last weekend, can you please look at this sample?  Thank you
for your help.


Below is the output from ffmpeg


C:\Users\jon\Desktop\MPlayer>"ffmpeg" -benchmark -y -threads 2 -i "Channel 4

s_Channel 4_20_10_2006_19_00_01.dvr-ms" -vcodec mpeg4 -s 320x240 -qscale 4

 XVID -an -f avi "Channel 4 News_Channel 4_20_10_2006_19_00_01.avi"

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.

  configuration: --enable-static --enable-memalign-hack --enable-libmp3lame

able-xvid --enable-gpl --enable-libfaad --enable-libfaac --enable-w32threads


  libavutil version: 49.4.0

  libavcodec version: 51.40.0

  libavformat version: 51.11.0

  built on Mar 23 2007 11:00:12, gcc: 3.4.5 (mingw special)


Seems stream 1 codec frame rate differs from container frame rate: 25.00

-> 8.33 (25/3)

Input #0, asf, from 'Channel 4 News_Channel 4_20_10_2006_19_00_01.dvr-ms':

  Duration: 00:03:56.1, start: 0.000000, bitrate: 3141 kb/s

  Stream #0.0: Audio: mp2, 48000 Hz, stereo, 192 kb/s

  Stream #0.1: Video: mpeg2video, yuv420p, 704x576, 10000 kb/s,  8.33 fps(r)

Output #0, avi, to 'Channel 4 News_Channel 4_20_10_2006_19_00_01.avi':

  Stream #0.0: Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s,  8.33

Stream mapping:

  Stream #0.1 -> #0.0

Press [q] to stop encoding

[mpeg2video @ 007FEF10]ac-tex damaged at 25 33=231.6 bitrate= 207.9kbits/s

[mpeg2video @ 007FEF10]Warning MVs not available

[mpeg2video @ 007FEF10]concealing 132 DC, 132 AC, 132 MV errors

frame= 1970 fps=124 q=4.0 Lsize=    6005kB time=236.4 bitrate= 208.1kbits/s

video:5942kB audio:0kB global headers:0kB muxing overhead 1.064704%

bench: utime=15.869s



More information about the ffmpeg-devel mailing list