Thread: Recording a non-downloadable video

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    69

    Recording a non-downloadable video

    Hi.
    I would want to write a little program that can record a video wich is been played on another window.
    It can be useful , for example, for storing on the hard disk some videos that can be only watched on internet pages, but can not be donwloaded or you can not determine the url from wich they come.

    I found some programs that can do this (screen recording), but they are not freeware.... but if they exist, i think doing this is possible.

    How can i do this under windows?
    thank you.. sorry for the so difficult topic

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    If your web browser can display a web page, then you can download it yourself manually. I can't think of any situation that you cannot.

    You might have to look at the source code for the web page to figure out exactly what the URL is. Or you might have to download the entire page and associated files. But it can almost certainly be done.

    The GNU program wget is very useful for downloading a page and every page that page links to. You should try it out. It's command-line.

    If you really want to record the screen like this, there are plenty of freeware programs that do it. Taksi comes to mind.

    But beware that these programs usually have a very low FPS rate, because otherwise they eat tons of CPU and disk space.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    First thing is to determine how the vid is being played on the other window. What type of vid is it? Rm swf avi wmv mpeg or streaming vid? Does it stream or download then play? More info. meow. One thing I ran in to is ‘file in use by another prog’ so it can not be copied as it downloads. Even if I own the original vid! Youbube.com changed their format so videodownloader no longer works. <whine> So using a player that will allow you to ‘save vid as’ is what you are looking for.

    Also what compiler?

  4. #4
    Registered User
    Join Date
    Mar 2005
    Posts
    69
    the video comes from a file on the web, not a live stream, and it is a flash video.
    while the video is been downloaded, the flash player starts play it before it has been downloaded completely.

    ok thanks, i'll try wget and taksi.. but does wget downloads all the files linked to the page, even if they are not web pages? for example, videos referred in an
    <object> tag.?

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    69
    if the methods above don't work, i could try a crazy thing,using the WINAPI
    given the handle to the window in which the video is in reproduction, i could do a window capture and save it onto a bitmap file, 25 times per second.
    the screen capture can be done with the GetDIBits function.

    then i merge all the bitmaps in a flash video file with 25 frames per second... using Flash MX..
    sounds crazy, uh?

  6. #6
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    That might work. meow. Or you could try to hook the stream as it downloads. dup the data in to another file.swf then view it.

  7. #7
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Wouldn't the file be saved to temp internet files?

  8. #8
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    What I have found is that it down loads to the ‘temp’ file folder. As fl.......... then two numbers. But it deletes it when it is finished or the page is closed.

    Doc settings/ admin/ local settings/ temp .... you should note that ‘temp internet file’ folder is also next to the ‘temp’ file folder.

    if it is the same as i think. a link to the vid would be clearer.

  9. #9
    Registered User mikeman118's Avatar
    Join Date
    Aug 2007
    Posts
    183
    There's already internet apps that do this for you... such as keepvid. If you wanted to write your own app to do this that's perfectly fine, just thought I'd point that out.

  10. #10
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Note that some video players use overlay layers, so if you "copy the entire screen", the video is actually just a blue/pink/purple rectangle, because the overaly is composited by the graphics processor later on, and the "screen content" doesn't have the video content.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem With My Box
    By HaVoX in forum Tech Board
    Replies: 9
    Last Post: 10-15-2005, 07:38 AM
  2. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 08:39 AM
  3. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  4. Drawing a circle in a video captured frame
    By skyhigh in forum C Programming
    Replies: 2
    Last Post: 12-05-2001, 01:00 AM