[MEncoder-users] Corrupt H264 Files with Mencoder
Andrei Verovski (aka MacGuru)
andreil1 at starlett.lv
Thu Sep 14 23:24:27 CEST 2006
Hi,
I have wrote simple script which (supposedly) could convert almost any video
file into high-quality H264 MP4/AAC.
Here it is:
Dump both audio and video in raw format (because lavf cannot hadnle video
streams with b-frames, and x264 can create only AVI, not MP4 container)
mencoder $1 -ovc raw -nosound -o $1.temp.raw.avi
mplayer $1 -vo null -ao pcm:file=$1.temp.wav
Convert audio to AAC
ffmpeg -i $1.temp.wav -acodec aac $1.temp.aac
Here is the final stage, converting raw video into H264 while muxing it with
AAC audio:
mencoder $1.temp.raw.avi -audiofile $1.temp.aac -oac copy -of lavf -lavfopts
format=mp4:i_certify_that_my_video_stream_does_not_use_b_frames -ovc
x264 -x264encopts 4x4mv:subq=5:bframes=3:b_pyramid:weight_b -o $1.menc1p.mp4
Delete temp files.
rm -f $1.temp.*
However, I can play these on Linux (in VLC/Xine), on Mac VLC plays it without
sound, While QuickTime Player and Windows Media Player cannot play them at
all.
Anyone could suggest what's wrong?
Thanks in advance
Andrei
More information about the MEncoder-users
mailing list