[Ffmpeg-devel] Re: changes to asf demuxer

Jonathon Elwood jelwood
Sat Feb 24 06:02:26 CET 2007


>On Fri, Feb 23, 2007, Michael Niedermayer wrote:

> 

>Hi

>>On Fri, Feb 23, 2007 at 05:17:08PM -0500, Jonathon Elwood wrote:

>> I have been trying to improve the dvr-ms (asf demuxer) support in ffmpeg.

>> However, it seems that a week ago someone made some changes to the asf 

>> demuxer that caused a few problems.

>> 

>>  

>> 

>> First, the fps isn't being detected correctly on the MPEG-2 video 

>> stream (on some it works, but others it detects the MPEG-2 stream at 

>> 0.08 fps).  It should have been 29.97, but as you can see below it was 

>> detected as 0.08 fps.  Also, there is a big problem with the AV sync.  

>> The audio starts playing right away, but the video stays on the first 

>> frame for roughly 1 second.  Of course, this means that the audio is 

>> roughly 1 second ahead of the video.  I've been trying to fix the 

>> problems, but I'm not having any luck (so please ignore my debug 

>> statements below).  Does anyone know who worked on this and do they 

>> have any idea what is wrong now?  I've uploaded this sample file to 

>> ftp://upload.mplayerhq.hu/MPlayer/incoming/Survivor-

>> <ftp://upload.mplayerhq.hu/MPlayer/incoming/Survivor-

>> Fiji_KPIX-DT_08_02_2007_19_58_07.001.dvr-ms>

>> Fiji_KPIX-DT_08_02_2007_19_58_07.001.dvr-ms if anyone would like to 

>> look at it.

>[...]

>>   libavutil version: 49.2.0

>> 

>>   libavcodec version: 51.29.0

>> 

>>   libavformat version: 51.8.0

> 

>this is not latest svn, so the report will be ignored unless you confirm
that this problem is also occurring with latest svn

 

Sorry, I should have updated to the latest SVN.  However, the problems still
exist in the latest SVN.

 

Below is a sample of a show that has MP2 audio and is straight SVN (I didn't
modify it at all).

 

C:\Users\jon\Desktop\mplayer>"ffmpeg" -benchmark -y -i "Miss
Congeniality_TBSP_1

7_02_2007_18_24_10.dvr-ms" -vcodec xvid -s 320x240 -qscale 4 -acodec mp3 -ac
2 -

ar 44100 -ab 128 -f avi "Miss Congeniality_TBSP_17_02_2007_18_24_10.avi"

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

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

able-xvid --enable-gpl --enable-libfaad --enable-libfaac --enable-x264
--enable-

w32threads --enable-liba52

  libavutil version: 49.3.0

  libavcodec version: 51.34.0

  libavformat version: 51.10.0

  built on Feb 23 2007 23:44:29, gcc: 3.4.5 (mingw special)

 

Seems stream 2 codec frame rate differs from container frame rate: 29.97
(30000/

1001) -> 0.08 (1/12)

Input #0, asf, from 'Miss Congeniality_TBSP_17_02_2007_18_24_10.dvr-ms':

  Duration: 00:00:58.6, start: 0.000000, bitrate: 8505 kb/s

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

  Stream #0.1: Invalid Codec type -1

  Stream #0.2: Video: mpeg2video, yuv420p, 720x480, 9000 kb/s,  0.08 fps(r)

Output #0, avi, to 'Miss Congeniality_TBSP_17_02_2007_18_24_10.avi':

  Stream #0.0: Video: xvid, yuv420p, 320x240, q=2-31, 200 kb/s,  0.08 fps(c)

  Stream #0.1: Audio: mp3, 44100 Hz, stereo, 128 kb/s

Stream mapping:

  Stream #0.2 -> #0.0

  Stream #0.0 -> #0.1

Press [q] to stop encoding

[mpeg2video @ 0085EED0]ac-tex damaged at 16 29trate= 135.5kbits/s

[mpeg2video @ 0085EED0]Warning MVs not available

[mpeg2video @ 0085EED0]concealing 45 DC, 45 AC, 45 MV errors

frame=    6 q=4.0 Lsize=    1008kB time=58.6 bitrate= 140.9kbits/s

video:30kB audio:916kB global headers:0kB muxing overhead 6.609269%

bench: utime=9.520s

 

 

Then below is a sample where I made a slight modification to asf.c to enable
AC3 audio.

 

C:\Users\jon\Desktop\mplayer>"ffmpeg" -benchmark -y -i "Survivor-
Fiji_KPIX-DT_0

8_02_2007_19_58_07.001.dvr-ms" -vcodec xvid -s 320x240 -qscale 4 -acodec mp3
-ac

 2 -ar 44100 -ab 128 -f avi "Survivor-
Fiji_KPIX-DT_08_02_2007_19_58_07.001.avi"

 

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

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

able-xvid --enable-gpl --enable-libfaad --enable-libfaac --enable-x264
--enable-

w32threads --enable-liba52

  libavutil version: 49.3.0

  libavcodec version: 51.34.0

  libavformat version: 51.10.0

  built on Feb 23 2007 23:44:29, gcc: 3.4.5 (mingw special)

 

Seems stream 2 codec frame rate differs from container frame rate: 29.97
(30000/

1001) -> 0.08 (1/12)

Input #0, asf, from 'Survivor- Fiji_KPIX-DT_08_02_2007_19_58_07.001.dvr-ms':

  Duration: 00:49:43.1, start: 0.000000, bitrate: 140 kb/s

  Stream #0.0: Invalid Codec type -1

  Stream #0.1: Audio: ac3, 48000 Hz, stereo, 384 kb/s

  Stream #0.2: Video: mpeg2video, yuv420p, 1920x1080, 18800 kb/s,  0.08
fps(r)

Output #0, avi, to 'Survivor- Fiji_KPIX-DT_08_02_2007_19_58_07.001.avi':

  Stream #0.0: Video: xvid, yuv420p, 320x240, q=2-31, 200 kb/s,  0.08 fps(c)

  Stream #0.1: Audio: mp3, 44100 Hz, stereo, 128 kb/s

Stream mapping:

  Stream #0.2 -> #0.0

  Stream #0.1 -> #0.1

No accelerated IMDCT transform found

Press [q] to stop encoding

frame=    4 q=4.0 Lsize=     408kB time=23.2 bitrate= 144.2kbits/s

video:15kB audio:362kB global headers:0kB muxing overhead 8.111550%

bench: utime=9.015s

 

 

I also tested the latest SVN with shows where it does detect the fps
correctly and I still see the problem where the video is "stuck" at the
first frame for roughly a second.

 

Any guidance would be greatly appreciated.  I haven't been able to figure
out how to fix this.

 





More information about the ffmpeg-devel mailing list