Sat 15 Jun 08:35:46 BST 2024
First, Mencoder/Mplayer's manpage is very long, very complex and I couldn't get the examples to work. One of them did, with a small amendment: I removed the '-mf' parameter, which mencoder didn't like. There's an Arch Wiki page on Mencoder and that has some examples.
https://wiki.archlinux.org/title/MEncoderI used this command to encode pizzacam's JPEGs to MP4:
mencoder "mf://*.jpg" \
-vf scale=130:138 \
-mf fps=25 \
-o output.avi \
-ovc lavc \
-lavcopts \
vcodec=mpeg4
Multi-pass encoding:
mencoder "mf://*.jpg" \
-vf scale=130:138 \
-mf fps=25 -o output1.mp4 \
-ovc lavc \
-lavcopts vcodec=mpeg4:vpass=1
Use 'vpass=2' for the next pass.
It got the resolution wrong and the video was a bit slow, so I added -speed 2
for the next try,
and specified a video bitrate of 2800 (arrived at by looking at the output of mencoder on the first
pass). I also changed the scale to make the video larger.
mencoder "mf://*.jpg" \
vf scale=800:600 \
-speed 2 \
-mf \
fps=25 \
-o output1.mp4 \
-ovc lavc \
-lavcopts vcodec=mpeg4:vpass=1:vbitrate=2800
Repeat this with 'vpass=2' in the -lavcopts
section.