I’ve been fiddling around with YouTube’s swfArgs[‘fmt_map’] value to see if I can use it to programmatically identify which formats exist for a given video but I’m running into a wall… I don’t have a large enough sample set to confirm my results, and the YouTube HD shift is so recent that there aren’t other resources.
So, in hopes that somebody else can help find more samples and corroborate my results (below), my test procedure has been this:
- Locate a video worth testing and navigate directly to it. (This is important! No additional querystring arguments, no referrer…)
- Using Firebug, inspecting the swfArgs global variable: console.log(swfArgs);
- Using incrementally modified versions of my bookmarklet (YouTube 6 DL, YouTube 18 DL, YouTube 22 DL, YouTube 34 DL, YouTube 35 DL), test for the existence of videos.
With that information I would be able to make a much friendlier boomarklet. So far my results have been consistent:
swfArgs[‘fmt_map’] = 6; // Formats 18 and 6 are available.
swfArgs[‘fmt_map’] = 34; // Formats 34 and 18 are available.
swfArgs[‘fmt_map’] = 6, 34; // Formats 34, 18, and 6 are available.
swfArgs[‘fmt_map’] = 35, 6; // Formats 35, 34, 18, and 6 are available. (only one known)
swfArgs[‘fmt_map’] = 22, 34; // Formats 34, 22, 18, and 6 are available.
It is also possible in the last scenario (fmt_map = 22, 34) to have a format 35 video as well but I only have one example of that: Matt Dancing (2008). On it there are additional properties set in the swfArgs object that aren’t set in other 22, 34 videos which I’m hoping I can use to identify the scenario.
I have found a number of 22, 34 videos with a format 35 file and nothing to distinguish them. I’m thinking that even YouTube isn’t using this format yet, but please correct me if I’m wrong.
At this point, having (mostly) eliminated the possibility of identifying when fmt=35 videos are available and just unlisted, what I’m most specifically looking for is this:
- Other fmt_map = 35, 6 videos
- Other non-represented fmt_map values
One thought on “YouTube Video Format Information”
I noticed another Format 35 video today, I had no idea what 35 was so I Googled it and found your blog. The DownloadHelper plugin for Firefox has been upgraded, and now has a very cool feature where in *any* quality mode it will let you download any existing HD/HQ modes – which is what revealed that fmt=35 exists.
Hope that helps!
Comments are closed.