Sunday, March 7, 2010

How to rip and extract subtitles from a DVD

I recently had a problem with a DVD not being read from my DVD player so I tought to try ripping it.
Here the steps I followed:

  • rip the vob files with 
dvdbackup -Fv
this will result in a series of VOB files, from now on you can remove the DVD from the DVD player
  • Shrink a bit and get rid of the unuseful stuff through ffmpeg and convert the VOB in mpeg4
#for i in `seq 1 `; do ffmpeg -i VTS_01_$i.VOB -f avi -vcodec  mpeg4 -b 1500k -g 300 -bf 2 -acodec libmp3lame -ab 128k p$i.avi  -croptop 14 -cropbottom 8 -cropleft 10 -cropright 10 ;done   

This command will give you back some .avi files mpeg4+mp3 encoded with a 1500k video bitrate.
Personally I found that from 1500k till 800k the movie is ok, lower starts to be a bit to pixelated if you use mpeg4. In this direction any comment is well appreciated.
  • merge the .avi  in one big movie
mencoder -forceidx -ovc copy -oac copy -o file_out.avi p1.avi p2.avi ...

Subtitles now:

avidemux has a nice tool for OCRing a
vobsub into a SubRip (.srt) sub.  You give it the .idx, and choose which language you want.  It works by matching exact glyphs, so it always gets I vs. l wrong because they always look the same in all the vobsubs I've seen.  You have to type in the character for everything it hasn't seen yet, but once you've hit most of the alphabet it doesn't take long.  If you see parts of letters, change the threshold it uses to draw contours of things.

OPTIONAL
  • you can finally mkvmerge into a matroska file subs and video if you wish.

know how than do that 

enojy Alex

No comments:

Post a Comment