[FFmpeg-user] Large Sized output files recieved while encoding the audio
cpz at tuunq.com
Thu Apr 21 19:47:02 EEST 2022
On 4/21/2022 8:38 AM, Shubham Tiwari wrote:
> Does ffmpeg always convert the audio file while running the filter? if not,
> in what cases does it skip the conversion?
Most (all?) filters must operate on uncompressed data, so it depends
entirely on what filters are being used-
https://ffmpeg.org/ffmpeg-all.html#Detailed-description tells us:
"ffmpeg calls the libavformat library [...] to read input files and get
packets containing encoded data from them. [...]
Encoded packets are then passed to the decoder (unless streamcopy is
selected for the stream, see further for a description). The decoder
produces uncompressed frames (raw video/PCM audio/...) which can be
processed further by filtering (see next section). After filtering, the
frames are passed to the encoder, which encodes them and outputs encoded
packets. Finally those are passed to the muxer, which writes the encoded
packets to the output file."
If you are converting from one encoding to another (e.g. opus to mp3), the
data must be decoded/uncompressed in order to re-encode to the other.
If a filter makes any change to the raw data (like adjusting the volume
level), the data must be decoded/filtered/re-encoded so the filter can
Remember that -container- and -encoding- are different things; as shown, a
wav container is holding opus encoding but usually it holds PCM/un-encoded
audio. A Matruska container (mkv/mka) can hold a lot of different encodings.
It's possible to copy an encoded stream between compatible containers, but
that's an exact -copy-.
All of this is in the existing ffmpeg documentation.
More information about the ffmpeg-user