video encoding – How to “mimic” -c copy when using filters with ffmpeg? Is there a built-in feature or I’ll need some scripting?

I’m aware that any stream ffmpeg processes is decoded before applying any desired changes and then re-encoded, which means the stream in question can’t simply be copied with -c copy.

Still, I’m not yet very knowledgeable on dealing with media files. Currently, the single issue I’m addressing is cropping black bars from the sides when 4:3 is encoded as 16:9.

That’s fairly simple, and I quickly managed to get it going.

Then I noticed some weird stuff via mediainfo and the explorer’s side panel. Stream sizes, bitrates and some other details were different than expected.


That’s where -c copy comes in. Over the years, every time I tried to solve this, answers would stop at “-c copy can’t be used if the stream will be decoded”, which is good enough to stop noobs like me from wasting time.

But since I don’t know how to use advanced encoding settings, the -c copy I’m looking for is actually how can I re-encode my processed stream using the same (or most similar) settings used before I decoded it.

Is there such an option in ffmpeg? Are these settings I’m looking for even obtainable by any means? And if “no” and “yes”, could I use a tool(set) such as ffprobe, mediainfo or mkvtoolnix to write a script for this?

BTW, I’m on Windows 11, but I have Git’s SCM tools available.

Read more here: Source link