What is wrong with my ffmpeg command?

0

I use this command to try to transcode a video file (video h264 high 10 to h264 high and copy all the rest) but it keeps giving me the error Unable to find a suitable output format for 'copy' copy: Invalid argument

The command I use is ffmpeg -i $1 -c:v libx264 -crf 20 -profile:high -c:a copy -c:s copy -c:t copy $2

What is wrong with this command?

Captain Bengali

Posted 2018-01-07T23:37:52.967

Reputation: 3

Try dropping the -profile option and use the -f option (e.g. -f mp4) after -c:t copy and just before $2. – Anaksunaman – 2018-01-08T03:16:42.977

Answers

1

Your command contains -profile:high which is parsed by FFmpeg as an option name. Thus, -c:a is parsed as its value. So, the next copy, now seen as unpaired, is treated as the output name. Since it has no extension, FFmpeg can't discern the output file format.

The correct syntax for profile is -profile:v high

So use

ffmpeg -i $1 -c:v libx264 -crf 20 -profile:v high -c:a copy -c:s copy -c:t copy $2

Gyan

Posted 2018-01-07T23:37:52.967

Reputation: 21 016

can you take a look at my question : https://superuser.com/questions/1283764/ffmpeg-zoompan-filter-duration-option-not-working

– Muhammad Umer – 2018-01-09T04:47:48.790