VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member steptoe's Avatar
    Join Date
    Sep 2002
    Location
    United Kingdom
    Search Comp PM
    I've tried hunting for batch scripts, just a simple one to start me off so I can change it bit by bit for my needs and future

    Basically, convert an entire folder from AVI to MP4 without recoding. Simple as possible get the input file and convert to MP4 format keeping original video and audio

    If possible with a file requester so I can choose what files to add to the batch list without having to manually enter the folder location


    Thanks for any suggestions



    Another batch script I'm looking for is to read any video file, use FFMPEG to increase the volume and save it back out again
    Quote Quote  
  2. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Windows example:

    Code:
    @echo off
    rem Drop one or more files on this batch file for processing.
    set outPath=c:\converted_mp4\
    :Next
    if [%1]==[] goto:eof
    ffmpeg -i %1 -c copy "%outPath%~n1.mp4"
    shift
    goto Next
    Quote Quote  
  3. Member
    Join Date
    Nov 2009
    Location
    United States
    Search Comp PM
    While short, the BAT file above isn't all that "simple" because the BAT language is antiquated. You're better off learning PowerShell than trying to figure out what the shift command does. I have a PowerShell script that converts videos to MP4, and if they are already Chromecast compliant, simply remuxes to the MP4 container using FFmpeg:

    https://forum.videohelp.com/threads/379314-Convert-Videos-for-Playing-on-Chromecast-Po...pt#post2450836
    Quote Quote  
  4. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Oh dear, I am terribly sorry for offering that little script with the complicated shift command. Your one hundred and forty-two lines of PowerShell must be so much simpler.
    Quote Quote  
  5. Member
    Join Date
    Nov 2009
    Location
    United States
    Search Comp PM
    JVRaines, I am not trying to pick a fight with you - your script is fine. My point is, once you get beyond the very basics, the BAT language is a barrier. I have written many BAT scripts and got pretty good at it. I tried to write my script in BAT language and failed. At that point I learned PowerShell, and am glad I did.
    Quote Quote  
  6. Originally Posted by JVRaines View Post
    Windows example:
    Code:
    "%outPath%~n1.mp4"
    change into
    Code:
    "%outPath%%~n1.mp4"
    Quote Quote  



Similar Threads

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