Generating a sound wave from a YouTube video

Does anyone know if it is possible to reproduce the sound form from a video being played in a YouTube player using Javascript? Thanks!

+6
source share
1 answer

On the client side, it is not possible to isolate sound from video data. You will need to receive the raw audio data in order to then process it using the WebAudio API (for example, display it).

There are several server solutions (extracting audio from a video, sending it, etc.), but it is not legal, as written on youtube TOS: ( 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 accessible through the YouTube API;

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

See the questions for more information: Is there a Youtube API that only provides audio?

+2
source

All Articles