Getting mp4 video URL
I was searching for a way to get YouTube’s mp4 video URL and this is the cleanest solution I’ve seen.
I’m wondering though if you could explain a bit how exactly you’re getting that source URL – I’ve tried to look around the source and identified video id (of course) and a ticket. Is it a session ticket? I’m asking because I want to use this mp4 video source in my HTML5 video, embedded remotely straight from YouTube.
I’m wondering what’s needed to get a URL – do I need to mine it from HTML or can I use just video’s identifier…
Any answer will me much appreciated.
You can't get permanent URLs for downloading YouTube videos. YouTube uses a ticket that expires in about 30 minutes and the URL no longer works.
You could scrape YouTube's video page and get the parameters every time you load the page, but that's not very efficient.
I'm sure that YouTube will add an option to embed HTML5 videos in the near future.