Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

generating audio waveform from youtube video

does anyone know if is it possible to render an audio waveform from a video playing in a youtube player using Javascript? Thank you!

like image 808
Gianluca Sibaldi Avatar asked Nov 28 '12 11:11

Gianluca Sibaldi


People also ask

How do I convert an audio file to soundwave?

How do I convert a voice recording to soundwave? Simply upload your recording to VEED. VEED supports all popular audio file formats including MP3, WAV, and more. Generate the sound wave by clicking on 'Elements' and selecting any of the sound wave options under Sound Wave.


1 Answers

On the client side, it's not possible to isolate the audio from the video data. You would need to get the raw audio data to be able to then process it with the WebAudio API (e.g. display it).

There are some server-side solutions (extracting audio from video, sending it back etc.), but that's not legal, as it's written in the TOS of youtube: (https://developers.google.com/youtube/terms?hl=fr)

You are not allowed to:

separate, isolate, or modify the audio or video components of any YouTube >audiovisual content made available through the YouTube API;

promote separately the audio or video components of any YouTube audiovisual >content made available through the YouTube API;

See this questions for more details: Is there a Youtube API that gives only audio?

like image 78
scriptify Avatar answered Sep 27 '22 21:09

scriptify