Hello!
I'm looking for a way to play DVD's, MKV, MP4, etc... in VLC with a avisynth script.
This the plugin i'm using to play avisynth scripts in VLC: https://www.videohelp.com/software/VLC-Avisynth-plugin
I would like to rightclick on a folder or a file containing VOB files or MKV... and select my bat-file so that the video inside that folder will be played using AviSynth and VLC.
This i what i have at the moment:
When i drag a MKV on the bat-file VLC opens, and plays the video using the FrostyBorders AviSynth script.Code:@echo off set vlc="C:\Program Files\VideoLAN\VLC\vlc.exe" set "temp_folder=C:\Temp" if not exist "%temp_folder%" MD "%temp_folder%" echo DirectShowSource("%~1") > "%temp_folder%\%~n1.avs" echo FrostyBorders(1920,1080, Texture=0) >> "%temp_folder%\%~n1.avs" start "" %vlc% "%temp_folder%\%~n1.avs" exit
But when i use a VIDEO_TS folder with .VOB files inside i believe i must convert it to d2v before i can play the file.
I found this code and i think that's what i'm searching for, but it's not working.
When i run the bat-file inside the VIDEO_TS folder nothing happens.
I think if i can get this to work maybe then use the code above to open it in VLC.Code:set DGIndex="D:\Downloads\FrostyBorders\dgmpgdec158\DGIndex.exe" set DGDecode="C:\Program Files (x86)\AviSynth+\plugins\DGDecode.dll" rem get VOB name for %%a in ("*.VOB") set "file_name=%%~na" & set "folder_path=%%~dpa" & goto :name_exist echo no VOB here goto :eof :name_exist CD /d %folder_path% rem parse title number for /f "tokens=2 delims=_" %%m in ("%file_name%") do set "tn=%%m" rem better check here if that just parsed string is a number rem index the whole title %DGIndex% -IF=[VTS_%tn%_1.VOB,VTS_%tn%_2.VOB,VTS_%tn%_3.VOB,VTS_%tn%_4.VOB,VTS_%tn%_5.VOB,VTS_%tn%_6.VOB,VTS_%tn%_7.VOB,VTS_%tn%_8.VOB,VTS_%tn%_9.VOB] -OF=[%folder_path%\title] -OM=1 -IA=5 -MINIMIZE -EXIT rem make avisynth script echo LoadPlugin("%DGDecode%") > script.avs echo MPEG2Source("%folder_path%\title.d2v") >> script.avs
And how do i check what file is in the folder?
Can anybody help me with this?
Thanks!![]()
+ Reply to Thread
Results 1 to 6 of 6
-
Last edited by Desz5; 26th Aug 2022 at 07:09.
-
I know VLC plays dvd's and everything but the reason i want to use AviSynth is so you can add borders to 4:3 screens to prevent black bars on the sides.
Like this:
[Attachment 66447 - Click to enlarge]Last edited by Desz5; 26th Aug 2022 at 10:53.
-
A border is still a border whether it is black (default) or something else (as in your illustration)
Of course it is a question of personal preference but I would find the latter more distracting than the former. -
script.avs is not defined with path, it might be in your user directory
or try this, drop your VOB (any of your chosen title)and it should make a script in that same directory as your VOB is from, or change it:
Code:IF "%~n1"=="" ( echo You need to drag and drop VOB file onto this BAT file. & pause & exit) set DGIndex="D:\Downloads\FrostyBorders\dgmpgdec158\DGIndex.exe" set DGDecode="C:\Program Files (x86)\AviSynth+\plugins\DGDecode.dll" rem **************************************** echo Taking all VOB,s from dropped VOB title rem getting all VOB's of a title if a VOB from a title was dropped ******************************************** SET switch=VOB SET string=%~n1 SET temp_str=%string% SET str_len=0 :looptwo if defined temp_str ( SET temp_str=%temp_str:~1% SET /A str_len += 1 GOTO looptwo ) if %str_len% NEQ 8 (set switch=renamed_VOB) SET str=%~n1 set str=%str:~0,4% if "%str%" NEQ "VTS_" (set switch=renamed_VOB) SET str=%~n1 set str=%str:~6,1%f if "%str%" NEQ "_" (set switch=renamed_VOB) if "%switch%" EQU "renamed_VOB" goto index_mpeg rem create all possible title of VOB's for DGIndex - it will ignore files in they don't really exist set cislo=%~n1 set cislo=%cislo:~4,2% set VTS1=%~d1%~p1VTS_%cislo%_1.VOB set VTS2=%~d1%~p1VTS_%cislo%_2.VOB set VTS3=%~d1%~p1VTS_%cislo%_3.VOB set VTS4=%~d1%~p1VTS_%cislo%_4.VOB set VTS5=%~d1%~p1VTS_%cislo%_5.VOB set VTS6=%~d1%~p1VTS_%cislo%_6.VOB set VTS7=%~d1%~p1VTS_%cislo%_7.VOB set VTS8=%~d1%~p1VTS_%cislo%_8.VOB :index_mpeg echo+ set name=dropped_title echo indexing video to get %name%.d2v if %switch% EQU VOB (%DGIndex% -IF=[%VTS1%,%VTS2%,%VTS3%,%VTS4%,%VTS5%,%VTS6%,%VTS7%,%VTS8%] -OF=[%~d1%~p1\%name%] -TN=%track_ID% -OM=1 -IA=5 -MINIMIZE -EXIT) if %switch% EQU renamed_VOB (%DGIndex% -IF=[%~d1%~p1%~n1%~x1] -OF=[%~d1%~p1\%name%] -TN=%track_ID% -OM=1 -IA=5 -MINIMIZE -EXIT) rem make avisynth script set script="%~d1%~p1\script.avs" echo LoadPlugin("%DGDecode%") > %script% echo MPEG2Source("%~d1%~p1\%name%.d2v") >> %script%
-
This works but only when i drop a single .VOB file in the bat.
When i drop multiple it only get's the first .VOB.
I would like to drop a folder containing all dvd files and play the dvd normally using VLC.
i know, but it also could prevent burn in images.
Similar Threads
-
can vlc player play folder of image sequence?
By Anonymous543 in forum Newbie / General discussionsReplies: 3Last Post: 18th May 2022, 13:25 -
MP4 won't play in VLC, but opens in other players - how do I convert this?
By Daemach in forum Video ConversionReplies: 2Last Post: 3rd Nov 2020, 15:41 -
.mp4 cant play on WMplayer. Tried to change container and work. How to bat?
By luiza in forum Newbie / General discussionsReplies: 0Last Post: 3rd Oct 2019, 12:03 -
MPEG 2 Extension for VLC? (VLC can't play its own recordings?!?!)
By gastrof in forum Newbie / General discussionsReplies: 17Last Post: 16th Dec 2018, 23:06 -
VLC cannot play MPEG-2 (.mpg) file (VLC cannot identify the audio or ...)
By Jeppe in forum Software PlayingReplies: 6Last Post: 30th Jan 2018, 19:47