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 revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
mplayer:mplayer_usage [2009/01/13 19:52] devamplayer:mplayer_usage [2019/11/12 21:56] 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 13: Line 25:
 The following example will encode a file in h264 with normalized mp3 audio. The following example will encode a file in h264 with normalized mp3 audio.
 <code> <code>
-mencoder -o $OUTPUT -ovc x264 -x264encopts bitrate=$BITRATE:pass=2:8x8dct:i8x8 \+mencoder -o $OUTPUT -ovc x264 -x264encopts bitrate=$BITRATE:threads=\
     -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 30: Line 42:
  
 ===Grabbing from X11=== ===Grabbing from X11===
 +Low resolution and low quality:
 <code> <code>
 ffmpeg -f x11grab -s vga -i :0.0 /tmp/out.mpg 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> </code>
  
Line 40: Line 58:
  
 ''hqdn3d'' is a denoise filter, ''pp=fd'' is a deinterlace filter. ''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.txt · Last modified: 2023/12/19 21:35 by deva