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:
https://stackoverflow.com/questions/54613952/ffmpeg-check-audio-channels-for-silence
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 09: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, marcorocchini -
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.
Similar Threads
-
Need help to find new BBC World Service live audio stream
By jimdagys in forum Video Streaming DownloadingReplies: 19Last Post: 27th Sep 2021, 14:15 -
FFMPEG Save video from rtsp stream to hls stream
By Wisperrio in forum Video Streaming DownloadingReplies: 2Last Post: 26th Aug 2021, 22:38 -
Correct syntax for downloading video and audio with ffmpeg
By dzigelbaum in forum Video Streaming DownloadingReplies: 1Last Post: 15th Mar 2021, 06:47 -
How to find the name of the audio devices on windows 10 with FFmpeg?
By Valit in forum Newbie / General discussionsReplies: 0Last Post: 7th Apr 2020, 07:34 -
auto-select audio/subtitle stream when processing a video via ffmpeg
By mrjayviper in forum Video ConversionReplies: 5Last Post: 17th Nov 2017, 16:34