본문 바로가기

카테고리 없음

linux 에서 dvd 2 avi

출처 : http://idolinux.blogspot.com/2008/09/encode-dvd-to-avi-with-mplayer-on-linux.html


영어이다..

mplayer설치시 옵션을 주지 않아서 아직 변한하지는 못했음


1. dvd 에서 파일을 dump로 내린다.

]$ mplayer dvd://1 -v -dumpstream -dumpfile dump.vob
또는

]$ mplayer /mnt/iso/VIDEO_TS/VTS_01_1.VOB -v -dumpstream -dumpfile dump.vob

...
Core dumped ;)

dvd://1            dvd 디스크 주소형식은 /dev/dvd 장치마운트한 경우 사용한다.

-v                과정을 보여준다

-dumpstream    dumpstream으로 열어서 화면에 영상을 출력하지 않는다.

-dumpfile 파일명 파일이름을 지정한다.


2. 파일 화면 정보를 확인한다.

]$ mplayer -aid 128 -vf cropdetect dump.vob

파일을 재생하면서

[CROP] Crop area: X: 0..719  Y: 50..475  (-vf crop=720:416:0:56).
메시지를 뿌린다. -vf crop=720:416:0:56 정보를 필요로 한다.
(원 게시글에는 audio level low, black bar 등의 여부를 노트하라고 되어 있다)


3. 실제 재인코딩한다.

]$ mencoder -ovc xvid -oac mp3lame -xvidencopts fixed_quant=4 -lameopt cbr:br=192:aq=1 -aid 128 -vf crop=720:416:0:56,yadif -lameopts vol=3 -o dump.avi dump.vob


에러메시지 mplayer 설치시 옵션에 있어야 하는가보다

 MPlayer was compiled without libmp3lame support.
-xvidencopts is not an MEncoder option



원본

Encode a DVD to AVI with MPlayer on Linux

MPlayer and MEncoder provide a fast and high-quality way to convert and play your media. This is a simple, three-step, command-line way to rip your favorite DVD into an AVI file. The quality of Xvid MPEG4 for video and Lame MP3 for audio is phenomenal for the file size. The final output should be almost indistinguishable from the original source disc.

First, dump the contents of the main title to a big fat vob file, usually around 5 or 6 gigabytes:
$ mplayer dvd://1 -v -dumpstream -dumpfile dump.vob
...
Core dumped ;)


Second, playback the dump to confirm! your settings:
$ mplayer -aid 128 -vf cropdetect dump.vob
[CROP] Crop area: X: 0..719 Y: 60..414 (-vf crop=720:352:0:62).0
...


Take note of a few things:
  • is the audio level low?
  • is there combing/jagged-edges during fast motion from interlacing?
  • are there black bars in the video?


Third, run the actual re-encode:
$ mencoder -ovc xvid -oac mp3lame \
-xvidencopts fixed_quant=4 -lameopts cbr:br=192:aq=1 -aid 128 \
-vf crop=720:352:0:62,yadif -lameopts vol=3 \
-o movie.avi dump.vob
Pos:1564.3s 46902f (39%) 15.35fps Trem: 78min 1509mb A-V:0.032 [2979:191]
...


Let's review the above command line options, in order:
  • output video codec is xvid mpeg4
  • output audio codec is lame mp3
  • fixed quantizer of 4 provide high video quality with a single rendering pass
  • 192 constant bitrate is a good sweet spot for audio quality
  • audio id 128 is usually the main English language track
  • crop will remove black bars (use the values output during dump playback)
  • yadif is the best deinterlacer choice (only use this if you saw combing)
  • vol=3 will boost audio gain (only use if audio was low)
  • output to movie.avi, read in from dump.vob