Hello. I'm attempting to work with the WMV encoder and things aren't going so well. I'm not quite sure if there are certain settings to be set that would make the video "correct". Anything I've tried comes out with the video being really lagged (in Windows Media Player and DivX player at least). A few seconds will play, then the video will freeze while the audio continues. Here is the command line that I'm using: ffmpeg -i INPUT.avi -f asf -vcodec wmv1 -acodec mp3 -b 1600 -ab 128 -ar 44100 OUTPUT.wmv Anyone with experience that can lend some help would be appreciated. Thanks! -- Brian Brice
Borat wrote:
Hi,
Brian Brice wrote:
Here is the command line that I'm using:
ffmpeg -i INPUT.avi -f asf -vcodec wmv1 -acodec mp3 -b 1600 -ab 128 -ar 44100 OUTPUT.wmv
What does 'ffmpeg -version' say?
It's about a month old, but there haven't been any relevant changes to the WMV encoder or ASF output format. :-( pollux:~> $CLI/ffmpeg -version FFmpeg version SVN-r6197, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-mingw32 --disable-static --enable-shared --enable-memalign-hack --disable-debug --enable-mp3lame --enable-faac --disable-demuxer=gxf --extra-cflags=-I/home/bbrice/lame-3.96.1-bin/include -I/home/bbrice/faac-1.25-bin/include --extra-ldflags=-L/home/bbrice/lame-3.96.1-bin/lib -L/home/bbrice/faa c-1.25-bin/lib --prefix=/home/bbrice/ffmpeg-20060908-bin --incdir=/home/bbrice/ffmpeg-20060908-bin/include libavutil version: 49.0.0 libavcodec version: 51.13.0 libavformat version: 50.5.0 built on Sep 8 2006 11:47:26, gcc: 3.4.2 (mingw-special) ffmpeg SVN-r6197 libavutil 3211264 libavcodec 3345664 libavformat 3278080 -- Brian Brice
Brian Brice wrote: pollux:~>> $CLI/ffmpeg -version
FFmpeg version SVN-r6197, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-mingw32 --disable-static --enable-shared --enable-memalign-hack --disable-debug --enable-mp3lame --enable-faac --disable-demuxer=gxf --extra-cflags=-I/home/bbrice/lame-3.96.1-bin/include -I/home/bbrice/faac-1.25-bin/include --extra-ldflags=-L/home/bbrice/lame-3.96.1-bin/lib -L/home/bbrice/faa c-1.25-bin/lib --prefix=/home/bbrice/ffmpeg-20060908-bin --incdir=/home/bbrice/ffmpeg-20060908-bin/include libavutil version: 49.0.0 libavcodec version: 51.13.0 libavformat version: 50.5.0 built on Sep 8 2006 11:47:26, gcc: 3.4.2 (mingw-special) ffmpeg SVN-r6197 libavutil 3211264 libavcodec 3345664 libavformat 3278080
OK, useful information about both the input file (INPUT.avi) and output file (OUTPUT.wmv) would be the output of ffmpeg -vcodec copy -acodec copy -fs -1 -i INPUT.avi -f null /dev/null 2>&1 | sed -n "/^Input /,/^Stream /p" | sed "$d" ffmpeg -vcodec copy -acodec copy -fs -1 -i OUTPUT.wmv -f null /dev/null 2>&1 | sed -n "/^Input /,/^Stream /p" | sed "$d" -- regards, B.
Borat wrote:
Brian Brice wrote:
pollux:~>> $CLI/ffmpeg -version
FFmpeg version SVN-r6197, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-mingw32 --disable-static --enable-shared --enable-memalign-hack --disable-debug --enable-mp3lame --enable-faac --disable-demuxer=gxf --extra-cflags=-I/home/bbrice/lame-3.96.1-bin/include -I/home/bbrice/faac-1.25-bin/include --extra-ldflags=-L/home/bbrice/lame-3.96.1-bin/lib -L/home/bbrice/faa c-1.25-bin/lib --prefix=/home/bbrice/ffmpeg-20060908-bin --incdir=/home/bbrice/ffmpeg-20060908-bin/include libavutil version: 49.0.0 libavcodec version: 51.13.0 libavformat version: 50.5.0 built on Sep 8 2006 11:47:26, gcc: 3.4.2 (mingw-special) ffmpeg SVN-r6197 libavutil 3211264 libavcodec 3345664 libavformat 3278080
OK, useful information about both the input file (INPUT.avi) and output file (OUTPUT.wmv) would be the output of
ffmpeg -vcodec copy -acodec copy -fs -1 -i INPUT.avi -f null /dev/null 2>&1 | sed -n "/^Input /,/^Stream /p" | sed "$d" ffmpeg -vcodec copy -acodec copy -fs -1 -i OUTPUT.wmv -f null /dev/null 2>&1 | sed -n "/^Input /,/^Stream /p" | sed "$d"
It does happen with any kind of input. Here is info on the input file: Input #0, avi, from 'INPUT.avi': Duration: 00:03:50.8, start: 0.000000, bitrate: 657 kb/s Stream #0.0: Video: mpeg4, yuv420p, 352x240, 29.98 fps(r) Stream #0.1: Audio: mp3, 32000 Hz, stereo, 96 kb/s Output #0, null, to '/dev/null': Stream #0.0: Video: mpeg4, yuv420p, 352x240, q=2-31, 29.98 fps(c) Stream #0.1: Audio: mp3, 32000 Hz, stereo, 96 kb/s Here is info on the output file produced by my initial command: Input #0, asf, from 'OUTPUT.wmv': Duration: 00:00:28.5, start: 2.000000, bitrate: 1231 kb/s Stream #0.0: Video: wmv1, yuv420p, 352x240, 29.97 fps(r) Stream #0.1: Audio: mp3, 44100 Hz, stereo, 128 kb/s Output #0, null, to '/dev/null': Stream #0.0: Video: wmv1, yuv420p, 352x240, q=2-31, 1000.00 fps(c) Stream #0.1: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: -- Brian Brice
The problem seems to be with all input formats. Also, the problem is limited to the asf/wmv wrapper (asf-enc.c), not the codec itself - WMV2 conversions to the .avi container work flawlessly. "-vcodec copy" into a .asf/wmv wrapper will then demonstrate the problem on playback. Windows Media Player for Windows and Flip4Mac's QuickTime components both cause stalls that are not rectified until the next keyframe. ffmpeg itself has a little trouble decoding a self-made stream. Example: FFmpeg version SVN-r6213, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-pthreads --disable-network --disable- audio-oss --disable-v4l --disable-bktr --disable-dv1394 --disable- ffserver --disable-ffplay --enable-faac --enable-faad --enable-a52 -- enable-x264 --enable-mp3lame --enable-gpl --disable-debug --enable- amr_wb --enable-amr_nb libavutil version: 49.0.0 libavcodec version: 51.14.0 libavformat version: 50.5.0 built on Sep 23 2006 13:58:32, gcc: 4.0.1 (Apple Computer, Inc. build 5363) Seems that stream 0 comes from film source: 1000.00 (1000/1) -> 29.97 (30000/1001) Input #0, asf, from '/Users/tylerl/Desktop/wmvtest1.wmv': Duration: 00:01:13.0, start: 2.000000, bitrate: 293 kb/s Stream #0.0: Video: wmv2, yuv420p, 320x240, 29.97 fps(r) Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s Output #0, asf, to 'wmvtest2.wmv': Stream #0.0: Video: msmpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 29.97 fps(c) Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding [wmv2 @ 0x512298]overreading 4 bits [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors overread, skip -6 enddists: -1 -1 [wmv2 @ 0x512298]overreading 4 bits [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors invalid new backstep 112 overread, skip -7 enddists: -1 -1B time=6.5 bitrate= 427.5kbits/s [wmv2 @ 0x512298]overreading 58 bitsme=14.2 bitrate= 360.1kbits/s [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors [wmv2 @ 0x512298]overreading 5 bitsime=22.0 bitrate= 335.0kbits/s [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors invalid new backstep 108 [wmv2 @ 0x512298]overreading 6 bits [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors [wmv2 @ 0x512298]overreading 65 bitsme=29.4 bitrate= 328.0kbits/s [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors [wmv2 @ 0x512298]overreading 30 bits [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors [wmv2 @ 0x512298]overreading 30 bits [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors [wmv2 @ 0x512298]overreading 28 bitsme=37.0 bitrate= 319.9kbits/s [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors [wmv2 @ 0x512298]overreading 26 bits [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors [wmv2 @ 0x512298]overreading 2 bits [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors [wmv2 @ 0x512298]overreading 6 bitstime=44.5 bitrate= 316.2kbits/s [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors overread, skip -5 enddists: -4 -4 [wmv2 @ 0x512298]overreading 27 bitsme=52.4 bitrate= 308.3kbits/s [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors overread, skip -5 enddists: -4 -4 [wmv2 @ 0x512298]overreading 8 bitstime=67.8 bitrate= 305.8kbits/s [wmv2 @ 0x512298]concealing 300 DC, 300 AC, 300 MV errors frame= 2249 q=19.2 Lsize= 1kB time=75.0 bitrate= 0.1kbits/s video:2077kB audio:586kB global headers:0kB muxing overhead -99.979575% Here's the log and cmdline used to create that file: carl:~ tylerl$ VisualHub/ffmpeg -i /Users/tylerl/Desktop/ whinerscantbelosers-pants.flv -vcodec wmv2 -g 300 ~/Desktop/wmvtest1.wmv FFmpeg version SVN-r6213, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-pthreads --disable-network --disable- audio-oss --disable-v4l --disable-bktr --disable-dv1394 --disable- ffserver --disable-ffplay --enable-faac --enable-faad --enable-a52 -- enable-x264 --enable-mp3lame --enable-gpl --disable-debug --enable- amr_wb --enable-amr_nb libavutil version: 49.0.0 libavcodec version: 51.14.0 libavformat version: 50.5.0 built on Sep 23 2006 13:58:32, gcc: 4.0.1 (Apple Computer, Inc. build 5363) Seems that stream 1 comes from film source: 1000.00 (1000/1) -> 29.97 (30000/1001) Input #0, flv, from '/Users/tylerl/Desktop/whinerscantbelosers- pants.flv': Duration: 00:01:15.0, start: 0.000000, bitrate: N/A Stream #0.0: Audio: mp3, 22050 Hz, mono Stream #0.1: Video: flv, yuv420p, 320x240, 29.97 fps(r) Output #0, asf, to '/Users/tylerl/Desktop/wmvtest1.wmv': Stream #0.0: Video: wmv2, yuv420p, 320x240, q=2-31, 200 kb/s, 29.97 fps(c) Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s Stream mapping: Stream #0.1 -> #0.0 Stream #0.0 -> #0.1 Press [q] to stop encoding frame= 2249 q=15.2 Lsize= 1kB time=75.0 bitrate= 0.1kbits/s video:1923kB audio:586kB global headers:0kB muxing overhead -99.978402% -Tyler Loch Techspansion LLC http://www.techspansion.com
Tyler Loch wrote:
The problem seems to be with all input formats. Also, the problem is limited to the asf/wmv wrapper (asf-enc.c), not the codec itself - WMV2 conversions to the .avi container work flawlessly. "-vcodec copy" into a .asf/wmv wrapper will then demonstrate the problem on playback.
Hm.. I'm not sure about this? I tried using AVI as the output format and it behaves the same way. [...] -- Brian Brice
The problem seems to be with all input formats. Also, the problem is limited to the asf/wmv wrapper (asf-enc.c), not the codec itself - WMV2 conversions to the .avi container work flawlessly. "-vcodec copy" into a .asf/wmv wrapper will then demonstrate the problem on playback.
Hm.. I'm not sure about this? I tried using AVI as the output format and it behaves the same way.
Here's a sample of the same clip converted with the same settings into different containers: http://www.techspansion.com/visualhub/fall126.avi http://www.techspansion.com/visualhub/fall126.wmv The .wmv file has multiple pauses when played back with Windows Media Player 10 on Windows XP and the Flip4Mac Components on Mac OS X. The .avi file chugs along error-free with the same players. Here's the command used (this run includes your duration patch): ./ffmpeg -i /Users/tylerl/Movies/hiVTS_01_1.VOB -vcodec wmv2 -b 500 - s 320x240 -t 40 -g 300 -an ~/Desktop/fall126.avi ./ffmpeg -i /Users/tylerl/Movies/hiVTS_01_1.VOB -vcodec wmv2 -b 500 - s 320x240 -t 40 -g 300 -an ~/Desktop/fall126.wmv -Tyler Loch Techspansion LLC http://www.techspansion.com
participants (3)
-
bbrice@newtek.com -
borat@subsense.com -
tylerl82@mac.com