[MEncoder-users] quicktime compatible mp4 using x264encopts?
Jon Drukman
jsd at cluttered.com
Thu Jun 29 23:48:20 CEST 2006
Has anybody successfully generated an .mp4 with H264 video and AAC audio
that will play in Quicktime using mencoder + libx264? I can't get it to
work. The resulting files just cause the player to either crash or
complain about invalid data. It works fine if I use libavcodec's H264
options.
this works:
mencoder "$1" -oac faac -faacopts mpeg=4:raw:br=128 -ovc lavc -lavcopts
vcodec=h264:vbitrate=1200:mbd=2:cmp=2:subcmp=2:trell=yes:v4mv=yes:aic=2:vglobal=1:aglobal=1
-of lavf -lavfopts
format=mp4:i_certify_that_my_video_stream_does_not_use_b_frames -o
test.mp4 -frames 300
this doesn't:
$bin $1 -ffourcc h264 -ovc x264 \
-x264encopts
subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b:bitrate=$bitrate
\
-of lavf -lavfopts
format=mp4:i_certify_that_my_video_stream_does_not_use_b_frames \
-oac lavc -lavcopts acodec=aac -ofps 30000/1001 -o test264.mp4 -frames 300
output from -identify looks the same on both files:
(good)
Quicktime/MOV file format detected.
ID_VIDEO_ID=0
ID_AUDIO_ID=1
VIDEO: [avc1] 640x480 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
ID_FILENAME=test.mp4
ID_DEMUXER=mov
ID_VIDEO_FORMAT=avc1
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=640
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=mp4a
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_LENGTH=10.01
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio)
decoder)
==========================================================================
(bad)
Quicktime/MOV file format detected.
ID_VIDEO_ID=0
ID_AUDIO_ID=1
VIDEO: [avc1] 640x480 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
ID_FILENAME=test264.mp4
ID_DEMUXER=mov
ID_VIDEO_FORMAT=avc1
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=640
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=mp4a
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_LENGTH=10.01
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio)
decoder)
==========================================================================
More information about the MEncoder-users
mailing list