开发者

is it possible to use the music on various youtube videos for visualization? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 5 years ago.

开发者_如何学C Improve this question

This is a theoretical idea , but hope my posting here would shed some knowledge on it .

Lets say there is a music video on youtube . Is it possible to just strip the music of the video using the youtube api and use it as a way to some visualization on another website ?

Its very similar to any music player which does visualization based on the beats of the music. Thus is it possible ?


Keep in mind there are much better ways. PHP is not a sound/graphics/animation platform. It does single images well, but doing that alone sucks up an immense amount of system resources and often pushes well beyond typical PHP's max memory limits.

I haven't tested this myself, but here's what I found attempting to stick with just PHP as much as possible. It requires settling for likely a worse product than what you'd typically get from an old atari, and fully downloading and processing the video file before serving up your customized version.

First, download and set up ffmpeg on your server. The command line version would likely be best as you can simply call it using PHP's various exec functions.

  1. Grab the original video using any remote file stream function from PHP.
  2. Extract sound from the file using ffmpeg.
  3. Use PHP's Ming extension to build a new flash file using the extracted sound with your custom visualizations. Likely PHP's OGG extension could not be rigged to give spectrum data. Therefore, this will likely take a 3rd party app to analyze and dump spectrum data and feed it back to your PHP script bit by bit to build your new flash file.
  4. Serve your new flash file.

If your server is capable of doing all that within the typical 30-second PHP timeout limit, then you should be all good. If not, you'll have to fork off a new PHP process to handle the processing while giving the client some sort of queue ticket to check back later for the final file.

Realistically, I'm not likely offering any good advice at all. There are a few websites that offer services which strip audio from Youtube videos. GS: "strip youtube audio". Starting there may be a good lead.


Yes, but you won't be using the YouTube API to get the music out of the video.

Theoretically possible, legally impractical.


Look Wuddy! Video Muzik It has been made, write song name to input area and press enter, click a song and listen from Youtube :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜