VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    i've been working on a new screen capture app, for webpage streaming videos.

    for simplicity and debugging purposes, i am capturing from my tv capture card's output in a small window to .png files. the size are aprox 130kb per image. i really need to incorporate a better container, like a single stream file, but that's another improvement i will tackle next. for now i am capturing to .png files.

    now my problem is with converting the .png images to the 29.970 frame rate. for some reason, after i encode to say, xvid, the videos are playing sort of in fast motion. i was sure i overcame a similar situation once before, but that was very long ago and i can't remember how (if) i did it before.

    edit 1: updated below.

    Code:
    # test screen capture clip, 15sec opening theme scene
    # glc_00001.png through glc_00431.png
      imagesource("d:\streams\glc_%05d.png", 00001, 00431, 29.970)
    # assumeFPS(29.970)
    # convertFPS(29.970)
    edit 2: here is the test clip in question...i am still doing work on the app's capture efficiency and dimension setup, etc. clip was 325x240 and cropped 324x240 so that imagesource would open images w/out errors.
    Image Attached Files
    Last edited by vhelp; 14th Dec 2012 at 01:40.
    Quote Quote  
  2. Looking at the avisynth script you load 431 images for 15 seconds with a frame rate of 29.97 but 29.97 *15 = 449.55 so instead of 431, shouldn't there be 450 pictures.
    -> are you sure you create enough frames?
    Quote Quote  
  3. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    yeah, i knew there would be some math to determine the possible cause. you may be correct. i am still having trouble locking the capture to the output videos windows frame rate, so i've been using the timer control but it seems it may not be efficient enough if i am saving to hundreds of files. i still have room to tweak the routines though. thank you.
    Quote Quote  
  4. btw. have you looked into applications that can capture directly from your card, going through avisynth seems like a waste of time,..
    (ffmpeg and vlc might be capable of directly capturing from you tv card)
    Quote Quote  
  5. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    yes, i know about those, thanks..but this is a hobby of mine, plus the bonus to do things the way i want, and i want to use it for capturing web videos, for the stubborn ones. i know there are already tools avail to do this but this is my hobby. so i made another capture w/ diff tweaks but its still giving me the fast motion problem. i think i will go another route for the capturing. this time, i will prep a video that incorporates frame numbers in the clip. then, when i proceed to screen capture w/ my app, i can get a better idea of what is going on and fix it. then i might be able to start screen capturing web streams.
    Quote Quote  
  6. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    something else came to mind.. normal video is captured by fields. i am capturing by frame and there is no interlace. so i wonder if i need to sort of trick the conversion somehow. even if i am dropping or duplicating frames the end result should still be correct, but its not.
    Quote Quote  
  7. your tv card might be deinterlacing, so getting progressive frames might not the problem,.. 1st I would really to check out if you have enough frames (fields) converting. should be easy to figure out if you grab ~30|60 frames/fields per second,..
    Quote Quote  
  8. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    yes, i agree. my plan will go something like this:

    1. setup a customized video that will show the frame numbers on each frame in the clip.
    2. play it in virtualdub
    3. using my home made app, screen capture it by its HDC/handle.

    when i capture this video, (in theory) it should have the complete frame numbers for each frame. if i am missing or duplicating frames then that is the problem, that the routine for screen capturing is not in sync somehow.

    well, its pretty late for me. i will start again tomorrow, hopefully with a fresher perspective. thanks for all your input.
    Quote Quote  
  9. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    ok, i made one more test encode via avisynth.

    this plays the clip with less fast-forward motion though there is noticeable studder which may indicate a combination of dropped/duplicated frames. i will work on his some more tomorrow.

    edit 1: 12/15/2012 sat, status update

    i made the new test clip i spoke about earlier in this discussion.

    let me explain...the screen capture is not in sync with the screen as it is playing a video (obviously) and is dropping and duplicating frames, that is, (for the dups) it is capping the same screen pic, two, three or four times. the process is either too quick or too slow, due to the timer1 control's low resolution. i read somewhere that its +/- peek is aprox 55msec. i will try and figure out a way to save the images into a single stream as it captures, that might cut down on the lag, by some, otherwise i will look into a better timer control, directx or dshow.

    here is a clip that demonstrates it.
    Image Attached Files
    Last edited by vhelp; 15th Dec 2012 at 13:21.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!