www.webdeveloper.com
Results 1 to 14 of 14

Thread: Custom Flash Video Player

  1. #1
    Join Date
    Sep 2008
    Posts
    24

    Custom Flash Video Player

    Hello, I've got a question about video players.

    What is the best way to embed a video from another site (say YouTube or CNN Video) to your own flash video player.

    For example, on the link below, most of the videos are obviously originally from YouTube or some other site.

    http://perezhilton.com/tv/. Is there a way of somehow embedding the SWF source of a video to your own player?

    Thanks, Anthony

  2. #2
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Yes. Get written permission and then include the url to the video into your video player playlist.
    EfV

  3. #3
    Join Date
    Sep 2008
    Posts
    24
    Hi, thanks for the reply.

    Permission shouldn't be a problem; we can get that.

    Do you mean that our video player will be able to automatically play the video, just off of the URL?

  4. #4
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Well, yes it could be as simple as that. But you donít want the .swf source, you want the .flv that their video player (the .swf) is playing, unless of course, you just want to embed their player. To use your own player get the video file url.
    Keep in mind that I am talking about the url to the video file, not the html web page that holds the video. And Iím assuming that you are using something like an xml file to hold the playlist for your custom player.
    So for example, with a Flash player coded to get the video file url from a playlist, the xml file for the playlist would look something like this:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <videos>
    	<video caption="Trying to load video from Web"
    		title="Web video"
    		url="http://phvids.voxcdn.com/twistage-production/155332_293924"/>
    </videos>
    My custom player I tested this on also has a video title and a caption area. The url shown above is from the first video listed on the link you provided. Downloads and plays just fine.
    The owner of the video can provide that url to you or you can view the video, go to your temp Internet cache, find the video file, and the url to it will be listed there.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com

  5. #5
    Join Date
    Sep 2008
    Posts
    24

    Re:

    Thanks again for the reply.

    How did you retrieve the actual video URL from the site? Cos I don't see it anywhere on the site or it's source.

  6. #6
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Anytime you download a video, it is stored on your machine in your Temporary Internet Files file, (the cache) and played back on your player from there. So best way to retreive the url is to delete all the files from your cache first, then go to the page with the video you want. Choose the video and watch it (it's now being downloaded into your cache). Then go to your Temp Internet Files and look for the video you just downloaded. The actual file will be there along with the actual url to the video file, or photo, or text, or anything loaded into your cache.
    Just be sure to copy it exactly and there you go!
    EfV

  7. #7
    Join Date
    Sep 2008
    Posts
    24

    Re:

    Okay so if I may ask: how is the video downloaded from the URL? That's what I really meant by the last question.

    Quote Originally Posted by Eye for Video View Post
    Anytime you download a video, it is stored on your machine in your Temporary Internet Files file, (the cache) and played back on your player from there. So best way to retreive the url is to delete all the files from your cache first, then go to the page with the video you want. Choose the video and watch it (it's now being downloaded into your cache). Then go to your Temp Internet Files and look for the video you just downloaded. The actual file will be there along with the actual url to the video file, or photo, or text, or anything loaded into your cache.
    Just be sure to copy it exactly and there you go!
    EfV

  8. #8
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    The url provides the path to the video in exactly the same way as typing:
    C:/mywork/flashprojects/video_player/video1.flv
    The path above is a relative address. Using a Web url provides an absolute address.
    How are you loading video files into your player now?
    EfV

  9. #9
    Join Date
    Sep 2008
    Posts
    24
    Currently, we're still developing, but the FLV's are being loaded via the (XML) playlist.

    For example though, YouTube videos don't have a .FLV extension. So how would it work in that case?

    Thanks for your replies.

    Quote Originally Posted by Eye for Video View Post
    The url provides the path to the video in exactly the same way as typing:
    C:/mywork/flashprojects/video_player/video1.flv
    The path above is a relative address. Using a Web url provides an absolute address.
    How are you loading video files into your player now?
    EfV

  10. #10
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    As you can see in the example I tested earlier, it doesn't have a .flv extension either. That doesn't prevent it from working.
    Code:
    url="http://phvids.voxcdn.com/twistage-production/155332_293924"/>
    Problem with YouTube videos is that the url is about 2000 digits/letters long, so I didn't test that. They also want you to use the YouTube player (with it's ads, etc) so expect things to be a little harder and more complicated if you are using your own. And remember, anytime you watch a YouTube video, the entire file is already downloaded onto your machine. So if you have permission from the original poster, you could just use the actual file.
    So get your player up and running, test it on shorter urls to make sure you have it working. Then sit down and copy one of those dang long urls from YouTube.
    EfV

  11. #11
    Join Date
    Sep 2008
    Posts
    24
    I wasn't able to find the 'downloaded' YouTube file in my Temp, when I load a YouTube video. But I can load FLV's from blip.tv, for example. So where exactly can this downloaded file be located?

    Can you also elaborate more on the 'long' YouTube URL's you talked about? The only URL I get so far are the regular <http://www.youtube.com/watch?v=YQBIzVb7yxI> which doesn't seem like what you're talking about.

    Many thanks,
    Anthony.

    Quote Originally Posted by Eye for Video View Post
    As you can see in the example I tested earlier, it doesn't have a .flv extension either. That doesn't prevent it from working.
    Code:
    url="http://phvids.voxcdn.com/twistage-production/155332_293924"/>
    Problem with YouTube videos is that the url is about 2000 digits/letters long, so I didn't test that. They also want you to use the YouTube player (with it's ads, etc) so expect things to be a little harder and more complicated if you are using your own. And remember, anytime you watch a YouTube video, the entire file is already downloaded onto your machine. So if you have permission from the original poster, you could just use the actual file.
    So get your player up and running, test it on shorter urls to make sure you have it working. Then sit down and copy one of those dang long urls from YouTube.
    EfV

  12. #12
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Keep in mind that YouTube does not want you to steal their videos, so they disguise the file somewhat. Also remember that when most video is played over the Internet, it is progressively downloaded into your Temp Internet Files file. On YouTube for example, you see a status bar indicating the download progress, as well as a playback position indicator. Once the download progress bar reaches the end, itís on your machine, and playing back from there, not YouTube.
    To make it easier to spot the file, delete everything from the Temp Internet file. Then go straight to YouTube and select and play a video (note the download progress bar). As soon as the file has finished downloading, go to your Temp Internet file and look for something coming from YouTube that has a very large file size (like the video will have), thatís a dead giveaway that itís a video file. If your files are sorted by size, that makes it easy, just scroll to the bottom of the page. The file will NOT have an easy to recognize name and it will NOT have a .flv extension (see attached photo).
    But thatís the file!
    To verify that itís a video file, copy that file into the work folder with your video player videos, change the file name to something like ďyoutube_test.flvĒ and away you go. Just be sure to give it the .flv extension.
    OK, so if thatís the video file, The file name is in the first column and it's URL is right next to it (see photo). Itís really, really long and Iím not exactly sure if it will work or if they have thrown up other roadblocks, such as the file name changing after a certain amount of time. But give it a try, Iíd be curious to know.
    Keep on Truckiní
    EfV
    Attached Images Attached Images

  13. #13
    Join Date
    Sep 2008
    Posts
    24
    Thanks for that insightful piece of info.

    With Vista, all you can see in the cache folder is a generic (for example): name: TY7890NNDK009B type: no file type date created: date....

    I'm guessing you run XP. So it appears that with Vista, you cannot actually see a tangible 'downloaded' video file. Or am I wrong?

  14. #14
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Well I'm not sure, but I would expect someone here in the Forum should know the answer. I Googled
    "how to find temp internet files in vista"
    and found that in Vista, the folder is protected and many of the files are hidden.
    http://techrepublic.com.com/5208-623...237566&start=0
    So can you identfy the downloaded video file?
    name: TY7890NNDK009B
    Can you copy it, rename it, and play it?
    The file is there, just need to figure out how to find it.
    EfV

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles