VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. As per title. I have a long movie and need to export ~900 frames to uncompressed bitmap files.

    I know how to do this manually one frame at a a time but this way it will take ages for 900 frames.

    I already have frame IDs in excel spreadsheet column. And these 900 frames are not in one block of the video, but distributed randomly in video.

    Function 'Save image sequence' in Virtualdub is not helpful here as it doesn't allow me to put custom range of frames there, nor put individual frame numbers to export there.

    Is there any script I an use to do the job?
    Last edited by tuskacz; 4th Feb 2023 at 22:14.
    Quote Quote  
  2. You can do it in avisynth - using ConditionalReader to read a .txt file with the wanted frames, and ConditionalFilter to select only those to write out

    Framenumbering starts at "zero"

    If your video is YUV, you probably want to use Rec709 for HD, Rec601 for SD to write images. In the example below, I used 709, progressive, no alpha channel. There are other considerations if it's interlaced, or other colorspaces. Provide more info if it's none of these

    The source filter you would use, depends on the type of video. A general one would be FFVideoSource which could load most types
    eg.

    Code:
    FFVideoSource("video.ext")
    orig=last
    
    write=orig.ConverToRGB24(matrix="rec709").ImageWriter("file_%06d.bmp")
    
    ConditionalFilter(orig, write, orig, "value", "=", "1")
    
    ConditionalReader("framenumbers.txt", "value")

    For framenumbers.txt, create another column in your existing excel sheet , where each value has 1 beside it. Essentially "1" turns "on" the frame, "0" turns off. You only need to list included frames. Copy/paste into a text file. Rename it "framenumbers.txt"

    So if you had 323, 6543, 7000 (just for this simple example)

    Code:
    Type int
    Default 0
    
    323 1
    6543 1
    7000 1
    You can use drop & drag the .avs script in vdub and use file=>run file analysis pass. And it will write the chosen frames, with the correct framenumber written into the filename. You can change the filename syntax in the ImageWriter argument (maybe you want to call it something more descriptive than "file" )

    Right now it would write

    file_000323.bmp
    file_006543.bmp
    file_007000.bmp
    Last edited by poisondeathray; 4th Feb 2023 at 23:43.
    Quote Quote  



Similar Threads

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