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 > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th September 2021, 22:48   #1  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Decoding Apple Music audio tracks (sample provided)

Hi there,
as you know, there are not so many paid services offering lossless audio but one of those is Apple Music.
Now, I don't really like Apple nor OSX so I'd like to listen to the music on other devices and I tried to take the audio tracks out of the Mac to listen to them in other devices, however I was puzzled when I found out how Apple Music stores files as I couldn't find a way to... uhm... open them. I thought it was gonna be just 1 track in whatever codec and that's it but there were several files, so, low and behold, here is a file taken directly from the Apple Music folder in which downloaded files are stored: https://we.tl/t-ED5xnDmGAV

Have fun with the sample and let me know if you find a way to listen to it...
FranceBB is offline   Reply With Quote
Old 25th September 2021, 00:03   #2  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,341
The format its stored in is HLS with fragmented MP4 segments, probably for streaming, and they don't bother to change the format on disc.
However, the real problem is that its DRM protected - eg. encrypted. The reference to the key is something only Apple Music will understand and provide the key from its store.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 25th September 2021, 03:18   #3  |  Link
junh1024
Registered User
 
Join Date: Mar 2011
Posts: 59
Deezer & TIDAL have lossless streaming on applicable plans too.
junh1024 is offline   Reply With Quote
Old 25th September 2021, 09:28   #4  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally Posted by junh1024 View Post
Deezer & TIDAL have lossless streaming on applicable plans too.
Are they lossless or are they 'lossy' MQA (Master Quality Authenticated) encoded?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 25th September 2021, 10:22   #5  |  Link
junh1024
Registered User
 
Join Date: Mar 2011
Posts: 59
Quote:
Originally Posted by SeeMoreDigital View Post
Are they lossless or are they 'lossy' MQA (Master Quality Authenticated) encoded?

TIDAL has some MQA according to https://github.com/yaronzz/Tidal-Med...ment-748567962 , but it should be clearly marked.

Deezer has some , titles in MQA , but I'm guessing the majority isn't MQA.

I guess there's no guarantee that there's no MQA on AM, since MQA can be stored in most lossless codecs.

Anyway, although MQA is lossy, you'll barely be able to hear it.

Last edited by junh1024; 25th September 2021 at 11:08.
junh1024 is offline   Reply With Quote
Old 26th September 2021, 20:11   #6  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Ok, then, backup plan: it's lossless so I can just play the song and record the 5.1 output from the speakers in PCM 24bit little endian and get away with it, however when I tried I failed 'cause the sound was crackling and unusable. I gotta say that I didn't put much effort into this attempt, so, do you have any command line for FFMpeg (or anything else really) to capture the speaker in a Mac and save to PCM?

Or even something to stream the audio over the internal network so that I can listen to it from Windows? eheheheheh


For the records, this is what I used:

Code:
ffmpeg -f avfoundation -i ":1" -acodec copy -f wav -y "output.wav"
while when I tried to stream it over the network I used something like:

Code:
ffmpeg -f avfoundation -i ":1" -acodec pcm_s16be -ar 44100 -ac 2 -f rtp rtp://192.168.178.29:5555
but unfortunately it's just stereo because of the -ac 2.
If I try to get rid of -ac and output a 5.1 with 6 channels it says that it ain't supported by rtp...

Last edited by FranceBB; 26th September 2021 at 20:18.
FranceBB is offline   Reply With Quote
Old 26th September 2021, 21:40   #7  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 391
What about Plex?

Sent from my SM-G986U1 using Tapatalk
jlw_4049 is offline   Reply With Quote
Old 27th September 2021, 08:56   #8  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
It's a different ball game capturing multi-channel audio as apposed to 2-channel audio...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 27th September 2021, 10:31   #9  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by FranceBB View Post
Ok, then, backup plan
Try this.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 27th September 2021, 21:56   #10  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Originally Posted by tormento View Post
Try this.
I'm gonna try it in the next few days.
I see that it accepts 5.1 input however I haven't seen anything about recording 5.1 on the Website.
I'll reach out to you on telegram though since we're friends.
FranceBB is offline   Reply With Quote
Old 27th September 2021, 22:07   #11  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Ok, I tested it cause I was excited, but... it doesn't record anything. What it is is a replacement for the mac speaker. Like: A virtual sound card. I configured it and I put two of those: one is the output of the system and the input of TeamTalk, the other one is the input of the system and the output of TeamTalk. This way it is basically as if I had the microphone and speakers of my primary desktop connected to the mac. I can even do facetime-calls from Windows 10 this way xD
The problem is that TeamTalk isn't 5.1 but stereo, and it's not lossless but opus, so it's not good.


Anyway we're losing the point here: the program you gave me is a virtual sound card and it doesn't record anything...
FranceBB is offline   Reply With Quote
Old 27th September 2021, 22:25   #12  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by FranceBB View Post
Anyway we're losing the point here: the program you gave me is a virtual sound card and it doesn't record anything...
AFAIK there is a way to redirect output to audio in.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 5th October 2021, 20:05   #13  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Nope, it acts as a virtual sound card and that's it.
I feel like FFMpeg is the key here.
Anything better than this?

Quote:
ffmpeg -f avfoundation -i ":1" -acodec copy -f wav -y "output.wav"
FranceBB is offline   Reply With Quote
Old 6th October 2021, 19:41   #14  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
New test using this:

Code:
ffmpeg -f avfoundation -i ":1" -acodec copy -f wav -y "output.wav"
https://wetransfer.com/downloads/7e4...20211006182705

https://we.tl/t-HZN7BrSudc

and you can hear the cracking sound... -.-

Last edited by FranceBB; 6th October 2021 at 19:53.
FranceBB is offline   Reply With Quote
Old 7th October 2021, 12:23   #15  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Quote:
Originally Posted by SeeMoreDigital View Post
It's a different ball game capturing multi-channel audio as apposed to 2-channel audio...
Same multichannel wav container.
Balling is offline   Reply With Quote
Old 7th October 2021, 13:06   #16  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 272
Look at ffmpeg avfoundation device input options, perhaps you could use something out of it.
richardpl 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 10:44.


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