How to encode a commonly usable (Quicktime (7) compatible) MPEG-4 video (mp4 container, avc video, aac audio).
What if I take a survey of what others think, then learn about their differences for understanding and opimization?
b_pyramid and weight_b will have no effect, since they require bframes to be greater than 1. [1]
This also means that the i8x8 option will have no effect, since it requires 8x8dct. [1]
Does not support SAR (sample aspect ratio) information in MPEG-4 files; it assumes that SAR=1. [1]
AAC was defined in both MPEG-2 and MPEG-4, and Quicktime wants the 4 version.
harddup
in -vf
to avoid a/v sync loss when changing containers (avi to mp4)mencoder source -o </dev/null | output.avi> \
-ovc x264 -x264encopts pass=<1 | 2>:<turbo | >:bitrate=bitrate:frameref=5:bframes=1:\
me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \
-vf harddup \
-oac faac -faacopts br=bitrate:mpeg=4:object=2 -channels channels -srate sampleRate
Here's what I came up with on 2007-04-05.
ffmpeg \
-i export001.dv \
-cropleft 8 -cropright 8 -s 320x240 -aspect 4:3 \
-vcodec h264 -crf 25 \
-subq 7 -refs 12 -me umh \
-partitions +partb8x8+partp8x8+partp4x4+parti4x4 -bf 1 -trellis 2 -keyint_min 300 \
-i audio2m16.wav \
-acodec aac -aq 50 \
ffmpegmplayersettings1.mp4 \
-map 0:0 -map 1:0 \
-f mp4 \
-title "Sonogram Barker 2007-04-03"
And
then MP4Box ffmpegmlayersettings1.mp4 --out final.mp4 -inter 0.5
to interleave the a/v for streaming (start playing before a download is complete).