mplayer:mplayer_usage
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
mplayer:mplayer_usage [2008/12/07 10:31] – deva | mplayer:mplayer_usage [2022/03/21 09:09] – [MEncoder] 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 | ||
+ | < | ||
+ | mplayer -fps 15 tv:// -tv driver=v4l2: | ||
+ | </ | ||
+ | |||
+ | ===Play MTS files=== | ||
+ | < | ||
+ | mplayer -demuxer lavf -lavdopts threads=4: | ||
+ | </ | ||
+ | |||
====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: | mencoder -o $OUTPUT -ovc xvid -xvidencopts bitrate=$BITRATE: | ||
+ | -oac mp3lame -lameopts vbr=3: | ||
+ | </ | ||
+ | |||
+ | ===Encoding an h264 file=== | ||
+ | The following example will encode a file in h264 with normalized mp3 audio. | ||
+ | < | ||
+ | mencoder -o $OUTPUT -ovc x264 -x264encopts bitrate=$BITRATE: | ||
-oac mp3lame -lameopts vbr=3: | -oac mp3lame -lameopts vbr=3: | ||
</ | </ | ||
Line 23: | Line 42: | ||
===Grabbing from X11=== | ===Grabbing from X11=== | ||
+ | Low resolution and low quality: | ||
< | < | ||
ffmpeg -f x11grab -s vga -i :0.0 / | ffmpeg -f x11grab -s vga -i :0.0 / | ||
</ | </ | ||
+ | |||
+ | Better quality and higher resolution: | ||
+ | < | ||
+ | ffmpeg -r 24 -f x11grab -s 1024x768 -i :0.0 -threads 0 -vcodec libx264 -vpre lossless_ultrafast / | ||
+ | </ | ||
+ | |||
+ | ===Fixing a noisy VHS rip=== | ||
+ | < | ||
+ | -vf-add hqdn3d=10: | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | |||
+ | ===Fixing annoying audio denormalisation=== | ||
+ | < | ||
+ | -af volnorm=1, | ||
+ | </ | ||
+ | |||
+ | 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=== | ||
+ | < | ||
+ | ffmpeg2theora movie.avi | ||
+ | mv movie.ogv movie.ogg | ||
+ | </ | ||
+ | This is not exactly the mencoder approach... but this seemed to be the right place to put it. | ||
+ | |||
+ | ===Browser friendly videos=== | ||
+ | < | ||
+ | ffmpeg -i my-original-video.wmv -vcodec libx264 -f mp4 -vb 1024k -preset slow my-new-video.mp4 | ||
+ | </ | ||
+ | |||
+ | Extended (pixel format conversion): | ||
+ | < | ||
+ | ffmpeg -i my-original-video.wmv -pix_fmt yuv420p -vcodec libx264 -f mp4 -vb 1024k -preset slow my-new-video.mp4 | ||
+ | </ | ||
+ | |||
+ | Extended (pixel format conversion and audio from ' | ||
+ | < | ||
+ | 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 | ||
+ | </ | ||
+ |
mplayer/mplayer_usage.txt · Last modified: 2023/12/19 21:35 by deva