Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 ASP

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th March 2021, 20:55   #1  |  Link
Kaos-Industries
Registered User
 
Join Date: Feb 2019
Posts: 26
Why is my YouTube video's audio broken on 20-50% of mobile devices?

Hi,

A few hours after I uploaded an FFmpeg-encoded YouTube video, the few people that I had sent it to started reporting a strange issue: that the first 26 minutes of the audio sounded very distorted; some have described it as sounding like it's underwater. Here's an example of what it sounds like.

I then started testing with more people, and came up with the following data from a total of 31 mobile devices.

Normal Audio:

Galaxy S10 (x2)
Galaxy S20 (x3)
Galaxy A50
iPhone XR (x3)
iPhone 7
iPhone 8 (x2)
iPhone 10 Pro
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 12 (x3)
iPhone 12 Pro
Oppo F11
OnePlus 7T
Pixel 3A XL
OnePlus 7 Pro

Distorted Audio:

iPhone 6S
Galaxy S7 Edge
Galaxy S8+
Galaxy S10 Lite
Huawei Y6 2019
Huawei P30 Pro
Honor 10 Lite

The audio for those first 26 minutes is broken for 7 out of 31 mobile devices, so 22%, and this increases to more than 50% when only Android phones are included. Most of those I asked were based in developed countries, which means that the data also skews towards newer, more modern phones, which means that figure could easily be closer to 80% in less developed countries that primarily use older Android phones.

Needless to say, this is a pretty big problem for someone like me who expected to be able to upload to YouTube and let it handle the rest instead of having to do web-dev-like device debugging.

I compiled the video from several source videos, encoding and concatenating them using FFmpeg. It uses H264 and OPUS as codecs, but more relevantly, checking the source video that those first 26 minutes comes from shows that this problem originates in that video, so now the question becomes:

a) What is it in that particular source video that is causing the audio to become garbled in such a large proportion of mobile devices?

b) How can I fix it, either using FFmpeg or anything else?


I would really appreciate some help with this as I've spent a long time on this project, am very much out of my depth and all I want to do is make sure my YouTube upload can be seen by all of the people who want to.

Thank you.

Last edited by Kaos-Industries; 17th March 2021 at 21:04.
Kaos-Industries is offline   Reply With Quote
Old 18th March 2021, 20:06   #2  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 293
Left and right channels are 180° out of phase. Invert one of them (the first 26 minutes of one of the channels, that is).
lvqcl is offline   Reply With Quote
Old 18th March 2021, 21:51   #3  |  Link
Kaos-Industries
Registered User
 
Join Date: Feb 2019
Posts: 26
Quote:
Originally Posted by lvqcl View Post
Left and right channels are 180° out of phase. Invert one of them (the first 26 minutes of one of the channels, that is).
I don't know how you managed to figure out the problem so quickly but I just tried this with the FFmpeg command:

Code:
ffmpeg -i input.wav -af "aeval='-val(0)':c=same" output.wav
...and it seems to have worked! Thank you so much for both the response and the solution.

Do you have any idea what this would have been caused by in the source video, or maybe more importantly, why it only seemed to affect a (generally older) portion of mobile devices?
Kaos-Industries is offline   Reply With Quote
Old 20th March 2021, 10:59   #4  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 293
Quote:
Originally Posted by Kaos-Industries View Post
why it only seemed to affect a (generally older) portion of mobile devices?
It seems that they play audio in mono, so they add left and right channels together. So the result contains only audio compression artifacts from left and right channels.
lvqcl is offline   Reply With Quote
Old 20th March 2021, 11:40   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
So presumably there was no problem on earphones, wired or bluetooth.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 20th March 2021, 21:33   #6  |  Link
Kaos-Industries
Registered User
 
Join Date: Feb 2019
Posts: 26
Quote:
Originally Posted by StainlessS View Post
So presumably there was no problem on earphones, wired or bluetooth.
I didn't check, but I've since realised that the problem wasn't just limited to mobiles but the source files on my own desktop, even though I could have sworn they didn't have the problem when I originally encoded and uploaded the first version of the video.

When testing these source files again on my desktop, I tested with and without headphones, and both have the same problem. It was a very strange issue that I'm glad to have fixed and have to hope never comes up again.
Kaos-Industries is offline   Reply With Quote
Old 26th March 2021, 17:14   #7  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
This thread has nothing to do with video encoding and MPEG-4 ASP, it should be moved to the audio sub-forum.
Midzuki is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.