[FFmpeg-user] Extract all audio regardless of stream/channel count

Cley Faye cleyfaye at gmail.com
Sat Feb 11 03:24:49 EET 2017


2017-02-10 12:40 GMT+01:00 Carles Vila <cvilad at gmail.com>:

> If you could give me a starting point, I could probably figure out.


​This comes with no guarantee, no documentation and very minimal testing,
but since you asked about a starting point...

I put up a small python script that take a file with many streams, detect
audio streams, output mono streams as single output file and stereo streams
as two files, all in one pass.
The script doesn't test for any cornercase, so there.

Even if it's not exactly fit for your task, it shows how you can easily
retrieve the output of ffprobe and produce a minimal ffmpeg command line.
http://pastebin.com/C53fqZG7


More information about the ffmpeg-user mailing list