rollin_eng wrote: ↑Mon May 04, 2020 7:41 pm
Ok, so you are still watching every m2ts/vob to see what they are?
Yes.
That will be your problem then, you need to find a way to open the root folder or use makemkv to rip your disc.
I will try 'eac3to D: -demux' again. I will also try makemkv, though I've already ripped to ISO.
I've included the script below so you see that I'm not a complete novice. I put it in the 'Send To' context menu and simply select an 'M2TS' or any 'VOB' and invoke 'Sent To'. I currently call it 'test.cmd'. You might give it a try. I'd appreciate your comments. BTW, I haven't fleshed out Step 4 yet.
Thanks for your continued help.
Code: Select all
: Synopsis: Converts almost any type of 24 FPS video file (e.g., 'D:\BDMV\STREAM\00001.M2TS') -- input via %1 -- and outputs a 60 FPS MKV (e.g., '[D][BDMV][STREAM]00001.nn.MKV').
: Author: Mark Filipak.
: Rights: None. "I place this script into the Public Domain." -- Mark Filipak (May, 2020). Contact: markfilipak.windows+ffmpeg @@@@@ gmail.com
:
: Accepts %1 as 24FPS Blu-ray or soft-telecined DVD input video, fixes any time stamp problems (Step 1), 55-telecines to 60FPS (Step 2), extracts subtitles & chapters (Step 3), and merges the result (Step 4).
: Output videos & logs are saved with unique names at each step.
:
: Why 55-telecine? Because 55-telecined videos play on 60Hz TVs with less (almost imperceptible) telecine judder.
: Note: If you have a 120Hz TV, you don't need this because 120Hz TVs play 24 FPS videos without telecine, and therefore without judder.
:
: Uses: mkvmerge, ffmpeg, and HandBrakeCLI.
:
: Global environmental variables:
: PATH - The PATH must include the full paths to mkvmerge, ffmpeg, and HandBrakeCLI.
: AVOut - Full path (without trailing '\') to receive outputs.
: Local environmental variables:
: SRCDRV - Drive (without ':') of the source video (extracted from %1).
: SRCPATH - Path (without trailing '\') to the source video (extracted from %1) (e.g., '\BDMV\STREAM', '\VIDEO_TS').
: SRCNAME - Name (without trailing '.') of the source video (extracted from %1) (e.g., '00000' in 'D:\BDMV\STREAM\00000.m2ts', 'VTS_01_1' in 'D:\VIDEO_TS\VTS_01_1.VOB').
: SRCEXT - Name-extension (without leading '.') of the source video (extracted from %1) (e.g., 'm2ts' in 'D:\BDMV\STREAM\00000.m2ts', 'VOB' in 'D:\VIDEO_TS\VTS_01_1.VOB').
: OUTNAME - Base name of outputs. If the input filespec is 'D:\BDMV\STREAM\00001.M2TS' the output name is '[D][BDMV][STREAM]00001.nn.MKV' where 'nn' is a 2-digit number (see OUTINDEX).
: OUTINDEX - Two digits (without leading '.') appended (with leading '.') to %SRCNAME% to form distinctive output names (e.g., '05' in '[D][BDMV][STREAM]00000.05.MKV', '13' in '[D][VIDEO_TS]VTS_01_1.13.MKV').
: FFSCOPE - The ffmpeg scope diagnostic.
: FFTRIM - The ffmpeg directive to trim the beginning of the video.
: FFANALYZE - The ffmpeg directive for extended video stream analysis.
: FFCFRAMES - The ffmpeg filter setting for detection of combed frames.
: FFTELECINE - The ffmpeg filter setting for 55-telecine.
: FFPSELECT - The ffmpeg filter setting for selection of progressive frames.
: FFCSELECT - The ffmpeg filter setting for selection of combed frames.
: FFINTERLEAVE - The ffmpeg filter setting for interleaving of progressive & combed frames.
: FFENCODE - The ffmpeg directives that control encoding.
: FFCMD - The ffmpeg command line that combines all of the above FF-settings.
: Tempoarary environmental variables:
: MOREOUTNAME - This is initialized to SRCPATH, then it is gobbled up during OUTNAME formation.
:
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
IF "%AVOut:~-1%"=="\" SET %AVOut%=%AVOut:~0,-1%
IF EXIST "%AVOut%" GOTO CONTINUE1
ECHO Please create an environment variable named "AVOut" that specifies a folder to receive output videos.
PAUSE
EXIT
:CONTINUE1
IF EXIST %1 GOTO CONTINUE2
ECHO Source video %1 was not found.
PAUSE
EXIT
:CONTINUE2
FOR %%X IN (%1) DO (
SET SRCDRV=%%~dX
SET SRCPATH=%%~pX
SET SRCNAME=%%~nX
SET SRCEXT=%%~xX
)
SET SRCDRV=%SRCDRV:~0,1%
SET SRCPATH=%SRCPATH:~0,-1%
SET SRCEXT=%SRCEXT:~1%
FOR %%X IN (%1) DO IF "%%~xX"==".VOB" (
: determine %%V in 'VTS_%%V_%%W.VOB' for %%V = 99 to 01 and %%W = 9 to 1, then set VTS ID to it
FOR /L %%V IN (99,-1,10) DO FOR /L %%W IN (9,-1,1) DO IF %1=="%SRCDRV%:%SRCPATH%\VTS_%%V_%%W.VOB" SET SRCNAME=VTS_%%V_1
FOR /L %%V IN (9,-1,1) DO FOR /L %%W IN (9,-1,1) DO IF %1=="%SRCDRV%:%SRCPATH%\VTS_0%%V_%%W.VOB" SET SRCNAME=VTS_0%%V_1
)
SET OUTNAME=[%SRCDRV%]
SET MOREOUTNAME=%SRCPATH%
:LOOP1
FOR %%X IN ("%MOREOUTNAME%") DO SET OUTNAME=%OUTNAME:~0,3%[%%~nX]%OUTNAME:~3%
:LOOP2
IF NOT "%MOREOUTNAME:~-1%"=="\" SET MOREOUTNAME=%MOREOUTNAME:~0,-1%
IF NOT "%MOREOUTNAME:~-1%"=="\" GOTO LOOP2
SET MOREOUTNAME=%MOREOUTNAME:~0,-1%
IF NOT "%MOREOUTNAME%"=="" GOTO LOOP1
SET OUTNAME=%OUTNAME%%SRCNAME%
FOR /L %%I IN (99,-1,10) DO IF NOT EXIST "%AVOut%\%OUTNAME%.%%I.1-mkvmerge.MKV" IF NOT EXIST "%AVOut%\%OUTNAME%.%%I.1-mkvmerge.LOG" IF NOT EXIST "%AVOut%\%OUTNAME%.%%I.2-ffmpeg.MKV" IF NOT EXIST "%AVOut%\%OUTNAME%.%%I.2-ffmpeg.LOG" IF NOT EXIST "%AVOut%\%OUTNAME%.%%I.3-handbrake.MKV" IF NOT EXIST "%AVOut%\%OUTNAME%.%%I.3-handbrake.LOG" IF NOT EXIST "%AVOut%\%OUTNAME%.%%I.LOG" IF NOT EXIST "%AVOut%\%OUTNAME%.%%I.MKV" SET OUTINDEX=%%I
FOR /L %%I IN (9,-1,1) DO IF NOT EXIST "%AVOut%\%OUTNAME%.0%%I.1-mkvmerge.MKV" IF NOT EXIST "%AVOut%\%OUTNAME%.0%%I.1-mkvmerge.LOG" IF NOT EXIST "%AVOut%\%OUTNAME%.0%%I.2-ffmpeg.MKV" IF NOT EXIST "%AVOut%\%OUTNAME%.0%%I.2-ffmpeg.LOG" IF NOT EXIST "%AVOut%\%OUTNAME%.0%%I.3-handbrake.MKV" IF NOT EXIST "%AVOut%\%OUTNAME%.0%%I.3-handbrake.LOG" IF NOT EXIST "%AVOut%\%OUTNAME%.0%%I.LOG" IF NOT EXIST "%AVOut%\%OUTNAME%.0%%I.MKV" SET OUTINDEX=0%%I
SET OUTNAME=%OUTNAME%.%OUTINDEX%
SET FFCFRAMES=eq(mod((n+1)\,5)\,3)
SET FFSCOPE=datascope=size=1920x1080:x=45:y=340:mode=color2
SET FFREPORT=file=%OUTNAME%.2-ffmpeg.LOG:level=48
SET FFREPORT=file=%OUTNAME%.2-ffmpeg.LOG:level=32
:
SET FFTRIM=-ss 0:00
: :
SET FFANALYZE=-analyzeduration 5000000000 -probesize 5000000000
: : :
SET FFTELECINE=telecine=pattern=5,split[A][B]
: : : :
SET FFPSELECT=[A]select='not(%FFCFRAMES%)'[C]
: : : : :
SET FFCSELECT=[B]select='%FFCFRAMES%',pp=linblenddeint[D]
: : : : : :
SET FFINTERLEAVE=[C][D]interleave
: : : : : : :
SET FFENCODE=-map 0 -codec:v libx264 -crf 18 -an -sn -dn
SET FFENCODE=-map 0 -codec:v libx264 -crf 18 -codec:a copy -sn -dn
: : : : : : : :
SET FFCMD=ffmpeg -report %FFTRIM% %FFANALYZE% -i "%AVOut%\%OUTNAME%.1-mkvmerge.MKV" -filter_complex "%FFTELECINE%,%FFPSELECT%,%FFCSELECT%,%FFINTERLEAVE%" %FFENCODE% "%AVOut%\%OUTNAME%.2-ffmpeg.MKV"
ECHO Step 1: Fix any time stamp problems
ECHO Step 1: mkvmerge --default-duration 0:24000/1001fps -o "%AVOut%\%OUTNAME%.1-mkvmerge.MKV" "%SRCDRV%:%SRCPATH%\%SRCNAME%.%SRCEXT%" 1^>"%AVOut%\%OUTNAME%.1-mkvmerge.LOG"
ECHO.
ECHO Step 2: 55-telecine
ECHO Step 2: Report to %FFREPORT%
ECHO Step 2: %FFCMD%
ECHO.
ECHO Step 3: Extract subtitles ^& chapters
ECHO Step 3: HandBrakeCLI --preset-import-gui "C:\CMD & tiny apps\HandBrakeCLI\p24-subs-&-chaps.json" -i "%SRCDRV%:%SRCPATH%\%SRCNAME%.%SRCEXT%" -o "%AVOut%\%OUTNAME%.3-handbrake.MKV" 2^>"%AVOut%\%OUTNAME%.3-handbrake.LOG"
ECHO.
ECHO Step 4: Merge all
ECHO Step 4: mkvmerge -o "%AVOut%\%OUTNAME%.MKV" 1^>"%AVOut%\%OUTNAME%.LOG"
ECHO.
PAUSE
: Step 1: Fix any time stamp problems
: Input: "%SRCDRV%:%SRCPATH%\%SRCNAME%.%SRCEXT%"
: Output: "%AVOut%\%OUTNAME%.1-mkvmerge.MKV"
ECHO Please wait while mkvmerge prepares the job...
mkvmerge --default-duration 0:24000/1001fps -o "%AVOut%\%OUTNAME%.1-mkvmerge.MKV" "%SRCDRV%:%SRCPATH%\%SRCNAME%.%SRCEXT%" 1>"%AVOut%\%OUTNAME%.1-mkvmerge.LOG"
IF ERRORLEVEL 1 EXIT
: Step 2: 55-telecine
: Inputs: "%AVOut%\%OUTNAME%.1-mkvmerge.MKV"
: Output: "%AVOut%\%OUTNAME%.2-ffmpeg.MKV"
ECHO Beginning ffmpeg processing...
%FFCMD%
MOVE "%OUTNAME%.2-ffmpeg.LOG" "%AVOut%\"
IF ERRORLEVEL 1 EXIT
: Step 3: Extract subtitles & chapters
: Input: "%AVOut%\%OUTNAME%.1-mkvmerge.MKV"
: Output: "%AVOut%\%OUTNAME%.3-handbrake.MKV"
ECHO Beginning HandBrakeCLI processing...
HandBrakeCLI --preset-import-gui --preset="p24-subs-&-chaps" --input "%SRCDRV%:%SRCPATH%\%SRCNAME%.%SRCEXT%" --output "%AVOut%\%OUTNAME%.3-handbrake.MKV" 2>"%AVOut%\%OUTNAME%.3-handbrake.LOG"
exit
Here's 'p24-subs-&-chaps.json'
Code: Select all
{
"PresetList": [
{
"AlignAVStart": false,
"AudioCopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
"copy:truehd",
"copy:flac",
"copy:eac3"
],
"AudioEncoderFallback": "ac3",
"AudioLanguageList": [
"any",
"und"
],
"AudioList": [
{
"AudioBitrate": 160,
"AudioCompressionLevel": 0.0,
"AudioEncoder": "copy",
"AudioMixdown": "none",
"AudioNormalizeMixLevel": false,
"AudioSamplerate": "auto",
"AudioTrackQualityEnable": false,
"AudioTrackQuality": -1.0,
"AudioTrackGainSlider": 0.0,
"AudioTrackDRCSlider": 0.0
}
],
"AudioSecondaryEncoderMode": true,
"AudioTrackSelectionBehavior": "all",
"ChapterMarkers": true,
"ChildrenArray": [],
"Default": false,
"FileFormat": "mkv",
"Folder": false,
"FolderOpen": false,
"Mp4HttpOptimize": false,
"Mp4iPodCompatible": false,
"PictureAutoCrop": false,
"PictureBottomCrop": 0,
"PictureLeftCrop": 0,
"PictureRightCrop": 0,
"PictureTopCrop": 0,
"PictureDARWidth": 0,
"PictureDeblockPreset": "off",
"PictureDeblockTune": "medium",
"PictureDeblockCustom": "strength=strong:thresh=20:blocksize=8",
"PictureDeinterlaceFilter": "off",
"PictureCombDetectPreset": "off",
"PictureCombDetectCustom": "",
"PictureDenoiseCustom": "",
"PictureDenoiseFilter": "off",
"PictureDenoisePreset": "light",
"PictureDenoiseTune": "none",
"PictureSharpenCustom": "",
"PictureSharpenFilter": "off",
"PictureSharpenPreset": "medium",
"PictureSharpenTune": "none",
"PictureDetelecine": "off",
"PictureDetelecineCustom": "",
"PictureItuPAR": false,
"PictureKeepRatio": true,
"PictureLooseCrop": false,
"PictureModulus": 2,
"PicturePAR": "auto",
"PicturePARWidth": 0,
"PicturePARHeight": 0,
"PictureForceHeight": 0,
"PictureForceWidth": 0,
"PresetName": "p24-subs-&-chaps",
"Type": 1,
"UsesPictureFilters": false,
"UsesPictureSettings": 2,
"SubtitleAddCC": true,
"SubtitleAddForeignAudioSearch": true,
"SubtitleAddForeignAudioSubtitle": false,
"SubtitleBurnBehavior": "foreign",
"SubtitleBurnBDSub": false,
"SubtitleBurnDVDSub": false,
"SubtitleLanguageList": [
"any",
"und"
],
"SubtitleTrackSelectionBehavior": "all",
"VideoAvgBitrate": 0,
"VideoColorMatrixCode": 0,
"VideoEncoder": "mpeg2",
"VideoFramerate": "23.976",
"VideoFramerateMode": "pfr",
"VideoGrayScale": false,
"VideoScaler": "swscale",
"VideoTune": "",
"VideoLevel": "auto",
"VideoOptionExtra": "",
"VideoQualityType": 2,
"VideoQualitySlider": 31.0,
"VideoQSVDecode": false,
"VideoQSVAsyncDepth": 4,
"VideoTwoPass": true,
"VideoTurboTwoPass": true,
"x264UseAdvancedOptions": false
}
],
"VersionMajor": 42,
"VersionMicro": 0,
"VersionMinor": 0
}