User Tools

Site Tools


mplayer:mplayer_usage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mplayer:mplayer_usage [2007/12/02 11:58]
deva
mplayer:mplayer_usage [2019/11/12 21:56] (current)
deva
Line 1: Line 1:
-=====MPlayer Usage=====+=====MPlayer Usage (and some other video stuff)=====
 ====MPlayer==== ====MPlayer====
 +===Play video stream from webcam through v4l2===
 +Make sure that mplayer is compiled with the v4l2 use flag.
 +Make sure that the kerenl is compiled with video for linux support (Device Drivers ---> Multimedia support  ---> <*> Video For Linux) and with proper device driver support (in the subsections of aforementioned config section).
 +<code>
 +mplayer -fps 15 tv:// -tv driver=v4l2:device=/dev/video0
 +</code>
 +
 +===Play MTS files===
 +<code>
 +mplayer -demuxer lavf -lavdopts threads=4:fast:skiploopfilter=all:skipframe=none -fps 25 SOMEFILE.MTS
 +</code>
 +
 ====MEncoder==== ====MEncoder====
 ===Encoding an xvid file in 2 pass mode=== ===Encoding an xvid file in 2 pass mode===
Line 7: Line 19:
 mencoder -o /dev/null -ovc xvid -xvidencopts pass=1 -nosound $FILENAME mencoder -o /dev/null -ovc xvid -xvidencopts pass=1 -nosound $FILENAME
 mencoder -o $OUTPUT -ovc xvid -xvidencopts bitrate=$BITRATE:pass=2 \ mencoder -o $OUTPUT -ovc xvid -xvidencopts bitrate=$BITRATE:pass=2 \
 +    -oac mp3lame -lameopts vbr=3:br=112:mode=1 -af volnorm $FILENAME
 +</code>
 +
 +===Encoding an h264 file===
 +The following example will encode a file in h264 with normalized mp3 audio.
 +<code>
 +mencoder -o $OUTPUT -ovc x264 -x264encopts bitrate=$BITRATE:threads=3 \
     -oac mp3lame -lameopts vbr=3:br=112:mode=1 -af volnorm $FILENAME     -oac mp3lame -lameopts vbr=3:br=112:mode=1 -af volnorm $FILENAME
 </code> </code>
Line 18: Line 37:
  
 ===Making a DVD=== ===Making a DVD===
-A nice resource on the subject: http://gentoo-wiki.com/HOWTO_Create_a_DVD\\+http://tovid.wikia.com/wiki/Making_a_basic_DVD\\ 
 +<del>A nice resource on the subject: http://gentoo-wiki.com/HOWTO_Create_a_DVD</del>\\
 Another resource http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html Another resource http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html
 +
 +===Grabbing from X11===
 +Low resolution and low quality:
 +<code>
 +ffmpeg -f x11grab -s vga -i :0.0 /tmp/out.mpg
 +</code>
 +
 +Better quality and higher resolution:
 +<code>
 +ffmpeg -r 24 -f x11grab -s 1024x768 -i :0.0 -threads 0 -vcodec libx264 -vpre lossless_ultrafast /tmp/out.mkv
 +</code>
 +
 +===Fixing a noisy VHS rip===
 +<code>
 +-vf-add hqdn3d=10:10:20 -vf-add pp=fd
 +</code>
 +
 +''hqdn3d'' is a denoise filter, ''pp=fd'' is a deinterlace filter.
 +
 +===Fixing annoying audio denormalisation===
 +<code>
 +-af volnorm=1,ladspa=/usr/lib/ladspa/fast_lookahead_limiter_1913.so:fastLookaheadLimiter:6:-0.1:0.01:20:0:0:0
 +</code>
 +
 +Make sure that the swh-plugins ladspa package is installed on the system, and that mplayer is compiled with ladspa support.
 +
 +===Create Ogg/Theora file for the new html video tag===
 +<code>
 +ffmpeg2theora movie.avi
 +mv movie.ogv movie.ogg
 +</code>
 +This is not exactly the mencoder approach... but this seemed to be the right place to put it.
 +
 +===Browser friendly videos===
 +<code>
 +ffmpeg -i my-original-video.wmv -vcodec libx264 -f mp4 -vb 1024k -preset slow my-new-video.mp4
 +</code>
mplayer/mplayer_usage.1196593087.txt.gz · Last modified: 2007/12/02 11:58 by deva