VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. 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:

    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
    When i drag a MKV on the bat-file VLC opens, and plays the video using the FrostyBorders AviSynth script.

    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.

    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
    I think if i can get this to work maybe then use the code above to open it in VLC.
    And how do i check what file is in the folder?
    Can anybody help me with this?
    Thanks!
    Last edited by Desz5; 26th Aug 2022 at 07:09.
    Quote Quote  
  2. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Why ?

    VLC plays dvds 'out of the box'


    Just click on open >> select disk (even if the 'disk' resides as a .ts folder on your HDD). Browse to the the .ts folder. Click on play. Done !
    Quote Quote  
  3. 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:
    Image
    [Attachment 66447 - Click to enlarge]
    Last edited by Desz5; 26th Aug 2022 at 10:53.
    Quote Quote  
  4. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    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.
    Quote Quote  
  5. 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%
    I do not have 64 bit DGDecode.dll so I could not test playback, but it was indexing, could not verify if all title VOBs
    Quote Quote  
  6. 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.



    Originally Posted by DB83 View Post
    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.
    i know, but it also could prevent burn in images.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!