VideoHelp Forum




+ Reply to Thread
Results 1 to 15 of 15
  1. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    I have 10,000 video galleries on my drive like this:


    Folder: GalleryOne 01.mpg 02.mpg 03.mpg
    Folder: GalleryTwo 01.mpg 02.mpg 03.mpg


    I need a program that will go into each folder, convert the mpegs to .wmv, and dump them into the same folder.. so that it would turn out to be like this

    Folder: GalleryOne 01.wmv 02.wmv 03.wmv
    Folder: GalleryTwo 01.wmv 02.wmv 03.wmv
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    You could do it with ffmpeg and a batch script. Means WMV2 though since ffmpeg can only decode WMV3, VC1, etc. not encode them. Not sure if MS offer any commandline utils. Possible a VBScript.
    Quote Quote  
  3. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    Can I get VDUB or STOIK to do it you think?
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    VDub can't output wmv files. No idea about stoik. What you really want is a command line app. Then you can run a recursive for *.mpg loop on that would process all the mpg files, outputting wmv files with the same name in the same folders.
    Quote Quote  
  5. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    It doesn't have to be .wmv... so long as they are re-encoded..

    I don't know how to run a recursive over here
    Quote Quote  
  6. What is your goal or purpose in re-encoding? Reduce size, compatibility, what?

    Are you aware the visual quality will be worse with any re-encode?

    If you go to the commandline and type "dir *.mpg /s" you have done a recursive directory search. It is not hard, you just have to figure out the big words.
    Quote Quote  
  7. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    If it doesn't have to be wmv, then what is wrong with mpg? You have to have some kind of criteria.

    Basically just for /R %%f in (*.mpg) DO (whatever.exe "%%f" "%%~nf.whatever")

    Runs whatever command you create for each mpg file with the /R making it recursive so if you start in the root folder, it will do the lot.

    Run for /? for full info.

    ffmpeg -formats will give you a list of supported output formats. If you just want smaller files, then x264 would be a good option.
    Quote Quote  
  8. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    Sorry about that,
    To be more clear - they can be just any format so long as the filesizes change. I don't care if they're bigger or smaller.
    Quote Quote  
  9. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    So I replace *.mpg with the folder I have the galleries in? (c:\galleries\*.mpg)

    And then the whatever.exe becomes something like
    converterappname.exe command to send to program

    ?
    Quote Quote  
  10. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    No *.mpg stays, you just run the batch in c:\galleries

    Yeah whatever.exe could become ffmpeg.exe -i "%%f" -vcodec wmv2 -acodec mp3 "%%~nf.wmv"
    of course you'd want to at least set the bitrates or something.
    Quote Quote  
  11. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    Ah, I see,
    Would I have to put the program executable in that same folder at the .bat file.. or could I path to it?
    Quote Quote  
  12. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    exe can be anywhere. Don't forget quotes if it is in say program files though.
    Quote Quote  
  13. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    What do you need quotes for.. is that in case of a filename with spaces in it? I probably would tilde one it because I am lazy (some times)
    Quote Quote  
  14. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    What is a good command line program to use?
    Quote Quote  
  15. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM

    for %%f in (*.mpg) do ffmpeg.exe -i "%%f" -vcodec wmv2 -b 768 -acodec mp3 -y "%%~nf.wmv"


    1)Save the line above into a file called Process.bat Make sure it ends up with a .BAT extension and not a .txt extension. If it does, rename it and give it a .bat extension only.



    2)Create a test folder and copy a few of your mpg files into it. Place your Process.bat file into the same folder.

    3) Do you have ffmpeg.exe already ? place it into the same test folder as well. Again, this is only a rehearsal for the real thing, but you'll get to see what your WMV files will look and sound like, and you'll ensure things actually work.

    4) Double click on process.bat and away she goes....
    Quote Quote  



Similar Threads

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