VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. so here is my script to loop through specific video extensions » add a manual profile » generate necessary *.bat & finally a final 'loader' batch file to execute previous *.bat files sequentially & necessary logging (this gives quiet a deal of freedom if you so want)

    Code:
    ::==
    :: gets lines into vars c1 v2 v...
    @echo off
    :: user input required
    cd /d "d:\Trainers\out\"
    setLocal EnableDelayedExpansion
    dir /B /O:N | findstr ".wmv$ " >filename.txt
    echo. >log.txt
    :: user input required
    for /f "tokens=* delims= " %%a in ('type filename.txt ^|findstr ".wmv$"') do (
    set /a n+=1
    echo. >file!n!.bat
    set in=%in%%%a
    :: user input required
    set out=!in:.wmv=.mp4!
    :: user input required
    set v=x264 --crf 23  --level 3.1 --tune film -o "d:\Trainers\out\!in!" "d:\Trainers\out\!out!"
    echo. !v!>file!n!.bat
    )
    dir /B /O:N | findstr ".bat$ " >x264_home.txt
    for /f "tokens=* delims= " %%a in (x264_home.txt) do (
    set /a n+=1
    :: mtee is an external library Google it
    set "z=call %%a | mtee /d/c/t/+ log.txt"
    echo. !z! >> x264_home.bat
    )
    echo. @echo off > newFile.bat
    type x264_home.bat >> newFile.bat
    type newFile.bat > x264_home.bat
    del newFile.bat,x264_home.txt,filename.txt
    echo. pause >> x264_home.bat
    echo. @echo All Operation done... >> x264_home.bat
    :: user input required
    move "d:\Trainers\out\*.bat" "d:\Program Files\x264_auto\test\"
    :: user input required
    move "d:\Trainers\out\log.txt" "d:\Program Files\x264_auto\test\"
    ::==
    Now the above code which is fairly easy to understand (bcz its written by a noob) run perfectly & create necessary files. For instance one of the file1.bat looks like this:
    Code:
    x264 --crf 23  --level 3.1 --tune film --preset veryslow --deblock -2:-1 --zones 24233,25324,q=20 --acodec aac --abitrate 80 -o "d:\Trainers\out\1.wmv" "d:\Trainers\out\1.mp4"
    ...& the loader .bat file looks like
    Code:
     @echo off 
     call file1.bat | mtee /d/c/t/+ log.txt 
     call file2.bat | mtee /d/c/t/+ log.txt
     call file3.bat | mtee /d/c/t/+ log.txt
     @echo All Operation done...
    You see this is a quiet flexible approach in that you can change filestr » set another loop » set another profile
    I am successful because there is no error in any output ...but its the x264.exe (provider/compiler x264GUI) throws error which it otherwise don't?
    Code:
    d:\Program Files\x264_auto\test>x264 --crf 23  --level 3.1 --tune film --preset
    veryslow --deblock -2:-1 --zones 24233,25324,q=20 --acodec aac --abitrate 80 -o
    "d:\Trainers\out\1.wmv" "d:\Trainers\out\1.mp4"
    ffms [error]: could not create index
    lavf [error]: could not open input file
    raw [error]: raw input requires a resolution.
    x264 [error]: could not open input file `d:\Trainers\out\1.mp4' via any method!
    its the x264 thats the culprit perhaps a senior guide is required here
    Quote Quote  
  2. --abitrate --acodec --o WMV

    I may not have the latest build but the version that I have doesn't like any of those option.
    Last edited by jagabo; 23rd Oct 2012 at 06:45.
    Quote Quote  
  3. Ok the problem has been resolved & am successful at getting automation sequence. More details here:
    http://khanzmusing.blogspot.com/2012/10/automating-sequencing-logging-beauty-of.html
    Quote Quote  



Similar Threads

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