12

I have gone all over google and am having trouble getting the rtsp link from a youtube video give the VIDEO_ID.

I am confused on how to use that id and then parse google for the link.

Thank you for your time and and effort.

Mathew Kurian
  • 5,949
  • 5
  • 46
  • 73

3 Answers3

13

I found this blog entry, maybe its a starting point. If you follow on of the <id> links you get another format where you should find the rtsp link.

EDIT: after going through what WarrenFaith posted. PROPS TO HIM

this is how you get a rtsp link.

  1. make a request
  2. parse that data for the 3gp content
    • It also provides you with the rating and all that good stuff that you may want.

hope that helps you guys

Mathew Kurian
  • 5,949
  • 5
  • 46
  • 73
WarrenFaith
  • 57,492
  • 25
  • 134
  • 150
  • "Q-GLuydiMe4" id will not open through this way – Akarsh M Feb 24 '14 at 11:16
  • Q-GLuydiMe4 id will not open through this way ? why is it, have you know this issue ? – Akarsh M Feb 24 '14 at 11:27
  • yes, it is running well but RTSP is not generated by this id. I have checked and found that app control is like "Syndication of this video was restricted". and this is reason but I need to sort this thing. Is there any way to allow this permission in android – Akarsh M Feb 24 '14 at 14:09
  • if you use a nintendo dsi user agent the video will be a link to the rtsp video. However it is extremely compressed – ayunami2000 Nov 12 '19 at 00:23
  • This has been disabled – Mateus Terra Aug 18 '20 at 12:52
2

A short and simple way of getting the rtsp link, should be easily portable to any platform.

String video_id = "1FJHYqE0RDg";
String gdata = "http://gdata.youtube.com/feeds/api/videos/";
String youtube_response = Util.getUrlResponse(gdata+video_id); // just a simple HTTP GET
String rtsp_link = "rtsp:"+ StringUtils.split(StringUtils.split(youtube_response, "rtsp:")[1], ".3gp")[0] + ".3gp";
Ajibola
  • 1,218
  • 16
  • 28
  • "Q-GLuydiMe4" id will not open through this way. Why ? – Akarsh M Feb 24 '14 at 11:22
  • Q-GLuydiMe4 id will not open through this way ? can you explain ? – Akarsh M Feb 24 '14 at 11:27
  • maybe the video has other restrictions on it. – Ajibola Feb 24 '14 at 18:29
  • so, from our side we can not play this video but this restriction is not in iOs and other android apps. how they are using this thing. I am bit of curious about this ???? have you any idea how to resolve it ? – Akarsh M Feb 25 '14 at 05:05
  • not really, we can only see what google exposes. Not sure why this video doesn't show rtsp link like others.You could explore youtube api a bit deeper to find the reason. – Ajibola Feb 26 '14 at 18:33
1

without a program if u want to fetch a YOUTUBE RTSP link then

  1. GO TO www.youtube.com

  2. select the video whose rtsp link u want....

  3. go to the url of that video.....

  4. fetch the id from the url i.e. http://www.youtube.com/watch?v=6acRHWnfZAE ((the id of the starts from "=" and goes upto the end... in the above case 6acRHWnfZAE is the id of the video in the example

  5. now open http://gdata.youtube.com/feeds/api/videos/ and after this url paste the id of your video......

  6. a page will open

  7. now search for the media:content in that page there will be atleast 3 attribute one will be HTTP n the other two will be rtsp (format 1 n format 6); as per my experience format 1 is only for video,,,, n format 6 is for audio n video both

Sanoob
  • 2,466
  • 4
  • 30
  • 38