Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


This forum has not been maintained for a long time and will probably get deleted in the near future.
For faster responses to your questions, please use StackOverflow instead and tag your questions with "FFmpeg".
If you need a backup of the posts from this forum, please contact me directly.

Video with stereo sound - only one channel is audible.

Discussions about problems encountered using ffprobe.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

Video with stereo sound - only one channel is audible.

Postby mirij » Mon Oct 24, 2016 7:29 pm

Good day,

please, exist any chance to detect zero volume (no sound) in left or in right channel of stereo sound? Exist any program which can do it from commnad line?

I have .mp4 files with stereo AC3 sound and some of them is heard only left or right channel. Because I have a lot of .mp4 videos I need to find out this automatically from command line and then videos with this corrupted sound convert to mono sound.
mirij
 
Posts: 2
Joined: Mon Oct 24, 2016 7:14 pm

Re: Video with stereo sound - only one channel is audible.

Postby llogan » Mon Oct 24, 2016 9:36 pm

You could use the astats filter.

In this example the right channel (channel 2) is silent.

Code: Select all
$ ffmpeg -i input -af astats -f null -
...
[Parsed_astats_0 @ 0x55b5ab0946e0] Channel: 1
[Parsed_astats_0 @ 0x55b5ab0946e0] DC offset: -0.000004
[Parsed_astats_0 @ 0x55b5ab0946e0] Min level: -0.154948
[Parsed_astats_0 @ 0x55b5ab0946e0] Max level: 0.159515
[Parsed_astats_0 @ 0x55b5ab0946e0] Min difference: 0.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Max difference: 0.011351
[Parsed_astats_0 @ 0x55b5ab0946e0] Mean difference: 0.004958
[Parsed_astats_0 @ 0x55b5ab0946e0] Peak level dB: -15.943986
[Parsed_astats_0 @ 0x55b5ab0946e0] RMS level dB: -21.105533
[Parsed_astats_0 @ 0x55b5ab0946e0] RMS peak dB: -20.993459
[Parsed_astats_0 @ 0x55b5ab0946e0] RMS trough dB: -inf
[Parsed_astats_0 @ 0x55b5ab0946e0] Crest factor: 1.811663
[Parsed_astats_0 @ 0x55b5ab0946e0] Flat factor: 0.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Peak count: 2
[Parsed_astats_0 @ 0x55b5ab0946e0] Bit depth: 45
[Parsed_astats_0 @ 0x55b5ab0946e0] Channel: 2
[Parsed_astats_0 @ 0x55b5ab0946e0] DC offset: 0.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Min level: 0.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Max level: 0.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Min difference: 0.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Max difference: 0.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Mean difference: 0.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Peak level dB: -6153.053111
[Parsed_astats_0 @ 0x55b5ab0946e0] RMS level dB: -inf
[Parsed_astats_0 @ 0x55b5ab0946e0] RMS peak dB: -inf
[Parsed_astats_0 @ 0x55b5ab0946e0] RMS trough dB: -inf
[Parsed_astats_0 @ 0x55b5ab0946e0] Crest factor: 1.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Flat factor: -inf
[Parsed_astats_0 @ 0x55b5ab0946e0] Peak count: 177152
[Parsed_astats_0 @ 0x55b5ab0946e0] Bit depth: 0
[Parsed_astats_0 @ 0x55b5ab0946e0] Overall
[Parsed_astats_0 @ 0x55b5ab0946e0] DC offset: -0.000004
[Parsed_astats_0 @ 0x55b5ab0946e0] Min level: -0.154948
[Parsed_astats_0 @ 0x55b5ab0946e0] Max level: 0.159515
[Parsed_astats_0 @ 0x55b5ab0946e0] Min difference: 0.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Max difference: 0.011351
[Parsed_astats_0 @ 0x55b5ab0946e0] Mean difference: 0.002479
[Parsed_astats_0 @ 0x55b5ab0946e0] Peak level dB: -15.943986
[Parsed_astats_0 @ 0x55b5ab0946e0] RMS level dB: -24.115833
[Parsed_astats_0 @ 0x55b5ab0946e0] RMS peak dB: -20.993459
[Parsed_astats_0 @ 0x55b5ab0946e0] RMS trough dB: -inf
[Parsed_astats_0 @ 0x55b5ab0946e0] Flat factor: -98.946419
[Parsed_astats_0 @ 0x55b5ab0946e0] Peak count: 88577.000000
[Parsed_astats_0 @ 0x55b5ab0946e0] Bit depth: 45
[Parsed_astats_0 @ 0x55b5ab0946e0] Number of samples: 177152
Get an answer more quickly by providing your actual ffmpeg command and the complete console output. Use the code button to format your command and output or your question will be ignored.
llogan
 
Posts: 2354
Joined: Fri Jan 25, 2013 9:47 pm
Location: Alaska

Re: Video with stereo sound - only one channel is audible.

Postby mirij » Tue Oct 25, 2016 2:40 pm

Thank you.
mirij
 
Posts: 2
Joined: Mon Oct 24, 2016 7:14 pm


Return to ffprobe

Who is online

Users browsing this forum: No registered users and 1 guest