soundcloud播放器是如何编程的? [英] How is soundcloud player programmed?

查看:164
本文介绍了soundcloud播放器是如何编程的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个太宽泛的问题,但是soundcloud实际上是如何编程的?

This may be too broad a question, but how is soundcloud actually programmed?

更具体一点,


  1. 用什么语言对它进行编程?

  1. What language was used to program it?

它如何显示频率数据?

如果用户以不同于MP3的格式上传文件,是转换MP3还是按原样播放?如果是前者,转换是如何工作的?

If user uploads a file in a format different from MP3, is it converted MP3 or gets played as is? If former, how does the conversion work?

它如何以图形方式显示在浏览器上?它也是HTML 5我不知道的事情吗?

How does it "graphically" appear on a browser as it does? Is it also HTML 5 thing which I don't know anything about?

我是粉丝soundcloud并不禁停止想知道所有这些工作如何!
请帮帮我:)

I'm a big fan of the soundcloud and couldn't stop wondering how all of these work! Please help me out :)

推荐答案

SoundCloud开发者在这里,

SoundCloud developer here,


  1. API和当前网站是使用Rails构建的。有关架构/基础架构及其在过去5年中如何发展的信息,请查看演变SoundCloud的架构。该网站的下一个版本(仍在私人测试版中)完全使用Javascript构建,并且只使用API​​来获取其数据。 构建下一个SoundCloud 中提供了更多详细信息。

  1. The API and the current website are built with Rails. For information about the architecture/infrastructure and how it evolved over the last 5 years, check out Evolution of SoundCloud's Architecture. The "next" version of the website (still in private beta) is built entirely with Javascript, and just uses the API to get its data. There's a lot more detail available in Building The Next SoundCloud.

我不确定使用哪种语言/库来处理音频,但许多音频库确实提供频率数据,我们只是提取它。

I'm not sure exactly what language/libraries are used to process the audio, but many audio libraries do provide frequency data, and we just extract that.

用户可以上传 AIFF,WAVE(WAV),FLAC,OGG,MP2,MP3,AAC,AMR或WMA文件。原始文件与下载选项保持完全相同,但对于网站上的流媒体,它们将转换为128kbps的MP3文件。再说一遍,我不确定软件/库,但我很确定它是ffmpeg。

Users can upload AIFF, WAVE (WAV), FLAC, OGG, MP2, MP3, AAC, AMR or WMA files. The originals are kept exactly as is for the download option, but for streaming on the site, they're converted to 128kbps MP3 files. Again, I'm not sure of the software/libraries, but I'm pretty sure it'd be ffmpeg.

为了显示波形,在当上传音频文件时处理后端,波形数据被保存到PNG文件中。在当前版本的网站上,我们只需加载该文件。在接下来,处理png以返回原始数据,然后将其绘制到所需的确切尺寸的画布上(这使图像保持清晰)。我们目前正在尝试以JSON格式获取波形数据,以加快此过程。

For displaying the waveforms, on the back-end when the audio files are processed when they're uploaded, the waveform data is saved into a PNG file. On the current version of the website, we simply load that file. On Next, the png is processed to get the original data back out, and then it is drawn to a canvas at the exact dimensions needed (which keeps the image crisp). We're currently experimenting with getting waveform data in a JSON format to speed up this process.

这篇关于soundcloud播放器是如何编程的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆