VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hi all,

    I have aprroximelty 70 mp4's in a folder and they all have a 20 second intro on them

    I am looking for the commands to make FFMPEG batch trim the first 20 seconds off each file.
    Thanks for any help.


    Daniel
    Quote Quote  
  2. I managed to batch trim all 70 of the files using ffmpeg

    the commands i used are;
    set ffmpeg="C:\ffmpeg\bin\ffmpeg.exe"
    for %f in ("*.mp4") do ffmpeg -i "%f" -ss 00:00:20.000 -c:v copy -c:a copy "trimmed\%f.mp4"
    Quote Quote  
  3. Member
    Join Date: Dec 2005
    Location: Canada
    Search Comp PM
    Not certain, but shouldn't a .bat filet have %% instead of a single %.
    Quote Quote  
  4. Member racer-x's Avatar
    Join Date: Mar 2003
    Location: 3rd Rock from the Sun
    Search Comp PM
    Originally Posted by taonas View Post
    I managed to batch trim all 70 of the files using ffmpeg

    the commands i used are;
    set ffmpeg="C:\ffmpeg\bin\ffmpeg.exe"
    for %f in ("*.mp4") do ffmpeg -i "%f" -ss 00:00:20.000 -c:v copy -c:a copy "trimmed\%f.mp4"
    That script wouldn't work when I tried it. However this one does. Create a folder named "trimmed" first and use correct path to ffmpeg:

    for %%a in ("*.mp4") do "C:\FFmbc\ffmpeg" -i %%a -ss 00:00:20.000 -c:v copy -c:a copy trimmed\%%a

    pause
    The memories of a man in his old age, are the deeds of the man in his prime.......
    Quote Quote