VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Hello, i would like to know how to automatic modify some frames,

    my situation is: i recived a video for homework and i have to remove or modify like writing something on the frame. The frames to modify are every 12 frames. And the video is very long so i can't do it one by one.

    Does anyone can tell me how to do this, i have no clue.

    Thanks!!
    Quote Quote  
  2. Exactly what do you have to modify?

    If it's writing, where is it? does it move or animate? does it change over time, or is it always the same? maybe post an example screenshot

    How do you want to "modify" it? cover it up with a black patch? try to "remove" it ?

    If it's static, you might be able to use an avisynth filter with ApplyEvery() or similar functions to every 12th frame
    Quote Quote  
  3. Thanks to answer me,

    to give you more informations, i have a normal video (avi) which have been modified every 12 frames, the modified frames have a white page with "change this one".

    So i simply have to write "done" under "change this one" or change the frames with a picture.

    Can you help me?

    psoison i saw you are from canada, it would be easier for me to talk in french =)
    Last edited by tonyalcapon; 30th Dec 2012 at 16:15.
    Quote Quote  
  4. uhhh my french is rusty, I learned some back in elementary & junior high school...but I forgotten most of it



    But you can do this in avisynth, but there is a bit of a learning curve

    Here is an example, that shows the framenumber, you can work though the code, and adjust to your video (just change the filenames, instead of "blankclip" you would use AVISource("yourvideo.avi") .

    video "1.avi" is the original , "2.avi" has the replaced frames . You can open it up in something like vdub to go frame by frame . It's really not that difficult, but it helps if you can see and example to work though the code

    1
    Code:
    BlankClip(length=300, width=640, height=480)
    AssumeFPS(30000,1001)
    ShowFrameNumber()
    ConvertToYV12()
    2

    Code:
    BlankClip(length=300, width=640, height=480)
    AssumeFPS(30000,1001)
    ShowFrameNumber()
    ConvertToYV12()
    a=last
    
    
    a
    SelectEvery(12,0)
    Subtitle("change this one")
    replaced=last
    
    
    a
    DeleteEvery(12,0)
    InterleaveEvery(replaced, 12,0)
    I chose, 0,12,24,.... but you can change the offset of selectevery . e.g. you might want 1,13,25,....
    http://avisynth.org/mediawiki/SelectEvery

    I used simple subtitle("change this one"), but you can change the x,y position, font, color etc... to place wherever you want . The default is x=0,y=0, so you will see in the example it's in the top left corner
    http://avisynth.org/mediawiki/Subtitle

    You need stickboy's applyevery.dll for DeleteEvery(), and InterleaveEvery() - the other filters are internal avisynth filters that come with standard install
    http://avisynth.org/stickboy/
    Image Attached Files
    Quote Quote  
  5. Yeah, this is simple using AviSynth. I wonder if the instructor knows about it, or is expecting the students to use some NLE for the job.
    Quote Quote  
  6. Originally Posted by manono View Post
    Yeah, this is simple using AviSynth. I wonder if the instructor knows about it, or is expecting the students to use some NLE for the job.
    It might seem like a "simple task" for avisynth, but it's actually quite difficult to do in a NLE
    Quote Quote  
  7. What kind of class is this?
    Quote Quote  
  8. hello poison, i tried your script and it worked perfect! =)

    now i'm working on it thanks!
    Quote Quote  
  9. Cheers , glad you got it working. Avisynth can be confusing at first

    Now what kind of "mean" teacher would give you homework over the Holidays!
    Quote Quote  
  10. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Whew! That sounds like a bunch of work.

    Why not make a 12-frame loop, set to repeat, stretch it out as needed, and composite it against the original? Of course frames 1-11 would be all white.

    The 12th would be a still.
    Quote Quote  
  11. i was also trying to place a picture (just for fun/curiosity) but can't found the solution, do you have any idea?
    Quote Quote  
  12. Originally Posted by tonyalcapon View Post
    i was also trying to place a picture (just for fun/curiosity) but can't found the solution, do you have any idea?

    it's the same method / same idea , just use ImageSource() instead of subtitle
    http://avisynth.org/mediawiki/ImageSource

    using the example above

    Code:
    BlankClip(length=300, width=640, height=480)
    AssumeFPS(30000,1001)
    ShowFrameNumber()
    ConvertToYV12()
    a=last
    
    
    ImageSource("image.jpg", 0,300, fps=29.97)
    ConvertToYV12()
    LanczosResize(640,480)
    AssumeFPS(30000,1001)
    SelectEvery(12,0)
    replaced=last
    
    
    a
    DeleteEvery(12,0)
    InterleaveEvery(replaced, 12,0)
    The "trick" is that the image has to be the same format in terms of colorspace, fps, dimensions etc...
    That's what the ConvertToYV12, LanczosResize, AssumeFPS etc... are for . You just change the parameters to match whatever your source video is
    Quote Quote  



Similar Threads

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