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

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

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

Related

How do music service pages retrieve YouTube video URL?

Music sites like Playmoss and Submissionhub manage to retrieve the YouTube video file URL from the standard player watch URL. When a user pasts a YouTube URL like this into their service, the get the video file URL like this and save them in their system. This is necessary to later reproduce the media files with an external audio player like SoundManager2.
I learned that it's possible to retrieve the info from command line but that's impossible to do so from embedded YouTube videos.
Any idea how the mentioned sites manage to do that?
It is impossible (and illegal) to retrieve YouTube video URL. Music sites like the mentioned in the question seem to play YouTube files controlling the embedded videos. This can be done using Javascript as described here.

Is it possible to play a video file (eg .avi) using youtube player?

Can I use youtube player to play my own videos?
Say I have a localhost running and I have some video files stored and I have a html code that has Youtube player's code and I can specify something like
<src="localhost/videos/cat.avi">
And it plays cat.avi on my browser just like youtube player.
No - you can't play local videos using youtube player.
If you want to play them you'll need to upload them to youtube.com.
Check out Play a local video with YouTube Player

Can I get youtube video as mp3 sound in iOS ?

as mentioned in the question
Can I get the youtube as sound file with any extension
I mean specifically with using JSON or any other way ?
One way to get songs from Youtube is to use their API, and search for your song. It will return a youtubeID url of video/song.
You can then stream this into an iOS app.
A handy framework to extract video url from youtube ID url, is LBYoutubePlayer which can be found here https://github.com/larcus94/LBYouTubeView
You would then need to extract the audio from the video.
Technically, that could all work. Not sure if it goes beyond Youtube's terms and services though.

How to play just the audio of YouTube Video?

In my app I have played a youtube video by embedding it, but how can i only play the audio of the video? I tried using AVAudioPlayer and use the videos url as the file path but it didnt work, any help?
No it is not possible, only one workaround is just to use a hidden UIWebView and play in that.
Youtube forbids playing audio only! here is the message from youtube
Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to: "separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API"
-Kuan Yong, YouTube API Team

How to play youtube videos through vlc plugin?

I'm using vlc plugin into C# Windows form application. It works fine with all media type but it can't play youtube videos through the plugin also it can be played in the main player itself. I'm using the following code :
axVLCPlugin2.playlist.add("http://www.youtube.com/watch?v=BxPtmLmqdXU");
axVLCPlugin2.playlist.play();
How the could should be to be able to play youtube videos ?
You are specifying the URL of the youtube web page, not of the video itself. You need to get the URL of the video itself and specify that. There are many web pages that allow you to extract the URL of the video, given a youtube page URL, like:
Get link to actual video

Resources