VideoHelp Forum
+ Reply to Thread
Results 1 to 18 of 18
Thread
  1. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    Does anyone use a video conversion software tool that can first search all local hard drives for avi files, build/save a list that is easily imported into a batch encoder that convert to mpg2?

    Any platform will do, windows would be the most convenient for my current need

    I have 3200 avi files to index and convert spread across 5 different drives

    Thanks
    Quote Quote  
  2. From the command line:

    dir /s /b x:\*.AVI >list.txt

    Replace x with the drive in question. That will create a file called list.txt with all the AVI files with bare (no file size, etc.) pathnames. Like:

    C:\Movies\My Favorite Movie.avi
    C:\Movies\My Second Favorite Movie.avi
    Last edited by jagabo; 17th Nov 2010 at 12:56.
    Quote Quote  
  3. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    Thanks, I know how pipe dir to a list, but what I need is a software that can import the txt file? TMPEG for example won't read a text file? it seems to have it's own proprietary file format that can only be saved after you add files manually inside the batch conversion tool


    conceptually I'm seeking software something like picassa for video that will index the avi then let me select batch conversion of all to a specific format

    I appreciate the quick reply
    Quote Quote  
  4. Member
    Join Date
    Dec 2005
    Location
    Canada
    Search Comp PM
    I did something similar to convert a bunch of files from a list using a bat file and ffmpeg.

    c:\list.txt was the file list generated per jagabo

    c:\avilist.bat parsed the .txt file and copied the avi files to the same folder as ffmpeg

    for /F "delims=" %%a in (C:\list.txt) do (
    xcopy /Y "%%a" c:\bin
    )
    c:\bin\ffmpeg2avi.bat fed each avi to ffmpeg and then deleted it

    @echo off
    for %%a in ("*.avi") do call :go_now "%%a"
    if %%a not==("*.avi") goto eof
    :go_now
    echo processing %~n1.avi
    Rem next line creates dvd compliant mpeg
    ffmpeg -i "%~dpn1.avi" -target ntsc-dvd -aspect 16:9 -sameq "%~dpn1.mpg"
    Rem delete avi file
    del /q "%~dpn1.avi"
    Quote Quote  
  5. I've never used it but look at HCbatchGUI.
    Quote Quote  
  6. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    Thanks for the tips again. I will check out the tools.

    I like the scripted solution except I'm trying to avoid moving any of the avi files as they are attached to Adobe Premier projects and that will render the projects useless and time consuming to rebuild
    Quote Quote  
  7. His batch file doesn't move the original files. It copies them, performs the conversion, then deletes the copies. You should be able to modify his batch file to eliminate the copying and deleting.
    Quote Quote  
  8. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    I will give this a shot over the weekend and leave a post on how it worked -
    looks very straight forward thanks
    Quote Quote  
  9. This is a small modification of sambat's batch file that will encode all the files in LIST.TXT. The resulting MPG file is in the same folder as the original file. Change the path to ffmpeg to suit your system. I set it to two threads since I was testing on a dual core system.

    @echo off
    for /f "delims=" %%a in (list.txt) do call :go_now "%%a"
    if %%a not==("*.avi") goto eof
    :go_now
    echo processing "%~f1"
    Rem next line creates dvd compliant mpeg
    "g:\program files\ffmpeg\bin\ffmpeg" -i "%~f1" -target ntsc-dvd -aspect 16:9 -sameq -threads 2 "%~dpn1.mpg"
    This script converted a 23.976 fps video to a 29.97 fps MPG file by duplicating every 4th frame. I would normally encode at 23.976 fps progressive with 3:2 pulldown flags. I assume ffmpeg can do that. But this type of issue makes batch processing like this unacceptable to me. I fine tune the encoding for each file.

    Here's another little trick. Put this in a batch file in your SendTo folder. Name it something like ffmpeg2dvd16x9.bat. Now you can right click on any video file and convert it to MPG via the Send To menu option.

    "g:\program files\ffmpeg\bin\ffmpeg" -i "%~f1" -target ntsc-dvd -aspect 16:9 -sameq -threads 2 "%~dpn1.mpg"
    Again, modify the path to ffmpeg for your system.
    Last edited by jagabo; 19th Nov 2010 at 22:42.
    Quote Quote  
  10. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    Thanks for the post. I tried out these scripts today with great success. I am in the process of batch encoding 1200 AVI files

    The originals are 720x480 at 4:3 -----

    The quality is not what I was hoping for, but the purpose is to allow several of us to collaborate on the video and rough edit together new storyboard ideas

    We will use the original files for our finished product, but this will give us small files to play with in a sandbox

    If you have any more suggestions, I am open ---

    Next phase of the project is a search for decent NAS media server software? I need a way to organize and server these files up through a web browser. Here is what I want to be able to browse and manipulate:

    Thanks again: 1400 mp3's ---14,000 JPG's and 1200 AVI's
    Quote Quote  
  11. I don't know if you noticed, I added a bit more to my last post.

    Originally Posted by elliotwilcox View Post
    Thanks for the post. I tried out these scripts today with great success. I am in the process of batch encoding 1200 AVI files

    The originals are 720x480 at 4:3 -----

    The quality is not what I was hoping for
    You might try using HcEnc instead. I tried a few DV AVI files and found that HcEnc does a little better job of MPG conversion than ffmpeg. But you'll have to generate an AVS script for each file. If all your files are the same format that shouldn't be too difficult.
    Quote Quote  
  12. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    Thanks again, yes I saw the update to your previous post
    Quote Quote  
  13. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    BTW- after much trial and error, the simplest and most effective software that I found to share all of this media with a team is:

    opera unite -

    A simple plug-in to the Opera browser allows me to share all of this data across my LAN and individual files can be shared via a password protected web site---

    Thanks again to those who helped me here
    Quote Quote  
  14. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    I did end up using this code to copy 1157 avi files to an external USB drive:

    for /F "delims=" %%a in (C:\list.txt) do (
    xcopy /Y "%%a" c:\bin
    )

    It worked great but but my list contained 1157 avi files and 839 were copied. the reason is because of duplicate filenames? any way to use this method to avoid overwriting duplicates, instead renaming duplicates so I wind up with all 1157?

    thanks
    Quote Quote  
  15. Member
    Join Date
    Dec 2005
    Location
    Canada
    Search Comp PM
    I can't think of an easy way to do it with a bat file.
    Maybe using one of the duplicate file finders and renamers that are out there.
    Quote Quote  
  16. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    thanks, I found a duplicate file finder that allows me to export a list as a text file

    I will then use the xcopy bat file with the /S option so the directory gets created, that should prevent the overwrite
    Quote Quote  
  17. Member
    Join Date
    Nov 2010
    Location
    San Francisco
    Search Comp PM
    I was able to copy and paste the sort script from the URL below into a shell script and run it against my dir.txt file of avi's on Ubuntu :

    http://tldp.org/LDP/abs/html/textproc.html
    example 16.12 Word Frequency analysis
    it told me most of my duplicates started with the word "Untitled"
    I re-ran the dir script on XP using *Untitled* and xcopied the output to my USB drive. I think I got most of my duplicates files now
    Quote Quote  
  18. If you just need to copy all the files (rather than only those in the list file) you can use the XCOPY command, specifying a folder in the destination. XCOPY will duplicate the folder structure of the source drive in the specified folder of the destination drive. For example

    XCOPY /s C:\*.AVI E:\BIN

    will result in C:\MOVIES\NAME.AVI being copied to E:\BIN\MOVIES\NAME.AVI.
    Quote Quote  



Similar Threads

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