Help save net neutrality! Learn more.

#13 Ability to capture a scrolling web page

general (9)

It would be great to have the ability to capture the full length of a web page, beyond what fits on a single screen. The way to implement this would be:

* use the current capture frame selector to select the visible part of the web page to be captured
* check some option to capture a scrolling page
* write the result to a single image file

This implies xvidcap would need a way to scroll the page without human intervention.


  • Karl H. Beckers

    Karl H. Beckers - 2003-12-18

    Logged In: YES

    I have no idea how to implement this ...
    been thinking about it and can only think of two ways to
    address it:
    1) capture individual frames and implement some logic that
    understands the image data and can determine how the
    frames should be
    cut and pasted together.
    This I would atm rule out as way out of scope!
    2) grab the mouse and find out by how many pixels the mouse
    in a vertical direction between to captured frames. For a
    move down
    cut the lower portion of that height and paste to the
    bottom of the
    previous frame (scrolling up, the other way arount).
    PROBLEM: the pixels by which the mouse pointer moves may
    not be
    the amount of pixels the web page scrolls. Let's say your
    browser is
    200 pixels high and the page is 5000 pixels, then moving
    the mouse
    by 20 pixels will move the page by 500 pixels.
    And since there is no way of knowing for an external
    application how
    the ratio scrollbar increment:page scroll increment I
    have no idea
    of how to solve this issue.


  • David Liontooth

    David Liontooth - 2003-12-21

    Logged In: YES

    Would it be possible to implement this for a single program, say Mozilla
    Firebird (which is cross-platform)?

  • Karl H. Beckers

    Karl H. Beckers - 2003-12-22

    Logged In: YES

    How do I ask Mozilla (or Firebird [or any other application,
    which is just
    the point]) for the ratio between the scroll bar and the
    actual height of
    the web-page in pixels?
    (How do I even know the height of the scroll bar ... when I
    can only ask
    X for the height of the window and don't know which toolbars
    the user
    has visible or which theme the user has selected?)

    Of course one could build an interface into Mozilla to
    return such
    numbers, but I'd regard this as quite out of scope.


  • Nobody/Anonymous

    Logged In: NO

    Capturing a scrolling page is an interesting puzzle that can be left for
    later. Let me just put down some thoughts for the record.

    Capturing by scrolling is relevant only if there is a scrollbar, and this can
    be controlled by the mouse. Could xvidcap take control of the mouse,
    position it on the scrollbar, click and hold, initialize the capture by
    moving the scrollbar to the top, begin capture, and scroll to the bottom?

    Xvidcap would need two pieces of information: the height of the (visible)
    window (let's call it x), and the height of the entire page (y).

    The ratio between these is represented in the height (z) of the scrollbar,
    so that z:x :: x:y. I don't think this varies by theme. You can find out
    from X what x is, but you still need to know either y or z.

    After moving the scrollbar to the top, xvidcap would simply capture the
    first window, move the scrollbar down by its own height (z pixels),
    capture and append the next window again, and so on y/x times.

    All it needs to know is the height of the scrollbar or the height of the full
    page -- once it knows one of these it can infer the other. And it needs
    the ability to click, hold, and move the scrollbar.

    What do you think? Is there no way to get the value of either y or z? Or
    am I missing something?


  • Nobody/Anonymous

    Logged In: NO

    This seems almost out of scope to me...


Log in to post a comment.