1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Downloading embedded video: .swf files

Discussion in 'User submitted guides' started by CiDaemon, Oct 28, 2006.

  1. CiDaemon

    CiDaemon Regular member

    Joined:
    Oct 8, 2006
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    26
    Someone asked me to write a guide on downloading internet videos after a reply I made to a news post earlier. On second thought, I thought it would be better to write several guides addressing the different types of video media available online, and how to download each one. Technically, making a local PC copy of a video found online is not illegal, considering that your PC caches the video and therefore has most likely made a copy of it already. I do NOT, however, condone use of this for anything illegal...just to be safe. This guide addresses Flash .swf files, like the ones used on atomfilms.com . It applies to all file-format online videos, including .mpg and .avi files.
    ------------------------------------
    The method for downloading embedded video is the same for any format in which the video is a file- including .mpg, .avi, or .swf. Primarily, this is seen in .swf files--they are the example for this guide.

    Flash is one of the more popular formats of online video. Flash files, which can be non-interactive videos or have interactive elements (including games), are used for a variety of purposes. Flash video is different from streaming video formats-the video is a file which is loaded and displayed like any other online media (i.e. an image). In this guide, I will be addressing how to download these files, even if the file is embedded in a page or a javascript popup.

    Flash videos have the ".swf" extension, and are played through a browser plugin version of the Macromedia Flash Player, which is free and available online. Click here for a download of it, if you don't have it already.

    http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash

    Often, flash videos are linked as seperate entities from web pages, and the process of downloading them is very simple. Most times, flash files liked this way are designated as "download" files, as downloading them does not require the viewer to search for a URL. Often, there are even instructions on how to download the file on the site; it's very simple, but I will go over it:

    Our example site will be the once-popular All Your Base Are Belong To Us video site,
    http://allyourbase.planettribes.gamespy.com/index.shtml .
    This page has a dedicated "download" section with a direct link to the flash video file.

    [​IMG]

    Clicking on the link titled "Flash Movie" links directly to the file. Clicking does not, however, download the file--instead, it begins playing in your web browser. If you wish to download it, right click instead, and choose "Save Target As..." or "Save Link As...", as seen here.

    [​IMG]

    Choose a location to save the file, and let it download. That's it!

    The simplicity of this method is due to the fact that the .swf file itself is easily accessible-the URL is given by the link.

    Many sites, however, try to "hide" the URL of the file by placing the video in a webpage or popup window. In this case, the task is to find the URL of the video and download it manually.

    For this case, our example will be the host site of the "Star Wars Gangsta Rap" video. It can be found here: http://www.atomfilms.com/af/content/gangsta_rap_se .

    Note that this site does not have a direct link to the flash .swf file; instead, it has a "watch film" button which runs a javascript command.
    [​IMG]

    This type of link hides the video in a javascript popup window. Clicking on the button will open a new window, which has no URL bar. The flash video appears in this window, after a short advertisement.

    [​IMG]

    Using the "Save Target As..." method would not work in this case- the link is a javascript-based command, so there is not "target", per se. Also, since the movie is inside a window, the URL of the link does not actually correspond with the video.

    The video, however, had to come from somewhere. Your web browser knows where "somewhere" is--if it didn't, the video wouldn't be playing. In order to download the video as a .swf file to your desktop, you need to find out where it is. That's all.

    The simple method consists of using your web browser's built in "page info" to find the file URL. To access the "page info", right-click in the window that the video is playing (not actually on the video). You should be given the standard drop-down menu; choose "view page info".

    [​IMG]

    On the "page info" popup, choose the "Media" tab. This tab shows the locations and information on any media on the page -- images, music, and video files. There should be a list of items; each of these represents one media file used on the page. You know what you're looking for-- a .swf file. Looking at the second column "Type", you can rule out any files of type "image", "background", or "audio". Look for files with the "embed" type. Flash .swf files are tagged as "embed" by your browser because they are "embed" objects in the source code of the page. Once you rule out all objects that are not tagged "embed", you can look specifically for your file by looking at the file types. You are looking for objects that are labeled "application/x-shockwave-flash". There should be only a few on these on the list.

    [​IMG]

    You can now identify the file you want by looking at the URL's on the list- look for any containing the title of the video you are looking to download. Also look for keywords like "flash" or "video". If you cannot choose which file is correct, remember that you can easily download both and check to see which is the video you want.

    Click the "Save As..." button to download the file. Once it has downloaded, open it and make sure it is correct and works. If you cannot open the file by double-clicking, right click on it, choose "Open With...", and select either your web browser or a program that can play .swf files.

    [​IMG]

    If the file works, then you have completed the process and now have a local copy of the video. If the file displays something that is not the video you are looking for, go back to the "Media" tab of the "Page Info" window, and try another link.





    ----------------------------------------------
    I will add to this as per people's comments.
    Last edited: Oct 28, 2006
  2. AfterDawn

    AfterDawn Advertisement

  3. oodleman

    oodleman Guest

    Last edited by a moderator: Oct 4, 2007
  4. julieqt2

    julieqt2 Member

    Joined:
    Sep 18, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    This is great help only one problem, when i rightclick i don't have a view page info option :((
  5. CiDaemon

    CiDaemon Regular member

    Joined:
    Oct 8, 2006
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    26
    For some reason, Internet Explorer does not have this feature....M$ is lagging behind again. Use Firefox, Netscape, or some other browser-almost all of them have a feature like this.
  6. julieqt2

    julieqt2 Member

    Joined:
    Sep 18, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    i used firefox as you recommended it's working great now. Thanks so much, i d/led some things my daughter wanted and surprised her with them. I'm number 1 mum now :)
  7. 4lucie

    4lucie Member

    Joined:
    Nov 27, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    I've used "view page info" to "save as " the online video tutorial.
    But it only showed SAVE Image, nothing happened.
    What should I do?
    Thanks.
  8. CiDaemon

    CiDaemon Regular member

    Joined:
    Oct 8, 2006
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    26
    Someone recently just brought to my attention an interesting protection scheme for .swf files that involves aliasing...and I proceeded to beat it in about 10 minutes. I'll post the discussion here, in case it helps anyone. I found this protection scheme very interesting, and I think it is used fairly widely, so mabye this can help those who are having trouble....

    AReed posted:
    I was searching for info on how to download embedded Flash files, and your topic came up. It worked perfectly, until today... I can across a video I want to keep for all time, but I cant download it... I even got the Plugins for FireFox, but nothing has worked...
    So, I was wondering if YOU could help me out?
    The URL to the page:
    http://www.joshspaulding.com/zelda.html
    The Url to the Flash:
    http://www.joshspaulding.com/Zelda.swf
    Anything you can do to help is appreciated...

    Solution:
    The video that is linked to by the site, which is Zelda.swf (the link you provided for me) is not actually the video.... It's a smokescreen-like pointer to the actual video. The file "Zelda.swf" does not actually contain the movie; instead, it contains ANOTHER link to the REAL movie. Think of it like a shortcut on your desktop: it has the same name as the original program, but it doesen't contain the program itself; it just points your computer to the real one, wherever it is. This video is the same way.

    When you download the file "Zelda.swf", you're not downloading the movie, you're just downloading the pointer... that's why it's so small. I went a little farther with this concept. If the pointer tells your computer to find the REAL video, it must contain the REAL URL...right? So I broke it open with my trusty Hex Editor.

    Here's what it contains...
    465753063F000000700008C000006D6000100200430200000040003F031A0000008315004C4F5A66696E616C2E737766005F6C6576656C3000070040000000

    or, in ASCII...
    FWS.?...p.....m`....C....@.?........LOZfinal.swf._level0...@...

    See that text in the decoded file: "LOZfinal.swf"? This is the location of the REAL video. So, to find the real video which you can download, the url is http://www.joshspaulding.com/LOZfinal.swf . Open this page and go file>save page as to download the video. Ta da.


    ----------
    AReed, I hope you don't mind my copying of your PM. I think it will help others, and brings an interesting protection method to light.
  9. CiDaemon

    CiDaemon Regular member

    Joined:
    Oct 8, 2006
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    26
    @4lucie:
    could you give me some more information? I can't tell where exactly the problem you are having is. If you can, post the site url that you are trying to download from, and I'll try to find out what the deal is.
  10. 4lucie

    4lucie Member

    Joined:
    Nov 27, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
  11. CiDaemon

    CiDaemon Regular member

    Joined:
    Oct 8, 2006
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    26
    This is a different type of 'protection' alias scheme, involving an xml file. These are used commonly, and are pretty simple to break.

    The trick with this one- That flash file on the page (the url you gave me) is a 'container' for the video; similar to the last protection I discussed, the file dosen't actually contain the video itself. This .swf file is named "pastespecial_controller.swf", which you can see when accessing it in the Page Info screen.

    When you try to download this .swf, you can't--this is because it's only an alias or container, as I said earlier. This type of container uses a "config file" to find the url of the actual video, then points your web browser to it. So, let's find the config file;

    [​IMG]

    The highlighted text shows part of the file link, that tells where the configuration info is. In this case, it's an xml file. Since xml files are readable in a web browser (like .html files, but no style information), we can just open up the configuration file in Firefox. Just add this filename, "pastespecial_config.xml", to the website domain in your url bar. The final url should be http://www.datapigtechnologies.com/flashfiles/pastespecial_config.xml (just click on it if you don't want to type it in).

    Now, let's see the contents of this configuration file...

    The variable "Movie URL" shows where the movie .swf file is. So, to download the movie, just link to this file and go File>Save Page As.
    Here's the link.
    http://www.datapigtechnologies.com/flashfiles/pastespecial.swf

    And that's all there is to it. Ask if you need clarification on anything else.
    Last edited: Nov 28, 2006
  12. 4lucie

    4lucie Member

    Joined:
    Nov 27, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    You're a genius!
    I really admire your talent, and thanks indeed for this wonderful
    help.
  13. 4lucie

    4lucie Member

    Joined:
    Nov 27, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    Sorry, I got another challenge for you.
    I thought I've learned to download whatever video I like, but it seems to early to say so for a newbie....
    However, I would be grateful for your assistance again.
    Below is the link I want to download their free videos.
    http://www.peboking.com/modules/booklists/viewcat.php?cid=85#class796

    Somehow, these are totally different than previous posts, and it's restricted being open by IE. I tried using right click, but no function at all.

    Can you help?

    Thanks a lot.
  14. Rachel88

    Rachel88 Guest

    Anyone know of any good free programs that allow you to convert .swf to mpeg so that I can put it on DVD? I found some that seemed to work, only to find that when the conversion was done, the video had that annoying watermark on them which doesn't go away until you purchase the program. Thanks in advance!
  15. CiDaemon

    CiDaemon Regular member

    Joined:
    Oct 8, 2006
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    26
    @4lucie

    I really can't read this site--my computer is not chinese-friendly and never will be...

    If the only problem is that you can't right-click, just go to the menu bar at the top of your browser... Tools>Page Info instead.

    Since I can't read any of the site and cannot find the actual videos, there is little else I can do to help at this point.
  16. CiDaemon

    CiDaemon Regular member

    Joined:
    Oct 8, 2006
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    26
    @Rachel88

    In theory, the best way to do this would be to use Flash itself... that is, if you have it. If you don't, it's pretty expensive, so mabye this isn't the option for you...

    You could always use FRAPS to frameserve the .swf file.
    *Link* http://www.fraps.com/download.php *Link*
    Run the file using Flash Player, then run Fraps and make it record the Flash Player window.

    Other options: Many video-editing programs support .swf, including the ever-popular Premiere and Vegas. These are not free, but if you already have one, it may work. Windows Movie Maker does not, however.
    Quicktime Pro will convert .swf to other formats as well.

    Most free programs for converting .swf video don't work very well. There may be some that work without making a watermark or some other annoying feature, but I don't use them, so I wouldn't know. Perhaps you can find a guide here at Afterdawn. See the "Guides" tab at the top of the website, or the user-submitted guides section in the forum.

    *EDIT
    Here's one I found using a free program, but I ahve yet to try it. See if it works for you.
    http://forums.afterdawn.com/thread_view.cfm/310866
    Last edited: Nov 29, 2006
  17. 4lucie

    4lucie Member

    Joined:
    Nov 27, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    Hi CiDaemon,

    I don't think there's a way to click the tools>page info.
    Because when you hit the video name, it would pop out another screen
    without any tool bars to play the video.
    I'll see if I can find an English website with similar video.

    By the way, do you where which thread I can find how to download the music/Mp3? I've surfed so many wonderful websites providing free trial of the music, but don't know how to save them?
    Can you light me the way?

    Thank you.
  18. Rachel88

    Rachel88 Guest

    CiDaemon-

    Thanks for your help, I appreciate it! I tried fraps, but it said that it would leave a watermark since it's just a trial version. I also tried the program that you linked to at the end of your post, but it was the same deal. Bleh, if it weren't for those silly watermarks I'd be all set.

    I'l keep looking, but thanks again!
  19. Elayne

    Elayne Regular member

    Joined:
    Jul 6, 2002
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    26
    I was referred to this thread by a senior member. He had
    problems and couldn't download this video either. I have
    tried snaggit and several other programs which would let
    me download the video, but there was not any sound. Would
    you please give it a try? Thank you

    http://www.americangreetings.com/category.pd?path=23948&
  20. CiDaemon

    CiDaemon Regular member

    Joined:
    Oct 8, 2006
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    26
    @Elayne

    The explanation is pretty long, but since you didn't specify which video you wanted, I can't provide a link myself. I did, however, develop a simple way of generating the links for every video on the site, and this can be found at the bottom of the explanation. If you don't care about the details, just skip down to the end.

    -------------------
    Explanation
    -------------------

    This video is hidden within a container, is linked to on a different site, has a link which must be assembled, uses the no-extension trick, and is all-in-all a total pain in the ass to download. Here's how it's done.

    First, the standard Page Info method.

    [​IMG]


    Opening the Media tab yields three "Embed" type files, and all three are .swf files. Let's look at filenames. In the order they are displayed, the EMBED files are:

    "http://m1.2mdn.net/1249604/6026_728x90_uA.swf.....etc."

    "thanksgiving_data/6026_728x90_uA.swf"

    "http://m1.2mdn.net/1286484/PID_151567_AG_Xmas-ad_120x600_100k.swf.....etc."

    "http://m1.2mdn.net/1286484/PID_151567_AG_Xmas-ad_120x600_100k.swf.....etc."

    "B2077590_data/PID_151567_AG_Xmas-ad_120x600_100k.swf"

    and finally
    "http://ak.imgag.com/imgag/product/preview/flash/wsShell.swf.....etc."

    Of all of these files, any that contain the word "Ad" can probably be thrown out, since this site uses .swf based ads. This leaves only the first two and last .swf files. By trial and error, you can find out that the first two are not the video you want. The last one on the list seems blank, but that's our best choice. A blank .swf file usually is a container, and finding the container is the first step to finding the video. With this in mind, select the container file (wShell.swf) in the Page Info dialog. This is the one I have selected in the image below.

    [​IMG]

    Now, let's look at this link. Copy it from Page Info into Notepad in you want, as you will be able to read it more easily.

    [​IMG]

    I have copied it here also:

    "http://ak.imgag.com/imgag/product/preview/flash/wsShell.swf
    ?ihost=http://ak.imgag.com/imgag&brand=/product/preview/flas
    h/wsag&cardNum=/product/full/ap/3110890/graphic1&ahost=http:
    //www.americangreetings.com&mtype=1&&NameFirstFrom=sender&Na
    meFirstTo=recipient&mode=init"

    Looking at this URL, we can see that it contains many parts. If we seperate the URL into it's seperate statements, we may be able to make sense of it.

    If you're www-savvy, then you know that the designation "?" in a URL means that the website link ends, and something called variable assignment begins. If you aren't www-savvy, memorize that. Everything in a URL after the "?" is ignored by your web browser and goes directly to the linked URL, as an input. The syntax is "Variable=Value", and each variable is seperated by an ampersand sign (&).

    Seperating the URL using this method yields:

    Particular vairables of interest to us are those which contain URL's or any relevant term, i.e. "video", "swf", etc. Looking at the seperated URL, wee can see that the variables "iHost", "brand", "cardnum", and "aHost" all contain URLs. "aHost" points right back to American Greetings, which is the site that we came from. This is probably not the URL we are looking for, then. This leaves the other three for possible investigation. Seeing as none of these three variables contain a complete URL to a .swf file, we can only assume that they must be combined in come way to reveal the location.

    There are two ways to find out how to combine them-- the disassembly method, or the trial-and-error method. The trial-and-error method isn't my style. I could have tried combinations of all of these variables until one worked, but that would ruin the challenge!


    The Disassembly Method
    ----------------------
    The general rules for container .swf files are:

    If the container .swf has a specified Configuration file, as with the "pastespecial.swf" solution shown above, then the URL or some form of it can be found in the Config file.

    If the container does NOT have a configuration file, then the URL or some form of the URL is somewhere IN the container .swf, probably in pure hex format. This is like the "Zelda.swf" solution above.

    --
    Since our "wsShell.swf" link does not contain a config file of any type, we can assume that the second rule is applicable. This means.....time for a Hex Editor.

    Cracking open the file "wsShell.swf" reveals:
    [​IMG]

    The ASCII (plain text) on the right is the plain text equivalent of the pure data on the left. See anything familiar in this text? Sure enough, the terms "iHost", "cardnum", and "brand" are all present! Let's take a closer look at this part of the data:

    mainContainer...........@.....Y.......?.n....:..._parent.ihost.brand.
    .swf.brand_mc.brandAnimationLoaded.............N...........NG.....G..
    ......@...............&.....T&..brand_mc.@.@.@.@.@.@.@.@.@.@.@.@.....
    ..brandLoadCheck.@.?.8.......brandAnimationLoaded.......I............
    ............@.?..................brandLoadLoop.@.?......A...brand_mc.
    play._parent.ihost.cardNum..swf._parent.mainContainer................
    .....R............N...........NG.....G........@........brandPlay.@.@.
    @.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.?......p...loadedBytes._par
    ent.mainContainer.getBytesLoaded.totalBytes.getBytesTotal.brandDurati
    on.true.play.gotoAndPlay.......

    We see a recurring theme here; "parent" + "iHost" + either "brand" or "cardnum" + ".swf". From this, we can figure that the syntax for compiling the URL is as follows:

    add the strings "parent", "ihost", and either "brand" or "cardnum". Then, add the string ".swf" to the end.

    There is only one difficulty now; deciding between whether to use "brand" or "cardnum" in the URL string. Let's compare them.

    The "brand" url string contains the directory "preview", while the "cardnum" string contains the directory "full" and several sub-directories. At this point, common sense tells us that "full" is the one we want, rather than "preview". With that in mind, we now put the "cardnum" string into the syntax given by the disassembled .swf file. This is what we get.

    "parent" + "iHost" + "cardnum" + ".swf"

    We know that:
    ihost=http://ak.imgag.com/imgag
    cardNum=/product/full/ap/3110890/graphic1

    Since we don't have any variables named "parent", we'll forget about it for now. So, our URL syntax is now easily understandable; add "iHost" and "cardnum" to make a URL, then stick ".swf" on the end. Let's try it.

    [​IMG]

    When we access this URL, we are rewarded with.... nothing??!!!! WTF?!!!!

    Don't worry though, nothing isn't always bad! If you download this seemingly blank .swf file, you'll find that it's pretty large for something that does nothing. So, this is presumable our video...but how do we get it to play?

    How about right-clicking and hitting "Play"?

    [​IMG]

    Ahh, the power of common sense.

    And here, we have reached our final solution.

    -----------------------
    The Solution
    -----------------------

    1) Using the "page info" dialog, find the EMBED object named "wsShell.swf".

    2) In the URL for this file, copy the variable "cardnum". When looking at the URL, look for "&cardnum=" and copy the text directly following it, up to the next "&" sign.

    3) Paste the "cardnum" text after the "iHost" URL, which is consistently "http://ak.imgag.com/imgag". At the end of this combination, add ".swf".

    4) You should have a resulting URL that has syntax as follows:
    "http://ak.imgag.com/imgag/product/full/ap/(some number)/graphic1.swf".

    example:
    [​IMG]

    5) Access the URL, and you will see a seemingly blank window. To play it, right-click and choose "Play". To download the video, use File>Save Page As.

    6) To make the downloaded video play, open it as usual with your web browser or Flash Player, then right-click and choose "Play".
  21. Ripper

    Ripper Regular member

    Joined:
    Feb 20, 2006
    Messages:
    4,954
    Likes Received:
    8
    Trophy Points:
    48
    Just thought I'd pop in and say thanks to CIDaemon for getting Elayne sorted. I was the one who reffered her to here, as I figured you know your stuff ;-)

Share This Page