What audio format Spotify uses and how they transfer the files to mobile devices?

有些话、适合烂在心里 提交于 2020-01-04 08:13:11

问题


this question is just out of pure curiosity.

I noticed, that when I sync my phone with my Spotify playlists, music is transfered really fast, I haven`t benchmarked or something, but it just feels times faster than just downloading 20 or so mp3s.

How they do it ? Is it some kind of special audio format ? Or maybe they compress the data somehow when transfering ?


回答1:


This isn't really a programming question, but I'll bite.

Spotify uses OGG audio for its mobile clients. Depending on the quality you choose for offline syncing, it's either 96, 160 or 320 kbit/sec, and not really much different in size to the equivalent MP3 bitrate. However, the Spotify client and backend do have a very optimised network stack, so it's possible you're seeing this, but I'd be surprised if the latency benefits the network stack provides is enough to have a visible effect considering the vast majority of the time is spent actually downloading the track rather than requesting it.




回答2:


The funny thing is that Spotify uses OGG to stream music, but it can't play local OGG files.

http://community.spotify.com/t5/Spotify-Ideas/Local-file-support-OGG-Vorbis/idi-p/5451



来源:https://stackoverflow.com/questions/15613581/what-audio-format-spotify-uses-and-how-they-transfer-the-files-to-mobile-devices

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!