Subtitles and CC
Posted: Fri Feb 17, 2017 6:27 pm
My subtitles and close captioning ability are not copied with the DVD. Can anyone help?
Code: Select all
@if not defined EMode (Set "EMode=OFF")
@ECHO %EMode%
if "%~f1"=="" goto :eof
:START
Set "FolderName=%~n1"
Set "DONTDELETE="
if NOT Exist "F:\Work\Temp\%FolderName%" mkdir "F:\Work\Temp\%FolderName%"
"C:\Program Files (x86)\MakeMKV\makemkvcon64.exe" mkv "file:%~f1" all "F:\Work\Temp\%~n1" --noscan
cd /d "F:\Work\Temp\%FolderName%"
Set MKVCount=0
for %%g in (*.mkv) do CALL :ProcessMKVs "%%~fg"
cd /d "%~f1"
Set VobCount=0
for %%g in (*.vob) do CALL :ProcessVobs "%%~fg"
if %MKVCount% NEQ %VobCount% (
echo ERROR: %MKVCount% MKVs and %VobCount% Vobs
pause
)
del VIDEO_TS.BUP
del VIDEO_TS.IFO
for /l %%g in (1,1,%MKVCount%) do CALL ren "%%MKV%%~g%%" "%%Vob%%~g%%.mkv"
for %%g in (*.vob) do CALL :ProcessFile "%%~fg"
if NOT DEFINED DONTDELETE for %%g in (*.*) do CALL :DelFile "%%~fg"
if NOT DEFINED DONTDELETE rd "F:\Work\Temp\%FolderName%"
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 --default-track 0:1 --default-track 1:1 "F:\Work\Temp\%FolderName%\%~n1.mkv" --default-track 0:0 --language 0:eng "%~dpn1.idx" --default-track 0:0 --language 0:eng "%~dpn1.srt" -o "%~dpn1-New.mkv"
if "%ERRORLEVEL%"=="0" (
del "F:\Work\Temp\%FolderName%\%~n1.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"
) else (
Set "DONTDELETE=TRUE"
)
goto :eof
:ProcessMKVs
Set /a MKVCount+=1
Set "MKV%MKVCount%=%~f1"
goto :eof
:ProcessVobs
Set /a VobCount+=1
Set "Vob%VobCount%=%~n1"
goto :eof
Code: Select all
@if not defined EMode (Set "EMode=OFF" & Set "Pause_On=")
@ECHO %EMode%
:START
if NOT "%~f1"=="" cd /d "%~f1"
if NOT EXIST Done md Done
for %%g in (*.mkv) do CALL :ProcessFile "%%~fg"
shift
if not "%~f1"=="" goto :START
goto :eof
:ProcessFile
move "%~f1" ".\Done"
eac3to ".\Done\%~nx1" 2:".\Done\%~n1.ac3"
mkvmerge -A ".\Done\%~nx1" --language 0:eng ".\Done\%~n1.ac3" --track-order 0:0,1:0 -o "%~f1"
goto :eof