Log in

View Full Version : DGIndexNV Batch Demuxing


Emulgator
3rd March 2022, 11:49
I thought I could help some good souls searching for a DGIndexNV batch demuxing function and here comes the first .bat:
In-place folder batch-demuxing of AVC-containing .mp4 files into .264 only.

(This came in handy as I had to deal with imperfect .mp4 muxes from Topaz VEAI
which could be mended by batch demuxing to .264 and batch remuxing using good old tsMuxeR 1.10.6 to .m2ts)
Partner script here: https://forum.doom9.org/showthread.php?t=183728
set dgindexnvpath="C:\_PROG\! Video Decoders\dgdecnv_239\DGIndexNV.exe"
for /f %%a in ('dir /b *.mp4') do call :demux_video_only "%%a"
echo FOLDER DEMUXING FINISHED ! & pause
goto :eof
:demux_video_only
%dgindexnvpath% -i "%~dpn1.mp4" -od "%~n1" -h
goto :eof
exit

REM Emulgator's DGIndexNV .mp4 batch demuxing script 2022 03 03
REM This script is made for folder batch demuxing of.mp4 files containing 1 AVC stream into .264 files
REM Pre-set dgindexnv to append .264 extension.
REM This script assumes input naming convention in any pattern, but without spaces.
REM 00000.mp4, 00001.mp4 are fine too...
REM Pull all .mp4 to be demuxed into one working folder.
REM Put this batch file into that working folder, because /b assumes the batch file's directory !
REM Set variable "dgindexnvpath" to the path to your system's DGIndexNV.exe
REM Edit the other parameters to fit your needs.
REM %~n1 will generate demuxfilenames identical to source, DGIndexNV.exe will append .264 extension
REM Writes into source folder, overwrites any colliding files with same names without asking !

REM filenameWithoutExtension=%~dpn1 (dpn=drivepathname)
REM filename.extension=%~nxf
REM originalfilenamewithextension=%a | nameoffileonlywithoutextension=%~na | extensiononly=%~xa
Copy, paste & modify, (description inside), rename extension to .bat and run.

sef
3rd March 2022, 19:22
Thank's man!

Emulgator
4th March 2022, 00:58
And the second one will demux audio and subs as well.
Thanks DG for the hint about -a taking no parameters, otherwise -h would not be parsed and GUI would open...
set dgindexnvpath="C:\_PROG\! Video Decoders\dgdecnv_239\DGIndexNV.exe"
for /f %%a in ('dir /b *.mp4') do call :demux_video_only "%%a"
echo FOLDER DEMUXING FINISHED ! & pause
goto :eof
:demux_video_only
%dgindexnvpath% -i "%~dpn1.mp4" -od "%~n1" -a -h
goto :eof
exit

REM Emulgator's DGIndexNV .mp4 batch demuxing script 2022 03 04
REM This script is made for folder batch demuxing of.mp4 files containing 1 AVC stream
REM and any number of audio/sub streams into .264 and accompanying audio/sub files
REM Pre-set dgindexnv to append .264 extension.
REM This script assumes input naming convention in any pattern, but without spaces.
REM 00000.mp4, 00001.mp4 are fine too...
REM Pull all .mp4 to be demuxed into one working folder.
REM Put this batch file into that working folder, because /b assumes the batch file's directory !
REM Set variable "dgindexnvpath" to the path to your system's DGIndexNV.exe
REM Edit the other parameters to fit your needs.
REM %~n1 will generate demuxfilenames identical to source, DGIndexNV.exe will append .264 and other extensions
REM Writes into source folder, overwrites any colliding files with same names without asking !

REM filenameWithoutExtension=%~dpn1 (dpn=drivepathname)
REM filename.extension=%~nxf
REM originalfilenamewithextension=%a | nameoffileonlywithoutextension=%~na | extensiononly=%~xa

videoh
4th March 2022, 01:24
Thank you, Emulgator, for your work to make DGIndexNV more useful.