从 Youtube 获取 RTSP URL
我有一个视频网址,例如 http://www.youtube.com/watch?v=AAAAAAAAAA
如何获取该视频的 RTSP URL?
I have a video URL like http://www.youtube.com/watch?v=AAAAAAAAAA
How can I get a RTSP URL for this video?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
编辑:YouTube 似乎已停止支持此方法。
转到:
http://gdata.youtube.com/feeds/api/videos/{视频 ID}
例如:
如果我们想获取该视频的 RTSP 链接:
https://www.youtube.com/watch?v=rUDm2xatms4&list=PLA9nd26sR8HD62LClHOBU93tuDKnJsfKa&feature=player_detailpage#t=0
我们将使用:
http://gdata.youtube.com/feeds/api/videos/rUDm2xatms4
这将为您下载一个 XML 文件。在那里搜索“rtsp”,您将获得完整的链接。
希望这有帮助。
EDIT: Seems like Youtube stopped supporting this method.
Go to:
http://gdata.youtube.com/feeds/api/videos/{video-id}
For example:
If we want to get the RTSP link for this video:
https://www.youtube.com/watch?v=rUDm2xatms4&list=PLA9nd26sR8HD62LClHOBU93tuDKnJsfKa&feature=player_detailpage#t=0
We'd use:
http://gdata.youtube.com/feeds/api/videos/rUDm2xatms4
This will download an XML file for you. In there search for 'rtsp' and you'll get the full link.
Hope this helps.
转到此链接,并将“VIDEOID”替换为您想要的视频的实际 ID:
http: //m.youtube.com/add_favorite?v=VIDEOID
然后右键单击视频图像,然后复制链接。
例如,如果视频为 http://youtube.com/watch?v=ABCDEFGHIJK ,您会请求 http://m.youtube.com/add_favorite?v=ABCDEFGHIJK
该链接实际上是永久性的,但会根据您是否登录以及您在请求时设置的首选项而有所不同页面。
Go to this link, and Replace "VIDEOID" with the actual ID of the video you want:
http://m.youtube.com/add_favorite?v=VIDEOID
then right click the image of the video, and copy the link.
For example, if the video is http://youtube.com/watch?v=ABCDEFGHIJK, you would request http://m.youtube.com/add_favorite?v=ABCDEFGHIJK
The link is affectively permanent, but it will vary depending upon whether or not you are logged in and what preferences you have set when you request the page.
我制作了一个 JavaScript 函数,可以为您提供任何 YouTube 视频的 rtsp,您只需将原始 YouTube 网址设置为参数即可。也许这就是您正在寻找的。
这是 github 链接。希望这有帮助!
I made a javascript function that can give you the rtsp of any youtube video, you just have to set the original youtube url as param. Maybe it is what you are looking for.
Here's the github link. Hope this helps!
或者,您也可以随时按照这个简单 45 秒的视频教程进行操作。它还将向您展示如何从任何 YouTube 视频中获取 RTSP。
Or you can always follow this simple 45 second video tutorial. And it will show you how to get the RTSP from any youtube video also.
使用以下格式并将 VIDEO_ID 替换为您的视频 ID。
要在 android(chrome) 中查看相同内容,请启用“请求桌面站点”。
有关更多详细信息,请参阅这篇文章。
Use the below format and replace VIDEO_ID with your VIDEO's ID.
To view the same in android(chrome) enable "Request desktop site".
For more details see this article.
根据我的经验。
1)浏览视频。网址看起来像这样
http://www.youtube.com/watch?v=oHRpGg2_Yqs
2)将www替换为m后
http://m.youtube.com/watch?v=oHRpGg2_Yqs
3) 右键单击步骤 2 中在浏览器中加载的图像(该图像将是 rtsp 地址)
According to my experience.
1) Browse the video.The url wud look like this
http://www.youtube.com/watch?v=oHRpGg2_Yqs
2) After replacement of www with m
http://m.youtube.com/watch?v=oHRpGg2_Yqs
3) Right click on the image now loaded in the browser during step 2 (dat wud be the rtsp addr)
我有一台旧的 BlackBerry Bold 9900,当在 YouTube 网站上使用库存网络浏览器并播放视频时,它通过 rstp(在浏览器中)播放,因此我可以直接从 URL 栏中复制 URL。这可能是一种不方便的查找方法,但它确实有效。也许如果您将用户代理更改为旧黑莓手机的用户代理(我的是操作系统 6.xx)?
希望这有用,
jBit
编辑:刚刚弄清楚如何做到这一点。
1. 在此处安装用户代理切换器 Chrome 扩展< /a>
2.打开它并转到“选项”
3. 单击绿色的“新用户代理”大按钮
4. 在名称字段中输入“Blackberry”
5. 将其粘贴到用户代理字段中:
headers: 'User-Agent: BlackBerry9800/6.6.0.207 Profile/MIDP-2.0 Configuration/CLDC-1.1/UCWEB8.1.0.104/161/999'
结果:{ browser: { name: 'UC Browser', version: '8.1', type: browser }, engine: { name: Gecko }, os: { name: 'BlackBerry OS', version: '6.6' }, device : { 类型:移动,子类型:智能,制造商:RIM,型号:'BlackBerry Torch 9800' } }
可读:“运行 BlackBerry OS 6.6 的 RIM BlackBerry Torch 9800 上的 UC 浏览器 8.1”
6. 按保存
7. 访问youtube;注意旧得多的用户界面
8. 搜索您选择的视频并单击它
9. 将出现一个带有视频缩略图的框,其下方将有一个“观看视频”超链接
10.右键单击它并按“复制链接地址”
11. 您现在拥有可流式传输的 rtsp 链接
12. 利润!
I have an old BlackBerry Bold 9900, and when using the stock web browser on the YouTube website and play a video, it plays via rstp (in the browser), so I can just go and copy the url out of the url bar. That's probably kind of an inconvenient method of finding it, but it works. Maybe if you changed your user agent to that of an old BlackBerry (mine is on os 6.x.x)?
Hope this is useful,
jBit
EDIT: Just figured out how to do this.
1. Install user agent switcher chrome extension here
2. Open it and go to "options"
3. Click the big green "New User-Agent" button
4. Put "Blackberry" in the name field
5. Paste this into the user-agent field:
headers: 'User-Agent: BlackBerry9800/6.6.0.207 Profile/MIDP-2.0 Configuration/CLDC-1.1/UCWEB8.1.0.104/161/999'
result: { browser: { name: 'UC Browser', version: '8.1', type: browser }, engine: { name: Gecko }, os: { name: 'BlackBerry OS', version: '6.6' }, device: { type: mobile, subtype: smart, manufacturer: RIM, model: 'BlackBerry Torch 9800' } }
readable: 'UC Browser 8.1 on a RIM BlackBerry Torch 9800 running BlackBerry OS 6.6'
6. Press save
7. Go to youtube; notice the much older ui
8. Search for a video of your choice and click on it
9. There will be a box with a video thumbnail underneath which there will be a "Watch video" hyperlink
10. Right-click it and press "copy link address"
11. You now have a streamable rtsp link
12. Profit!