从 Youtube 获取 RTSP URL

发布于 2024-12-12 09:57:47 字数 169 浏览 0 评论 0原文

我有一个视频网址,例如 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

我们的影子 2024-12-19 09:57:47

编辑: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.

心在旅行 2024-12-19 09:57:47

转到此链接,并将“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.

望笑 2024-12-19 09:57:47

我制作了一个 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!

ㄟ。诗瑗 2024-12-19 09:57:47

或者,您也可以随时按照这个简单 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.

故乡的云 2024-12-19 09:57:47

使用以下格式并将 VIDEO_ID 替换为您的视频 ID。
要在 android(chrome) 中查看相同内容,请启用“请求桌面站点”。
有关更多详细信息,请参阅这篇文章

m.youtube.com/watch?v=VIDEO_ID&app=m&itct=CIYBEKQwGAAiEwjYqrOwmabLAhWII74KHWhnDt8yCmctaGlnaC1yY2g%3D&hl=en&client=mv-google

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.

m.youtube.com/watch?v=VIDEO_ID&app=m&itct=CIYBEKQwGAAiEwjYqrOwmabLAhWII74KHWhnDt8yCmctaGlnaC1yY2g%3D&hl=en&client=mv-google

寂寞笑我太脆弱 2024-12-19 09:57:47

根据我的经验。
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)

〃安静 2024-12-19 09:57:47

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文