1

I have 20 music videos in one folder and I want to change the quality from 1080p to 720p with ffmpeg, because I'm tired of having to convert every single file.
So I want to ask for a solution how to convert a complete folder 1 to 720p quality with destination folder 2?
I previously used this ffmpeg script

ffmpeg -i video1.mp4 -vf scale = 1280:720 -acodec aac -strict -2 output1.mp4
ffmpeg -i video2.mp4 -vf scale = 1280:720 -acodec aac -strict -2 output2.mp4
ffmpeg -i video3.mp4 -vf scale = 1280:720 -acodec aac -strict -2 output3.mp4

up to 20 times

I use ffmpeg on ubuntu 16.04

3

Let me restate your problem. You wish to:

  1. process all the files named video?.mp4
  2. generate an output filename output?.mp4
  3. process the input file to the output file. for i in video?.mp4 ; do outfile="output${i##video}" ffmpeg -i "$i" -vf scale=1280:720 -acodec aac -strict -2 "$outfile" done

Read man bash

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.