M4A audio file plays back poorly on Android, fine on other platforms

VLC for Android and Chrome OS specific usage questions
Ghengis
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Apr 2008 15:14

M4A audio file plays back poorly on Android, fine on other platforms

Postby Ghengis » 04 Aug 2019 17:03

I have a radio play that I've converted from multiple MP3 tracks to a single M4A audio file using fre:ac. I can't tell it apart from the original files when I play it back on VLC for Windows or any other PC media player. When I play it on VLC for Android, certain sections are inaudible. I have confirmed that the file sizes are identical to the byte so I'm pretty sure it's not damaged, and just about every other part of the play sounds the same on both Windows and Android.

The play is the BBC Radio 4 adaptation of the Hitchhiker's Guide to the Galaxy, Tertiary Phase, and the "broken" sections are an effects-heavy voice, when the creature Agrajaj speaks. There's a conversation between two characters, and you can hear one set of lines, then a barely-audible bit of static or distortion while the opposite lines are read, then the first character speaks clearly, etc. It sounds almost as if every part when it speaks has been removed on purpose.

Could this be something wrong with the Android decoder, maybe? The only relevant setting I could find, changing Settings -> Audio -> Advanced -> Audio Output from AudioTrack to OpenSL ES, made no difference. I'm attaching the MediaInfo dump for the file, and can upload it somewhere for testing if need be.

Ghengis
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Apr 2008 15:14

Re: M4A audio file plays back poorly on Android, fine on other platforms

Postby Ghengis » 04 Aug 2019 17:05

Code: Select all

<?xml version="1.0" encoding="UTF-8"?> <MediaInfo xmlns="https://mediaarea.net/mediainfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://mediaarea.net/mediainfo https://mediaarea.net/mediainfo/mediainfo_2_0.xsd" version="2.0"> <creatingLibrary version="19.07" url="https://mediaarea.net/MediaInfo">MediaInfoLib</creatingLibrary> <media ref="\Audio Books\Adult Audio Books\Douglas Adams\Hitchhiker&apos;s Guide Radio Series\Douglas Adams - HHGTTG 3 - Tertiary Phase.m4a"> <track type="General"> <AudioCount>1</AudioCount> <MenuCount>1</MenuCount> <FileExtension>m4a</FileExtension> <Format>MPEG-4</Format> <Format_Profile>Base Media</Format_Profile> <CodecID>mp42</CodecID> <CodecID_Compatible>mp42/isom</CodecID_Compatible> <FileSize>138217586</FileSize> <Duration>9929.920</Duration> <OverallBitRate_Mode>VBR</OverallBitRate_Mode> <OverallBitRate>111354</OverallBitRate> <StreamSize>1843679</StreamSize> <HeaderSize>1843521</HeaderSize> <DataSize>136374065</DataSize> <FooterSize>0</FooterSize> <IsStreamable>Yes</IsStreamable> <Title>HHGTTG 3 - Tertiary Phase</Title> <Album>HHGTTG 3 - Tertiary Phase</Album> <Album_Performer>BBC Radio 4</Album_Performer> <Part_Position>3</Part_Position> <Part_Position_Total>3</Part_Position_Total> <Track>HHGTTG 3 - Tertiary Phase</Track> <Performer>Douglas Adams</Performer> <Genre>Audiobook</Genre> <ContentType>Music</ContentType> <Recorded_Date>2004</Recorded_Date> <Encoded_Date>UTC 2019-07-11 17:08:02</Encoded_Date> <Tagged_Date>UTC 2019-07-11 17:09:31</Tagged_Date> <File_Created_Date>UTC 2019-07-11 17:09:31.574</File_Created_Date> <File_Created_Date_Local>2019-07-11 19:09:31.574</File_Created_Date_Local> <File_Modified_Date>UTC 2019-07-11 17:09:31.858</File_Modified_Date> <File_Modified_Date_Local>2019-07-11 19:09:31.858</File_Modified_Date_Local> <Cover>Yes</Cover> <Comment>fre:ac - free audio converter &lt;https://www.freac.org/&gt;</Comment> </track> <track type="Audio"> <StreamOrder>0</StreamOrder> <ID>1</ID> <Format>AAC</Format> <Format_AdditionalFeatures>LC</Format_AdditionalFeatures> <CodecID>mp4a-40-2</CodecID> <Duration>9929.920</Duration> <BitRate_Mode>VBR</BitRate_Mode> <BitRate>109870</BitRate> <BitRate_Maximum>266504</BitRate_Maximum> <Channels>2</Channels> <ChannelPositions>Front: L R</ChannelPositions> <ChannelLayout>L R</ChannelLayout> <SamplesPerFrame>1024</SamplesPerFrame> <SamplingRate>44100</SamplingRate> <SamplingCount>437909472</SamplingCount> <FrameRate>43.066</FrameRate> <FrameCount>427646</FrameCount> <Compression_Mode>Lossy</Compression_Mode> <StreamSize>136373907</StreamSize> <StreamSize_Proportion>0.98666</StreamSize_Proportion> <Encoded_Date>UTC 2019-07-11 17:08:02</Encoded_Date> <Tagged_Date>UTC 2019-07-11 17:09:31</Tagged_Date> <extra> <Menus>2</Menus> </extra> </track> <track type="Menu"> <StreamOrder>1</StreamOrder> <ID>2</ID> <Format>Timed Text</Format> <CodecID>text</CodecID> <Duration>9929.881</Duration> <extra> <Encoded_Date>UTC 2019-07-11 17:09:31</Encoded_Date> <Tagged_Date>UTC 2019-07-11 17:09:31</Tagged_Date> <BitRate_Mode>CBR</BitRate_Mode> <Menu_For>1</Menu_For> <_00_00_00_000>Part 1 of 6</_00_00_00_000> <_00_27_34_584>Part 2 of 6</_00_27_34_584> <_00_55_09_455>Part 3 of 6</_00_55_09_455> <_01_22_37_221>Part 4 of 6</_01_22_37_221> <_01_50_21_366>Part 5 of 6</_01_50_21_366> <_02_17_52_058>Part 6 of 6</_02_17_52_058> <BitRate_Mode_String>Constant</BitRate_Mode_String> </extra> </track> </media> </MediaInfo>

Lotesdelere
Cone Master
Cone Master
Posts: 9952
Joined: 08 Sep 2006 04:39
Location: Europe

Re: M4A audio file plays back poorly on Android, fine on other platforms

Postby Lotesdelere » 07 Aug 2019 09:29

Please upload the file to Zippyshare.com (200 MB max) or to WeTransfer.com and then post the link to the file here.
http://www.zippyshare.com
https://wetransfer.com

Ghengis
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Apr 2008 15:14

Re: M4A audio file plays back poorly on Android, fine on other platforms

Postby Ghengis » 07 Aug 2019 18:56

OK, I've uploaded the complete book. It should have 6 chapter markers, and the most obviously problematic part starts a minute or two into the 4th chapter, right around the 1:24:00 mark.

https://we.tl/t-lQ2sjtmLmA

Lotesdelere
Cone Master
Cone Master
Posts: 9952
Joined: 08 Sep 2006 04:39
Location: Europe

Re: M4A audio file plays back poorly on Android, fine on other platforms

Postby Lotesdelere » 08 Aug 2019 09:21

the "broken" sections are an effects-heavy voice

Here lies the problem.
They have put some kind of 'spatialization' effect on the voice which leads to a 180° out of phase stereo:
Image

https://en.wikipedia.org/wiki/Out_Of_Phase_Stereo

This obviously doesn't downmix well to the mono output of a phone, and it's the same with any player I've tried.
But you can hear the voice if you plug in some stereo headphones.

So it's not about the decoding, the culprit is this badly made effect. Or something weird happened during the conversion.
Is it the same with the original MP3 file ?

Ghengis
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Apr 2008 15:14

Re: M4A audio file plays back poorly on Android, fine on other platforms

Postby Ghengis » 08 Aug 2019 12:31

Oh wow, that's really neat, and dumb at the same time. I will check the original MP3 when I get home but I suspect it will have the same issue. I don't suppose you have any clever ideas as to how to fix it? That's not the only place where it happens, and I assume that simply dropping one channel would result in me missing dialog in other portions of the book. I'm not sure I care enough to manually re-cut the individual sections by hand in Audacity or whatever...

Lotesdelere
Cone Master
Cone Master
Posts: 9952
Joined: 08 Sep 2006 04:39
Location: Europe

Re: M4A audio file plays back poorly on Android, fine on other platforms

Postby Lotesdelere » 08 Aug 2019 13:51

The fix is to invert the phase of only ONE of the two channels on these parts only. With a good audio editor like Audacity, yes.

I haven't checked if there are other phase changes all along the file. The whole thing is way too long :P
But the 'concatenation' of different sources files into one master piece might have produced some strange things during the conversion.

Ghengis
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Apr 2008 15:14

Re: M4A audio file plays back poorly on Android, fine on other platforms

Postby Ghengis » 08 Aug 2019 21:22

If you're curious, the files all come from the Internet Archive: https://archive.org/details/hhgttgall6

I opened the relevant file there (third book, Part 4) in the web player and the same problem holds. Guess if I have some free time I'll see what I can do with Audacity. At least it's not VLC's fault!

Lotesdelere
Cone Master
Cone Master
Posts: 9952
Joined: 08 Sep 2006 04:39
Location: Europe

Re: M4A audio file plays back poorly on Android, fine on other platforms

Postby Lotesdelere » 09 Aug 2019 00:29

I opened the relevant file there (third book, Part 4) in the web player and the same problem holds.

Yes, in fact this whole file is out of phase. The MP3 as well as the OGG Vorbis one.
It's obvious in the musical part at the beginning, there is no real center and it gives you an headache after a while.
I haven't checked the other files but I bet they must be the same. Audacity or SoX for command line.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 12 guests