Tag Archives: mencoder

CLI Video Ripping.

Gui are fine and well, but sometime you just can't beat the command line.  Here are a few examples.

First, make sure you have mplayer installed correctly.  Below is what I have:

[ebuild   R   ~] media-video/mplayer-1.0_rc4_p20120105  USE="X a52 alsa ass bluray cddb cdio cdparanoia cpudetection dts dv dvd dvdnav enca encode faac faad gif iconv jpeg live mmx mp3 network openal opengl osdmenu png pulseaudio quicktime rar real rtc shm speex sse sse2 ssse3 theora toolame tremor truetype twolame unicode vdpau vorbis x264 xscreensaver xv xvid xvmc -3dnow -3dnowext -aalib (-altivec) (-aqua) -bidi -bindist -bl -bs2b -debug -dga -directfb -doc -dvb (-dxr3) (-esd) -fbcon -ftp -ggi -gsm -ipv6 -jack -joystick -jpeg2k -ladspa -libcaca -libmpeg2 -lirc -lzo -mad -md5sum -mmxext -mng -nas -nut -oss -pnm -pvr -radio -rtmp -samba -sdl -tga -v4l (-vidix) (-win32codecs) -xanim -xinerama -zoran" VIDEO_CARDS="-mga -s3virge -tdfx" 0 kB

An example of ripping a DVD could be:

mencoder dvd://1 -dvd-device /dev/sr0 -aid 128 -nosub -info srcform="DVD ripped by cdstealer" -oac faac -ovc x264 -o "/home/cdstealer/Desktop/full_metal_jacket.avi"

But this won't play on a PS3 or Xbox.

mencoder dvd://1 -dvd-device /dev/sr0 -aid 128 -nosub -info srcform="DVD ripped by cdstealer" -oac faac -faacopts mpeg=4 -ovc lavc -lavcopts vcodec=mpeg4 -ffourcc mp4v -o "full_metal_retards.mp4"

This will create an MP4 format file that will play :)

You can also dump and decode the DVD using

mplayer dvd://1 -dumpstream -dumpfile ~/Desktop/file.mpg

This will create a "lossless" copy of which you can transcode using mencoder, ffmpeg et al.

These encoders have a VAST array of options:-
http://ffmpeg.org/ffmpeg.html
http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html

PS3 supported video formats:

 

  • Memory Stick Video Format
  • MPEG-4 SP (AAC LC)
  • H.264/MPEG-4 AVC High Profile AAC LC
  • MPEG-2 TS H.264/MPEG-4 AVC, AAC LC
  • MP4 file format
  • H.264/MPEG-4 AVC High Profile (AAC LC)
  • MPEG-1 (MPEG Audio Layer 2)
  • MPEG-2 PS (MPEG2 Audio Layer 2, AAC LC, AC3(Dolby Digital), LPCM)
  • MPEG-2 TS MPEG2 Audio Layer 2, AC3 Dolby Digital, AAC LC
  • MPEG-2 TS H.264/MPEG-4 AVC, AAC LC
  • AVI
  • Motion JPEG (Linear PCM)
  • Motion JPEG (μ-Law)
  • AVCHD .m2ts / .mts
  • DivX
  • WMV
  • VC-1 WMA Standard V2

eg
ffmpeg -i file.mkv -vcodec libx264 -acodec copy file.mp4

Input #0, matroska,webm, from 'file.mkv':
Duration: 00:23:42.88, start: 0.000000, bitrate: 2489 kb/s
Stream #0:0(eng): Video: h264 (High 10), yuv420p10le, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(eng): Audio: aac, 48000 Hz, 5.1, s16 (default)
Stream #0:2(jpn): Audio: aac, 48000 Hz, stereo, s16
Stream #0:3(eng): Subtitle: text (default)