Get streaming URL from any YouTube video

13,185

Solution 1

Is it possible to get streaming URL from any YouTube Video? - No, it is not possible without hurting the terms of service of youtube. Google has built the business model of youtube around the advertisements all over youtube, in-video banners and video ads and they want your user to see their ads. This is the reason they completely hide the video stream and would ban your app if you anyway access and stream it directly.

The only consented way to play youtube videos on iOS is to embed it into an iframe of a web view.

Solution 2

http://www.youtube.com/get_video_info?&video_id={VIDEO_ID}

This will not work on all files, some will display the message "This+video+contains+content+from.....". But many will work.

Share:
13,185
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I know about how to play video in device. But Here I just want to know that is it possible to get streaming URL from any YouTube Video? Then how can I do it, I tried to search on google but I can not able to find my solution.

    Generally I does not want to play direct stream from video, actually I want to save this URL (stream) in my buffer memory OR whatever temporary file and whenever user click on particular button then particular URL Stream is play.

    Al Last I got YouTube APIs + iPhone = Cool mobile apps. But I am not sure that it's helpful in my case or not ? If anybody who worked on this API then please suggest me, Otherwise How can I get streaming URL. Your suggestion will be appreciated.

    Thanks in advance.

  • RadijatoR
    RadijatoR over 8 years
    You are correct almost for, maybe cause i don't know about how yt works, about licensing, but how then works this site? This isn't torent, right? youtube-mp3.org
  • pilkch
    pilkch over 8 years
    @RadijatoR I imagine that the server for those sort of sites just pretend to be a normal browser and screen scrapes the embedded URL? They may even use something as simple as curl/wget with some html/string parsing. I imagine this is outside the terms and conditions, but they aren't using the official API so it is harder to ban them.