VideoHelp Forum

+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    http://www.instructables.com/id/How-to-Edit-Video-Frames/?ALLSTEPS

    Ok, this seems like the best way to do the thing I'm trying to do, exceot that the thing that I'm editing has multiple places where frames need to be replaced,and it also already has audio that I dont want to get out if sync
    Quote Quote  
  2. I use AviSynth for this sort of thing and it's pretty easy and straightforward, if you are already familiar with AviSynth.

    Open the AviSynth script for the video in VDub. Save out the frame to be worked on in Video->Copy Source Frame To Clipboard. Paste it into a picture editor (I use PhotoFiltre). Fix the frame in there, save the work as a BMP and replace the old with the new in the script like so:

    Q=ImageSource("32662.bmp",End=32662).ConvertToYV12 ()
    ReplaceFramesSimple(Last,Q,Mappings="32662 ")


    The 'End' has to be at least as high as the frame number being replaced and not greater than the total video framecount. I name my edited BMPs with the frame number being replaced. ReplaceFramesSimple does the actual replacing. With slightly different notation it can replace a range of frames with the single edited frame.

    Again, though, this assumes at least a basic knowledge of frameserving using AviSynth. Once you have that, replacing funky frames with 'new and improved' versions is a breeze, with the only real work being the frame editing itself. The framecount remains the same so the audio remains in synch.

    Ok, this seems like the best way to do the thing I'm trying to do
    Not to me, it doesn't.

    I'm sure there are other ways to do what you want using NLEs and perhaps others will have other ideas.
    Last edited by manono; 21st Sep 2016 at 14:38.
    Quote Quote  
  3. Manono, can you please offer a script that would help replace MULTIPLE frames?

    Say for example that it's not just frame 32662 that I am editing, but also subsequent frames - 32663 through 32800.

    What is the best approach for this? I've tried "save image strip" in virtualdub, and it did indeed save them in a temporary folder. And yes, I was able to edit them, but how to replace the original frames with the multiple restored ones?
    Quote Quote  
  4. Use the two lines above, changing for each frame number to be replaced. But if you're replacing over 100 frames the whole procedure is going to get pretty tedious pretty quickly. I haven't replaced a whole bunch of sequential frames with a bunch of edited sequential frames so I don't know of an efficient script line(s) to do what I think you're asking. It should be possible, though. I think.

    Or are you replacing a sequence of frames with the single edited BMP? That's pretty easy.
    Quote Quote  
  5. Ok, let me shorten the frame number a bit. Let's suppose I want to edit 10 frames: 32662-32672).

    How would I first capture that and save it in a separate folder as BMP images?

    As we speak i think I found the script: Imagewrite (start=32662, end=32672)

    But how do I save that as a series of images on a separate folder?
    Quote Quote  
  6. Saving out frames is easy. I sometimes do it using MPC-HC and File->Save Image. When I need to know the frame number, I open the AviSynth script in VDub and go Video->Copy Source File To Clipboard and paste that in a picture editor. I use PhotoFiltre. Then I edit and save out the BMP. I guess you figured out the rest of what you wanted to know.
    Quote Quote  
  7. When I need to know the frame number, I open the AviSynth script in VDub and go Video->Copy Source File To Clipboard and paste that in a picture editor.
    I do this with AvsPmod by simply right-clicking and saving the image as.

    One question though: Is there any specific reason why we should save the image as a BMP for these purposes? What advantage does this have over, say, saving it as a jpeg?
    Quote Quote  
  8. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    BMP is lossless
    Quote Quote  
  9. BMP is lossless
    Enough said
    Quote Quote  



Similar Threads