How to Save Videos from TV News Websites

H

Hot-Text

Paul said:
It's worse than that. A bit more testing, shows CamStudio
still has a 4GB limit and doesn't have AVI2 capabilities.

AVI 2 work as capabilities in my Windows 98
But not on my XP

As for the 4GB limit
I set my to a 12 Gb

But did not log how I did it
I've been able to get real capture rates as high as 60FPS,
but it's not going to do any good if the output file is
corrupted and unusable.


real capture rates
<
>
 
P

Paul

I'm trying to save a few videos from a TV station's website. Using XP
and Firefox (older version, 17). I have several video download
extensions installed, which work fine on Youtube, but not on these
videos. I also tried to use IE and K-Meleon. I then installed the FF
extension "Cache Viewer". Using that, I could not find the videos in
cache. I also saved the entire cache, and went thru all 200+ folders
within it, manually. The videos simply do not exist.

Where are they saved on my drive when I view them???????

More importantly, is there some program I can install which will capture
and save ANY video, regardless of it's source on the web?
(Must run on XP, and preferably be free).

Thanks

It's been a while, but this is quick update on
screen capture.

I was pushing Camstudio as a solution for capturing video.
It has a GUI, which makes it easy to use, but one disadvantage
it has, is the AVI output file cannot go past 4GB. It gets
corrupted, because they still haven't put OpenDML AVI2
output capability in there.

I was going to get the source for Camstudio, and see
if it could be modified in some way, to get past 4GB
(like, use OpenDML AVI2 for output, instead of original
flavor AVI).

I got the source OK. It needs Visual Studio to compile the C++.

I got myself a copy of Visual Studio Express. I could not
register it with Microsoft (you have 30 days to get a free
registration key from Microsoft). They leave the download sitting
there, but the registration server is dead.

OK, so I'm on the 30 day clock, trying to compile, and Express doesn't
support ATL/MFC. Only the $500 version of the software supports that.
There is a way to set up a 64 bit ATL/MFC library, but no 32 bit library.
There are no build targets for 64 bits in CamStudio, and my current OS
is 32 bit anyway (makes testing difficult). It would be an exercise in
frustration to get the project to compile with Express. Several other
projects I've downloaded since then, also have an MFC dependency.
Having a copy of Express, is a waste of time. I wasted a lot of
days figuring that out.

*******

I had a few things to do around the house, so had to put down this
project for a week.

I started looking for another solution. And spotted a reference to
ffmpeg (which is an open source library for doing all sorts of things
with movies).

You can get a copy of a Windows build of FFMPEG here. I used a
Zeranoe build years ago, so recognized the name. FFMPEG is better
than it used to be. Less creaky.

http://ffmpeg.zeranoe.com/builds/

Latest Zeranoe FFmpeg Build Version: git-f6bb2cd (2014-10-16)
32-bit Downloads <--- 64-bit Downloads

Download FFmpeg git-f6bb2cd 32-bit Static <--- all in one FFMPEG.exe

From Command Prompt, run this command, to get the "Name" of your sound card.

ffmpeg -list_devices true -f dshow -i dummy

From Command Prompt, check the Sound card has a Capture pin. Substitute
the name of your sound card, as determined from the previous command.

ffmpeg -f dshow -list_options true -i audio="SoundMAX HD Audio"

Important - if your sound card has a custom control panel, look
in the recording section for "Stereo Mix" or "What you hear"
or equivalent. Tick the box to make this the exclusive
recording source, and lift the slider to 100% (so you can be
sure to get some sound). On other OSes, there are various hacks
to get around underhanded Microsoft attempts to hide "What you
hear". Later Windows OSes sport things like PVP or protected video
path, and with the limitations that imposes, I wouldn't waste my
time testing this method on anything other than WinXP :)

OK, now the test case.

1) Run a Flash Video. Right-click to bring up the tiny Flash control
panel in the video pane. Turn off Hardware Acceleration. This is so
the Flash video renders in a plane that GDI/BitBLT operations can
capture. If you don't do this, a "black box" results.

2) In Command Prompt, start the command to capture video and audio.
All of this should be entered on one line in Command Prompt. Substitute
the name of your Sound Card, in the appropriate part of the command.
You can turn the framerate down if you like. I've been leaving it
at 60, to see just how much the computer can take :)

ffmpeg -offset_x 0 -offset_y 480 -video_size 720x480 -framerate 60
-f gdigrab -i desktop -f dshow -sample_rate 44100 -i audio="SoundMAX HD Audio"
-vcodec mjpeg -acodec pbm_s16le out.avi

3) Let the command run for five seconds or so, until it settles down.
Now, start the video playing in your browser, the one you want to
capture. (Align the playback window with the lower left corner of
your screen.) You can adjust the offsets or the video_size as you see
fit. On my particular LCD screen, I was aiming for the lower_left
corner as "home" for the capture.

The command I crafted is not the best. It's the first thing I got running.
It took *all day* to get this far. FFMPEG has a ton of options.

What was really amazing, is the very first command I tried, could
record my full screen (1280x1024) at 60FPS. But the output format was
MPEG. And that upsets the color (some color fringing is present). By
switching to MJPEG, there is still color fringing, but it is not nearly as bad.
The closer you get to lossless compression (like huffyuv), the harder
your CPU has to work. Running HuffYUV I could only manage 50FPS flat out.

The above command managed 60FPS, so it still captures at a good rate.

*******

This was the very first command I tried, from the documentation page.

ffmpeg -framerate 60 -f gdigrab -i desktop out.mpg

( http://www.ffmpeg.org/ffmpeg-devices.html )

The framerate displayed in the Command Prompt window, is higher than
60 FPS, so I don't know why it is doing that. But what is impressive,
is the small size - the output file is tiny (at least, until you
feed it a real video to record).

If you record at 60FPS, as I did in that example, play the video
back in VLC to have it render properly. You'll get macroblocks if
you allow WMP (Windows Media Player) to play it. I expect if
I turn down the framerate, WMP will like it again.

I haven't experimented yet, with post-processing, to see if
there are any more problems awaiting me. (Like a bad AVI file
in a movie editor.)

The sampling jitter seems to be pretty bad. I collected
video at 60FPS, while playing an Adobe Flash video at
24FPS. There should be a unique frame every 2.5 frame times.
Yet the sampled stream shows unique frames with as low a
spacing as 1 frame and as high a spacing as 5 frames. Which
means the screen capture is not going at a constant rate like
it should. If hardware was doing the sampling, you might
see a range of 2 to 3 replicated frames in the trace.

*******

I originally started the experiment, to see if I could record
video to separate image files. If you want to capture your
screen, 60 times a second at 5MB of *.bmp per capture or
300MB/sec, you can try this. I tested this on my (software)
RAMDisk, and it did a video-only capture just fine. These
individual frames, is how I figure out the sampling
jitter. Run checksums on the entire set of .bmp files
(a couple thousand), and see how many frames are the same
as one another. The %05d here means out00000.bmp, out00001.bmp
and so on, for output files. One file per frame. You cannot
capture sound very well this way, so this cannot be a
"final solution" in any case.

ffmpeg -framerate 60 -f gdigrab -i desktop out%05d.bmp

Once you have a collection of frames, one of the free
video editors (VirtualDub? or Avidemux?) has the ability
to deal with individual frames. So you can "glue" a set of
images back together, to make a movie. My little RAMDisk
can easily handle 300MB/sec, but it rapidly runs out of
space. I can't "steal Hollywood movies" that way, as
two hours of capture would take a boatload of RAM, at
300MB/sec. That's why the alternative out.mpg command is so
attractive (even if the colors are all screwed up).

I guarantee you'll have hours of fun playing with this.
I spent the whole day on it :) It's crude, but it's
doing better than CamStudio in some ways.

HTH,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top