VideoHelp.com Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Hope this can help someone else out. I wrote a simple batch file to convert all of my DVD's in VOB format to mpg's. It will simply run through looking for all VIDEO_TS.IFO files, then go back a couple directories to get the name of them, in my case it is teh Movie name and before that a "genre" folder.

    I tried to not hard code too much so by changing the SET variables it should accommodate most. Just save the code below to a .bat file and run it.

    I am not a "programmer" by any means, and wrote it for me but decided to comment it up a bit and make it easy for most to use should they decide it to be useful. If you have any ideas to make it better, please do so, or even post the ideas here for all to use.

    I will answer any questions the best I can.

    Code:
    @echo off
    :: ONLY TESTED ON VISTA 32bit, test yourself before running, script provided as is.
    :: I wrote this so I can not only convert my VOB's to MPG, but I wanted to use it in 
    :: a playlist with Media Browser - mediabrowser.tv - and the movie needs to be 1 number
    :: higher than my home theater intro so I add a 01 to the end of all movies I convert.
    :: You may remove that if you wish. Search and replace %%b-01.mpg with %%b.mpg
    
    :: *** TO USE ***
    :: Change the 3 SET lines below to match your environment
    :: This assumes the existing DVD directory structure is like M:\Movies\subfolder\**Movie Name**\VIDEO_TS\VIDEO_TS.IFO
    :: To actually run the VOB2MPG program, remove the "echo" from the front of the last line. 
    :: the echo is there to show you what the command will actually do when run, no changes 
    :: are made with the echo in front, also you may remove the pause once you are comfortable
    :: with it running otherwise you have to manually press a key to continue to the next DVD
    :: once processing is complete on a DVD.
    
    :: My directory structure example:
    :: M:\Movies\Comedy\Click\VIDEO_TS\VIDEO_TS.IFO
    :: M:\Movies\Anime\Kite\VIDEO_TS\VIDEO_TS.IFO
    
    SET MOVIEDRIVE=M:
    SET MOVIEPATH=M:\Movies
    SET VOB2MPGPATH=C:\VOB2MPG PRO
    
    
    :: CHANGE TO THE DRIVE AND BASE PATH WHERE THE MOVIE DIRECTORIES ARE STORED
    %MOVIEDRIVE%
    CD %MOVIEPATH%
    
    
    :: GET LIST OF ALL FOLDERS CONTAINING A VIDEO_TS.IFO FILE AND LOOP THROUGH EACH
    FOR /f "tokens=3-4 delims=\" %%a in ('dir VIDEO_TS.IFO /s') DO (
    echo +++++++++++
    echo Processing:
    echo Genre=%%a
    echo Movie Name=%%b
    echo.
    
    :: CHECK TO SEE IF DIRECTORY HAS ALREADY BEEN PROCESSED, IF SO SKIP IT AND MOVE ON
    IF EXIST "%MOVIEPATH%\%%a\%%b\%%b-01.mpg". (
    ECHO File %%b-01.mpg already exists.
    	)ELSE (
    	 echo "%VOB2MPGPATH%\VOB2MPG.EXE" /v="%MOVIEPATH%\%%a\%%b\VIDEO_TS\VIDEO_TS.IFO" /o="%MOVIEPATH%\%%a\%%b\%%b-01.mpg" /MainTitle
     	)
    
    pause
    echo.
    )
    Quote Quote  

  2. Member
    Join Date: Sep 2009
    Location: United States
    Thank you very much for this!!
    Quote Quote  

  3. Member
    Join Date: Oct 2009
    Location: Canada
    Thank you so much for the work on this code and it looks like exactly what I am looking for. However, I have no idea what to do with the code you have supplied. I can figure out how to change the parameters from your commenting but after that I am not sure where or what to do with the code. I am using the pro version but don't see an area for dropping in command line code. I am really sorry for my ignorance.

    Cliff
    Quote Quote  




Similar Threads

  1. Replies: 2
    Last Post: 26th Feb 2012, 12:11
  2. Command line convert mpg to mp4
    By csc12345678 in forum Video Conversion
    Replies: 1
    Last Post: 30th Dec 2010, 09:11
  3. Replies: 1
    Last Post: 23rd Feb 2010, 13:44
  4. Replies: 2
    Last Post: 23rd Feb 2010, 12:42
  5. Using ffmpeg command line to convert a .vob(DVD) to avi/mpeg
    By alfo666 in forum Newbie / General discussions
    Replies: 1
    Last Post: 13th Sep 2009, 03:14
Search   Contact us   About   Advertise   Forum   RSS Feeds   Statistics   Tools