Is there a way to tell ffmpeg and/or avconv to use for the output the same codec as the one the input is encoded with, but do the transcoding?
I'm looking for something like:
ffmpeg -i input.mp4 -vcodec same_as_input output.mp4
Note that I'm not looking for -vcodec copy
, as that would copy the stream without transcoding. I want it to do the transcoding but use the same codec the input file is encoded with.
Also, if possible, I'd like to have the same for every possible parameter, that is: use the same bitrate, frame size, etc, take the value for every possible parameter from one given input file, rather than using any other defaults.
The above example may seem stupid because it's oversimplified (the result would be the same as copying), but imagine I add some processing, e.g. a start time and length, or even something more complex such as adding an overlay image, but I want to make sure it's encoded with the same encoder (and possibly the same parameters) as the input file.