Opened 12 years ago

Last modified 12 years ago

#978 new defect

wrong container fps when muxing raw Xvid to avi

Reported by: Selur Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: m4v avi fps
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I got a small m4v file (Xvid; http://www.multiupload.com/S9CJO31ED4]small.m4v) and I want to mux into an .avi container.

ffmpeg reports it as:
Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 1200k tbn, 25 tbc

Problem is when I remux it with:
ffmpeg -y -i "D:\Encoding Output\small.m4v" -vtag xvid -vcodec copy -map 0:0 -f avi "D:\Encoding Output\small.avi"

ffmpeg reports:
Input #0, m4v, from 'D:\Encoding Output\small.m4v':

Duration: N/A, bitrate: N/A

Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 1200k tbn, 25 tbc

Output #0, avi, to 'D:\Encoding Output\small.avi':

Metadata:

ISFT : Lavf53.29.100
Stream #0:0: Video: mpeg4 (xvid / 0x64697678), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 25 fps, 50 tbn, 50 tbc

Stream mapping:

Stream #0:0 -> #0:0 (copy)

Press [q] to stop, ? for help
frame= 664 fps= 0 q=-1.0 Lsize= 2195kB time=00:00:26.54 bitrate= 677.5kbits/s
video:2158kB audio:0kB global headers:0kB muxing overhead 1.718484%

and the resulting container fps flag is set to 50fps, not 25 fps;
even when I use:
ffmpeg -y -r 25 -i "D:\Encoding Output\small.m4v" -vtag xvid -vcodec copy -map 0:0 -r 25 -f avi "D:\Encoding Output\small.avi"

I still end up with 50fps in the container,... :/

Change History (7)

comment:1 by Carl Eugen Hoyos, 12 years ago

The sample is 404, and please also provide the complete, uncut console output of ffmpeg -i small.avi

comment:2 by Selur, 12 years ago

I uploaded a new sample: 1. used:
ffmpeg -y -i "D:\Encoding Output\test.avi" -vcodec copy -an -f rawvideo "D:\Encoding Output\small.m4v"
to extract the raw video stream
ffmpeg -i "d:\Encoding Output\small.m4v"
gives:


ffmpeg version N-37208-g01fcbdf Copyright (c) 2000-2012 the FFmpeg developers

built on Jan 27 2012 18:39:49 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 34.101 / 51. 34.101
libavcodec 53. 60.100 / 53. 60.100
libavformat 53. 31.100 / 53. 31.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100

[m4v @ 0000000001D9F290] max_analyze_duration 5000000 reached at 5000000
[m4v @ 0000000001D9F290] Estimating duration from bitrate, this may be inaccurate
Input #0, m4v, from 'd:\Encoding Output\small.m4v':

Duration: N/A, bitrate: N/A

Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 640x352 [SAR 1:1 DAR 20:11], 25 fps, 25 tbr, 1200k tbn, 25 tbc


for this.

calling:
ffmpeg -y -i "D:\Encoding Output\small.m4v" -vtag xvid -vcodec copy -map 0:0 -f avi "D:\Encoding Output\small.avi"
gives:


ffmpeg -y -i "D:\Encoding Output\small.m4v" -vtag xvid -vcodec copy -map 0:0 -f avi "D:\Encoding Output\small.avi"
ffmpeg version N-37208-g01fcbdf Copyright (c) 2000-2012 the FFmpeg developers

built on Jan 27 2012 18:39:49 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 34.101 / 51. 34.101
libavcodec 53. 60.100 / 53. 60.100
libavformat 53. 31.100 / 53. 31.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100

[m4v @ 000000000200F760] max_analyze_duration 5000000 reached at 5000000
[m4v @ 000000000200F760] Estimating duration from bitrate, this may be inaccurate
Input #0, m4v, from 'D:\Encoding Output\small.m4v':

Duration: N/A, bitrate: N/A

Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 640x352 [SAR 1:1 DAR 20:11], 25 fps, 25 tbr, 1200k tbn, 25 tbc

Output #0, avi, to 'D:\Encoding Output\small.avi':

Metadata:

ISFT : Lavf53.31.100
Stream #0:0: Video: mpeg4 (xvid / 0x64697678), yuv420p, 640x352 [SAR 1:1 DAR 20:11], q=2-31, 25 fps, 50 tbn, 50 tbc

Stream mapping:

Stream #0:0 -> #0:0 (copy)

Press [q] to stop, ? for help
frame= 429 fps= 0 q=-1.0 Lsize= 1539kB time=00:00:17.14 bitrate= 735.4kbits/s
video:1513kB audio:0kB global headers:0kB muxing overhead 1.716616%


here's
ffmpeg -i "d:\Encoding Output\small.avi"


ffmpeg version N-37208-g01fcbdf Copyright (c) 2000-2012 the FFmpeg developers

built on Jan 27 2012 18:39:49 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 34.101 / 51. 34.101
libavcodec 53. 60.100 / 53. 60.100
libavformat 53. 31.100 / 53. 31.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100

Input #0, avi, from 'd:\Encoding Output\small.avi':

Metadata:

encoder : Lavf53.31.100

Duration: 00:00:17.14, start: 0.000000, bitrate: 735 kb/s

Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (xvid / 0x64697678), yuv420p, 640x352 [SAR 1:1 DAR 20:11], 25 tbr, 50 tbn, 25 tbc


-> tbn should be 25

uploaded all files (test.avi, small.m4v, small.avi) to: http://www.selur.info/test.7z

comment:3 by Selur, 12 years ago

I accidentally delete the files, if someone is interested I can recreate and upload them again.

comment:4 by Selur, 12 years ago

using ffmpeg version N-38148-gb6ff81d
I created the files again and uploaded them to: http://www.selur.info/test/test.7z

comment:5 by Selur, 12 years ago

for those struggling with this like me:
cvlc can be used to properly multiplex raw MPEG-4 ASP:

cvlc small.m4v --sout="#std{access=file,mux=avi,dst='test.avi'}" vlc://quit

comment:6 by Michael Niedermayer, 12 years ago

explicitly specifying -r 25 works now

comment:7 by Selur, 12 years ago

Nice! Thanks for fixing!

Note: See TracTickets for help on using tickets.