How can I make the output format of a video the same as the input format for general case?

avconv -i source -vcodec copy -acodec copy -movflags empty_moov -f ??? output

I would not like to use -f with a specific value and how to prevent avconv from whatever extension to deduce format.



for file in *
avconv -i $file -vcodec copy -acodec copy -movflags empty_moov \
-f "${file##*.}" output

You could also use ${file#*.} if the path need not be stripped.

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.