Hi, I have a problem converting some videos that have the audio in audio stream #2 instead of audio stream #1.
I've seen here a way to check if an audio stream is silent:
Using this to see the audio stream #1:
ffmpeg.exe -i FILE -map 0: a: 0 -af astats -f null -
then the result of "RMS level dB" can be obtained, and that if it indicates "-inf" or a value typically below -30 dB, it indicates that this audio stream is silent.
The problem is that "-inf" never appears and streams with audio often give very low values. For example I have set the threshold to -35 dB and I have some videos that give -50 dB and have audio. And others that have higher values with no audio. So I can't trust this system.
Is there any other way or tool to see which audio stream is correct? Thank you.
+ Reply to Thread
Results 1 to 6 of 6
If the audiostream doesn't have a language tag, you can simply extract it and listen to it with any player.
Then you will know if it is the right stream.
Use clever FFmpeg-GUI, load your video and after a short analysis you will see all included streams. If you still don't have enough information, click main, click extract audio stream, select stream 1, click extract audio, listen to the new created file, then extract audiostream2 and so on.
[Attachment 62007 - Click to enlarge]
Last edited by ProWo; 25th Nov 2021 at 10:22.
Thanks ProWo, but I can't do it manually, it's a transcoder that has to process hundreds of videos daily. I need to automate it.
Not sure whether it helps, but sox also has different audio analysis options,...users currently on my ignore list: deadrats, Stears555
Thanks, I'm thinking about use -map 0 to transcode all the audio tracks. I have found some files with 4 audio tracks with the same audio in all, but with different volume level. Others with only one track working but in track 2 instedad 1... so I think it's better to transcode all.