ffmpeg multiple files dimensions change

1

I saw a post on superUser on changing dimensions of a mp4 file which like this FFmpeg -I Input.mp4 -vf scale=460:690 output.mp4 but I want to change dimensions of multiple mp4 files in one go so I used the idea which has been used in concat command to generate a list of file names and then using command FFmpeg -i mylist.txt -vf scale=460:690 img%04d.mp4 but as in concatenation there's a single output file so for multiple outputs I used wildcard and whole command turned out like FFmpeg -I mylist.txt -vf scale=460:690 img%04d.mp4 but still I'm getting a single output file.So any suggestions, please

hacker red

Posted 2016-05-14T16:25:23.343

Reputation: 33

Answers

0

I want to change dimensions of multiple mp4 files in one go

You can use a for command to loop and convert the files one at a time. Something like the following.

command line:

for /f %i in (mylist.txt) do FFmpeg -I "%i" -vf scale=460:690 "output_%i"

batch file:

for /f %%i in (mylist.txt) do FFmpeg -I "%%i" -vf scale=460:690 "output_%%i"

Further Reading

DavidPostill

Posted 2016-05-14T16:25:23.343

Reputation: 118 938

I'm doing everything alright but error is file: no such file or directory – hacker red – 2016-05-14T17:35:38.523

@hackerred Are there spaces in your filenames? See updated answer. – DavidPostill – 2016-05-14T17:44:37.753

no they are named numerically like from 1 to 100 – hacker red – 2016-05-14T21:02:24.603

They are like this.I'm using a .bat to generate all file names inside a directory '1.mp4' '1.mp4' '10.mp4' '10.mp4' '100.mp4' '100.mp4' '101.mp4' '101.mp4' '102.mp4' '102.mp4' – hacker red – 2016-05-14T21:10:21.063

Here's a screenshot [link]http://s32.postimg.org/dlgy71cdx/Screenshot_34.png

– hacker red – 2016-05-14T21:13:07.000

@hackerred Remove the 's – DavidPostill – 2016-05-14T21:53:17.417

thanks man everything working just that output file names are repeating and I'm being prompted to replace existing file name and file name collisions are occurring in output file names – hacker red – 2016-05-14T22:15:34.490

@hackerred <shrug> I don't know ffmeg. You need to figure out how to correctly specify the output file name you want. – DavidPostill – 2016-05-14T22:28:12.740

@hackerred Use -i-, not -I. – llogan – 2016-05-15T16:29:51.727

@LordNeckbeard already doing that but thanks for pointing out – hacker red – 2016-05-24T20:34:17.350