开发者

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

开发者 https://www.devze.com 2023-02-04 00:49 出处:网络
i have an swf media player which play flv videos b开发者_如何学JAVAut i want it to play youtube videos

i have an swf media player which play flv videos b开发者_如何学JAVAut 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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消