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
mplayer:mplayer_usage [2008/12/07 10:31] devamplayer:mplayer_usage [2023/12/19 21:35] (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===
-http://tovid.wikia.com/wiki/Making_a_basic_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>\\ <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=== ===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> </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>
 +
 +Extended (pixel format conversion):
 +<code>
 +ffmpeg -i my-original-video.wmv -pix_fmt yuv420p -vcodec libx264 -f mp4 -vb 1024k -preset slow my-new-video.mp4
 +</code>
 +
 +Extended (pixel format conversion and audio from 'other.mp4'):
 +<code>
 +ffmpeg -i my-original-video.wmv -i other.mp4 -map 0:0 -map 1:1 -pix_fmt yuv420p -vcodec libx264 -f mp4 -vb 1024k -preset slow my-new-video.mp4
 +</code>
 +
 +===Fixed bitrate videos for Blender===
 +<code>
 +ffmpeg -i input.mp4 -vcodec libx264 -f mp4 -b 1200k -minrate 1200k -maxrate 1200k -preset slow output-fixed.mp4
 +</code>
 +
 +https://wiki.gentoo.org/wiki/FFmpeg
mplayer/mplayer_usage.1228642261.txt.gz · Last modified: 2008/12/07 10:31 by deva