how do i get the flv file path from a youtube URL

对着背影说爱祢 提交于 2019-12-10 16:24:03

问题


i have an swf media player which play flv videos but i want it to play youtube videos so i must pass to the player flv file path

the senario is a website which i can upload videos or put a url and i can put a youtube video URL

i am using asp.net and i need a solution whenever i detect a user is entering youtube video i must convert it to flv file path to be played in the player


回答1:


This post explains how to retrieve links of different qualities (FLV and more): youtube get_video not working

However, if you're just going to play the videos, it would be easiest to use Youtube's chromeless player API: http://code.google.com/apis/youtube/flash_api_reference.html




回答2:


You can use a current web service which is already implemented for your project

Use www.keepvid.com to decode the url from YouTube. First go to YouTube and load a video then you copy the url in the address bar and it should show something like this:

http://chi-v48.chi.youtube.com/get_video?video_id=TvedUxLtZKQ

One thing left to do is to add .flv to the end of the url so it ends up like this:

http://chi-v48.chi.youtube.com/get_video?video_id=TvedUxLtZKQ.flv



来源:https://stackoverflow.com/questions/4690985/how-do-i-get-the-flv-file-path-from-a-youtube-url

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!