Log in

View Full Version : Ripping tv-shows


odyssey
21st December 2016, 10:17
I've been postponing the project of ripping a lot of different tv-shows a lot, mostly because I was unsure of the best way to rip them.

They are often authored in different ways. Some being in just a single PGC with chapters separating them, others in each separate PGC.

The best way I've figured yet is using DVD Decrypter in IFO mode and create a "fake DVD" folder for each episode. This works quite well, and is pretty fast to do.

Afterwards I use a script to do the dirty work, create d2v, avs, process audio and whatever.

However, it seems that I get some episodes with audio sync problems, even while i honor delay reported by dgindex. Also I noticed that mkvmerge sometimes complain about bad audio frames in the beginning, saying that it may be out of sync.

I still need to do some further investigating to see which episodes are really causing a problem, but is my method good enough, or is there a better way?

ndjamena
21st December 2016, 11:24
My Daria DVDs have audio gaps in the Vob files. Since I was trying to keep the 608 captions I was avoiding using MakeMKV but both Eac3to and MKVMerge imploded on those audio gaps (the vob timecodes reset) and I never did manage to rip those disks with everything intact.

Unless you need to keep captions the best method I know to rip DVDs is to turn them into MKVs using MakeMKV. Then use MKVCleaver to extract the video to process with AVISynth.

In any case, if you have problem disks attacking them using multiple tools is pretty much a necessity.

ndjamena
24th December 2016, 04:32
If anyone is interested:

@if not defined EMode (Set "EMode=OFF")
@ECHO %EMode%

if "%~f1"=="" goto :eof

:START

"C:\Program Files (x86)\MakeMKV\makemkvcon64.exe" mkv "file:%~f1" all "%~f1" --noscan

cd /d "%~f1"

del VIDEO_TS.BUP
del VIDEO_TS.IFO

Set MKVCount=0
for %%g in (*.mkv) do CALL :ProcessMKVs "%%~fg"
Set VobCount=0
for %%g in (*.vob) do CALL :ProcessVobs "%%~fg"

if %MKVCount% NEQ %VobCount% (
echo ERROR: %MKVCount% MKVs and %VobCount% Vobs
pause
)

for /l %%g in (1,1,%MKVCount%) do CALL ren "%%MKV%%~g%%" "%%Vob%%~g%%.mkv"

for %%g in (*.vob) do CALL :ProcessFile "%%~fg"

for %%g in (*.*) do CALL :DelFile "%%~fg"

shift

if NOT "%~f1"=="" goto :START

pause

goto :eof

:DelFile

Set "FileName=%~n1"
if /I NOT "%FileName:~-3%"=="New" DEL "%~f1"

goto :eof

:ProcessFile

Set "FileName=%~n1"

if NOT EXIST "%~dpn1.srt" "C:\Program Files (x86)\CCExtractor\ccextractorwin.exe" -autoprogram -out=srt -bom -utf8 -ve -trim "%~f1" -o "%~dpn1.srt"

if NOT EXIST "%~dpn1.idx" "C:\Program Files (x86)\Subtitle Edit\SubtitleEdit.exe" /convert "%~dpn1.srt" VobSub

type NUL
MKVMerge "%~dpn1.mkv" "%~dpn1.idx" "%~dpn1.srt" -o "%~dpn1-New.mkv"
if "%ERRORLEVEL%"=="0" (
del "%~dpn1.mkv"
del "%~dpn1.idx"
del "%~dpn1.sub"
del "%~dpn1.srt"
del "%~dp1%FileName:~0,-1%0.bup"
del "%~dp1%FileName:~0,-1%0.ifo"
del "%~f1"
)

goto :eof

:ProcessMKVs

Set /a MKVCount+=1
Set "MKV%MKVCount%=%~f1"

goto :eof

:ProcessVobs

Set /a VobCount+=1
Set "Vob%VobCount%=%~n1"

goto :eof


After ripping an NTSC DVD with 608 captions using DVDShrink reauthor mode (with no vob splitting) I just need to drop the folder onto that batch and I get perfect results with full audio sync and captions.

All I can think to add to that is to extract the audio using EAC3To from the final MKV (EAC3To has problems processing vob files whos timecodes reset, problems shared by neither MakeMKV or CCExtractor) to fix the delay and whatever gaps may be present, which isn't easy to do via batch without either extracting every track from the file and enumerating the output or figuring out how to interpret EAC3To output using cmd commands. (Unless you assume there's only a single audio track.)

(MakeMKV needs a full DVD structure to work with, which I haven't figured out how to do with DVDDecryptor's reauthor method.)

Emulgator
2nd January 2017, 23:05
BTW, ReStream can rewrite GOP timecodes.

ndjamena
3rd January 2017, 02:55
Restream only deals with MPEG2 elementary streams. It can't do anything for ac3 audio or gaps in vob files.

One of the problems is some DVD titles are constructed from seamless branching, MKVMerge can't process ifo files to reconstruct the titles and neither can EAC3To. The titles first need to be processed by a program that can, but since the titles are made from different sections of various vob files the resulting timecodes jump all over the place. Neither program knows what to do about that, when AC-3 timecodes reset to zero EAC3To replaces the previous audio with the new frames, MKVMerge appends the new audio directly to the end of the old frames ignoring any gaps that may have been present between the two (which can desync the audio by several seconds depending on how the previous segment ended).

MakeMKV can't extract 608 captions, and CCExtractor can't process ifo files.

Hence the process of DVDShrink reauthor mode, CCextractor, MakeMKV (MKVMerge to combine them) then EAC3To.

Emulgator
3rd January 2017, 11:24
Ah, I see.

spotter
8th January 2017, 08:44
Use handbrake.

It's the only tool that can handle things like "Deleted Scenes", correctly. If one has a deleted scene playlist that is just a collection of other shorter playlists (i.e. play all). Every other tool I've tried cannot handle the play all correctly. (audio gets out of sync).

When I reencoded DVDs (I gave up a long time ago, cost of time to do vs. storage cost went way in favor of storage) I would just backup the whole disc, load the disc into handbrake and select the playlists I wanted to encode and queue it all up.