I know about the
-c copy switch with ffmpeg, but this does not work with filters as it means "don't re-encode". But what I want is to have my output use the same stream formats as my input. So if I scale and remux some file "input.avi" at 1920x1080 to "output.mp4" at 1280x720 I want the video and audio streams to be in the same format (i.e. re-encoding is OK but don't use a different codec).
Currently I need to specifically choose the codecs otherwise ffmpeg will use some default codecs based on the container--not based on my input formats. Is there any switch for this?
Note that I want to retain the formats, the specific encoder is not really important. E.g. As long as I can get H264 I don't care if it uses libx264 or some other 'competitor'.
On a side note, does ffmpeg has a command to list the defaults per container, or is it only available in external documentation?