1

Is there a chance that ffmpeg will recognize that a audio track isn't empty and then only will export these non empty tracks?

for example: I have a video file with 2 stereo tracks and only on the second left channel is audio, so I just need this mono track.

I'm currently using this, but here I'll get both channels:

-filter_complex "[0:1]pan=1c|c0=c0[left];[0:1]pan=1c|c0=c1[right]" -map "[left]" "%%~na_left.wav" -map "[right]" "%%~na_right.wav"
4
  • Not directly possible. What you can do is export to a lossless format like FLAC. Truly silent tracks will end up being very small. You can delete them in one go.
    – Gyan
    Jan 20, 2017 at 12:11
  • Maybe parse astats output. However, it would work best scripted and you would end up with multiple commands (one to "scan", one to export). Or be lazy and just downmix everything into mono: the silent channels wouldn't matter.
    – llogan
    Jan 23, 2017 at 7:31
  • thank you so far. Yes, I've already thought that I'll need to script first "scan" and than export. But my scripting skills a sadly to bad for that :( It seems like I have to find someone who can script me that.
    – Michael
    Jan 23, 2017 at 10:43
  • What's your OS and preferred scripting language?
    – llogan
    Jan 24, 2017 at 22:32

0

You must log in to answer this question.

Browse other questions tagged .