generating audio waveform from youtube video - javascript

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

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?

Related

Cant play videos faster than 2x with youtube iframe api

Youtube iframe API doesn't allow player.setPlaybackRate() to be set higher than 2 is there any other way to speed it up more than 2x?
Yes, you can try this script https://greasyfork.org/it/scripts/421610-youtube-speed-up/code
It overwrites _yt_player.xx.yy.zz.kk.getAvailablePlaybackRates() to return an array [0.25 ... 4].
The supported playback speeds are listed by player.getAvailablePlaybackRates() on the Youtube iframe API.
Youtube itself defines what playback speeds it supports. You'll want to implement your own video player (i.e. download the video from YouTube server-side and serve it to your client via a different video player) if you want to change this further.

mediasource local video segment by js

I want to play local video by web browser with js. Normally, it would be solved with html5 video tag. but the video was too big, ram couldn't contain it. So I decided to streaming local video file on browser not through server. I search it and I found that mediasource API able to do that, but I failed play my video. I search again more then I found video segments(initialization segments and media segments) form needed. but I couldn't find the way how to make it.
how can make video segments by js?
Is there any kind of api support to make it?
please not just about mp4box. mp4box is just for mp4 type. I want play every type of video that supported in video tag.

YouTube extract audio with Web Audio API

Is there a way to access audio track from YouTube video using Web Audio API?
Is there a way to load parts or whole YouTube video using <audio> or <video> tags?
i dont think so - you are able to embed videos via <iframe>, but there is no option to extract and embed music out of youtube videos.

HTML5 browser player on youtube video

I would love to know if anyone got some experience on Youtube API's?
Cause i've been wondering if it's possible to embed an youtube video with HTML5 parameters, changing the player to the Browser default player!
Thanks for the support!
While this is technically possible (see for example the YouTube downloader browser plugins that generate a proper link/URL for you), it most probably violates the YouTube API Terms of Service:
II. Prohibitions
Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to:
...
access any portion of any YouTube audiovisual content by any means other than use of a YouTube player or other video player expressly authorized by YouTube;
https://developers.google.com/youtube/terms

Audio channel selection

The idea is to have multiple audio files streaming on a website and to set each audio stream
to separate audio channels. Alternatively, the audio could come from separate web pages, and even separate windows, and then filtered to separate audio channels.
As I understand it, audio coming from anywhere in the browser is streamed through audio channels 1 (left) and 2(right). The advantage of audio sources being streamed on different channels is the ability to access that sound data independently for further manipulation.
How can this be accomplished?
Check this tutorial about creating positional audio with Web Audio API
http://www.html5rocks.com/en/tutorials/webaudio/positional_audio/
Web Audio API has required low level audio functions to mix audio channels freely.

Categories