Skip to content

mplayer/mencoder tricks

Here are some tricks with mplayer/mencoder

1) To display a video files frame types(IPB)
mplayer -nosound -vo null -lavdopts debug=1 -v -benchmark video.mpg

2) To get a screen capture from a video file
mplayer -vf screenshot video.avi
press s during playback to generate shotnnnn.png

3) To rotate a video recorded in portrait mode use the rotate video filter. This can be used with mplayer or mencoder. Just add
-vf rotate=1
to rotate 90 degress clockwise

or to “fix” upside-down video use
-vf mirror,flip
-vf mirror -flip

4) To play or encode images(all the same size) use
mplayer mf://name*.jpg -mf fps=5
mencoder mf://name*.jpg -mf fps=5 -vf hqdn3d=2:1:2 -ofps 30000/1001 -oname.avi

5) To create MPEG Elementary stream (ES) muxable with mplex
mencoder -of rawvideo infile -o outfile.m2v (otheropts)

6) Script for creating dvd mpeg-es from Yosemite images
find ahwahnee turtleback1 sentinel -size 0 -type f -delete
d=’20080129′ ;
for dir in ahwahnee sentinel turtleback1 ; do
o=${dir}-$d ;
mencoder -mf fps=5 mf://${dir}/$d-*.jpg -vf hqdn3d=2:1:2 -profile dvdES -ofps 30000/1001 -o $o.m2v ;

Create ac3 audio with ffmpeg
ffmpeg -i “/mnt/Mp3/Mp3/Jazz/George Winston/Winter Into Spring/01-January_Stars.mp3” -ar 48000 -ab 224k winter.ac3

Multiplex 3 video streams and 1 audio with mplex
mplex -l 90 -f 8 -r 12000 -o yosemite29.mpg winter.ac3 *29.m2v

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: