Menu

#288 about RemoveFrames filter

open
nobody
filter (14)
question
2020-06-02
2020-01-13
Anonymous
No

A DirectCopy mode needed to remove Duplicate Frames throughout video.

Keep | Remove | Keep | Remove | Keep | Remove | Keep | Remove | Keep | Remove | etc

Any Frame Rate options aren't doing anything to remove the duplicate frames. I'm needing a better solution that works with DirectCopy. This is just the same as basic editing removing multiple frames then no encoding needed.

Source is 50fps
Destination would then become 25fps
Audio I can be corrected later with VD2 or at the same time with VD

1 Attachments

Discussion

1 2 > >> (Page 1 of 2)
  • Anonymous

    Anonymous - 2020-01-13

    Of course also so the video plays 25fps smoothly afterwards.

    Frames repeat same way throughout the whole video.

     
  • Anton Shekhovtsov

    FYI this is h264 encoded video with P and B frames and removing any frames in 'direct' way is very difficult (if possible at all).
    Why do you insist on DirectCopy? Convert it to lossless format instead if you want every bit preserved.

     
  • Anonymous

    Anonymous - 2020-01-14

    Takes far to long to encode even using Fast Recompress or Full Compression with Smart Render.

    P, B frames is the issue the video loses to much information to decode Predictively and Bi-Directionaly.

    Maybe VD2 to overcome this limitation have an option on the Frame Rate option panel to set an I frame every X frames. This would be possible with DirectCopy. Then the P and B frames would be reset. Unless that is h264 P and B frames are totally different to MPEG2 frame types I/P/B.

    Else is there anything that FFMpeg can do after Frame Rate adjust if can get that to work wit this video to make video good again. Such as -fflags +genpts or other such command you could have VD2 use (as an extra option).

    If none of the above know of any other software that is able to do this without encoding.

     
  • Anonymous

    Anonymous - 2020-01-14

    Basically just needing to remove the frames.

    If I was to do this using the Fast Recompress (fr) or Full Compression with Smart Render (fcsr) using Frame Rate options the speed is then the issue.

    I realise time to decode needed to taken into account but still far to slow for simple edit and I,P,B frames. Which is then based on I frames distance the video already has. Any ideas or modification for VD2 for this to make speed faster to do the above.

     
  • Anton Shekhovtsov

    I barely understand. Full recompress to format like utvideo is about the same speed as just decoding. What speed and amount of video are you talking about?

     
  • Anonymous

    Anonymous - 2020-01-18

    Thanks will start a new post about for the same result but as you indicate need to compress.

     
  • Anonymous

    Anonymous - 2020-01-18

    Actually decided not to and continue here seems more sense. Since will be using the same attached file that I initially attached.

    The end result I'm needing for this and files like it is to remove duplicate frame and half the file size to what the actual file size should be.

    I tried with your Remove Frames filter with Full Compress And Smart Rendering just for speed alone. This is nearest we will get to Direct Copy while able to use filters.

    Have you thought of coding Remove Frames into Virtualdub so can be used with direct copy and not be a filter. This would make sense and the speed then would be fast as file copying saving a great deal of time.

    It seems to me so far the filter will only work when Delete And Fix Rate is selected. As long as the [ Frame Rate - Convert to fps: 25.0000 FPS ] is also set. Without it doesn't do anything with the clip. It then processes the video the saved output video and audio is correct. It doesn't have the problems that can give when removing frames and reducing frame rate.

    Previous to this [ Frame Rate - Convert to fps: 25.0000 FPS ] would convert to 25 FPS but would not remove the duplicate frames. Decimate would give problems slow motion and others. So this filter is a solution.

    There are other video I come across sometimes where they are random duplicate frames. So ask if you can explain the use with Compare frames and Load From File.

    Do we or does the filter build the file that we later load from. Based on what the user needs and selects in the filter selection boxes. If so how do we use the Compare Frames option to build the text file so able to load it. If this is what these options do.

    That said I am interested for the at least Delete and Fix Rate to be encoded into Virtualdub2 so can be used as Direct Copy if possible. Because nothing gets close to the Remove Frames filter and I have been looking for a long while.

     
  • Anonymous

    Anonymous - 2020-01-18

    Ok I read the filters page again rushed past it the first time. To download the filter to try it.

    This is example of 2-pass filter if you want to make one:
    1st pass (analyze) compares frames and remembers results (can be saved with project).
    2nd pass is frame manipulation (typical work for filter).

    I guess we need to Run Analyse Video first to get the 1st pass and the use that .txt as is or with modification with Load File in a 2nd pass.

    For now the frame duplication are removed well with Delete And Fix. The above will suite those videos that have the more random duplicate frames patterns.

     
  • Anonymous

    Anonymous - 2020-01-18

    Looks like not all these videos I have are repeatable duplicate frames. Watching back a small clip of another video shows dropped frame. Remove frames got one wrong which is likley the problem most of these frame removers have to deal with what is what is or isn't duplicate. That said the frame is motion so should be seen as motion.

    I can see when the frame is not motion is becomes harder to differentiate and probably then where frame remove filters fall. I had high hopes, high hopes.

    Figured out the compare frames select Do Nothing and then Compare. Can you tweak so that it can compare faster for a very fast high speed compare. Such as speed when making an mkvindex for MKV videos or similar.

     
  • Anton Shekhovtsov

    About remove frames
    You can use "analyze" or provide your own list of frames instead. These are 2 independent choices.
    If you see wrongly detected frame maybe you can lower threshold?

    Direct copy per frame is not going to work with h264 no matter where I put the filter. Also smart rendering is unrelated and useless option in this case.

     
  • Anonymous

    Anonymous - 2020-01-22

    Remove Frames 2 Pass FIlter
    1st pass Compare Frames analyse video.
    2nd Pass Choose a Mode to process the video with.

    Tompare Frames analyse mode is extremely slow and needs to be many times faster. Is there anything you can do to speed this up so analyse multiple times faster. With both compressed and uncompress video mp4 compressed AVC1,h264 etc and avi losless compressed.

    Location of the file that Compare Frames analyse makes. So we can use that again for same video with no changes later. Or we can change that file and use Load From File to use it further.

    Threshold what are the possible minimum and maximum vales it will accept, Default is 0

     
  • Anton Shekhovtsov

    Speed: yes can be faster but not much, maybe 3x (there may be unnecessary format conversion which I can remove).
    Location of file: after you save project the file is in project specific folder. For same file I guess you can just load the project and do nothing more.
    Threshold is acceptable pixel difference
    0 : must be completely identical
    255: accept anything (delete all frames)

     
  • Anonymous

    Anonymous - 2020-02-01

    Any progress on the update for the Remove Frames filter

    [Quote Anton]
    Speed: yes can be faster but not much, maybe 3x (there may be unnecessary format conversion which I can remove).

    Found the files made they are located in Virtualdub2 folder
    Folder name:job_XYZ123_1.vd
    (XYZ123 not actual values here. Maybe this represents the md5 value of the video ?)
    Filename:.75ae.frame_stat.txt

    Thanks for the info including the threshold which helps understanding more of the filter controls.

    Can the filter also be made to work with Virtualdub final build and other near previous builds to the final build. I tried it with Virtualdub final the filter shows but am unable to start the compare mode.

     
    • Anton Shekhovtsov

      "Any progress"
      Not yet

      "md5 value of the video ?"
      Just random unique name

      "work with Virtualdub final"
      Possible with some compromise. Why?

       

      Last edit: Anton Shekhovtsov 2020-02-01
  • Anton Shekhovtsov

    • labels: Removing Consecutive Single Repeating Dupilicate Frames --> filter
     
  • Anonymous

    Anonymous - 2020-02-02

    Ok hope it gets updated soon.

    md5 - just a guess never checked. Random name ok so no problem there writing it here.

    Agree why and for what reason would you compromise your filter. Better it works best it can to the same ability if possible.

    Unless the compromise is for Virtualdub code itself not having some ability that you have overcome and coded into Virtualdub2.

     
    • Anton Shekhovtsov

      Exactly, depends on new features of vd2 (analyzing frames, storing results).

       
    • Anton Shekhovtsov

      I uploaded new version of the filter. It fixes the unnecessary conversion, but I don't promise a miracle improvement

       
  • Anonymous

    Anonymous - 2020-02-03

    Thanks have it, will try it

     
  • Anonymous

    Anonymous - 2020-02-08

    Your right not speed increase but as you say was only 3% not to expect much.

    Something that puzzels me. As we have to wait forever and an age for the compare to complete on an hour video (2hrs 20 min) please make it faster much faster if you can.

    So we have a compare log but having many which one is which for which video. Better if each log had the video name then we can load the correct one. Then we could have one folder for all compare jobs saves navigating in-out of each to find the video name for the compare job save to load.

     
  • Anonymous

    Anonymous - 2020-02-08

    Also needing a way to add these to batch so can run the compare process for each video alone in the background. Then later process the video after adjusting for other compare frames options.

    1hr video

    USB compare frames read 2hr 20min (need faster USB. Maybe it's ok for source read to encoder but not for video analyzing tasks where speed is needed.)

    HDD compare frames compared analyse same video 35mins

    VideoFileName_FrameStat.txt (better name for this file)

    With the batch it the VideoFileName_FrameStat.txt file doesn't get deleted. It only does so when it is removed from the batch list.

    When processing video without using the batch the VideoFileName_FrameStat.txt is deleted immediately after the video has completed. This is bad the file needs to remain un-deleted since it can be needed again as needed further work with the video.

    Suggested VideoFileName_FrameStat.txt would improve on the current name. And is also clear what the file is and for which video. Having all these VideoFileName_FrameStat.txt all in one folder in VD2 makes sense for ease of finding and need only navigate to one folder.

     
  • Anton Shekhovtsov

    There is something wrong in performance for you.
    I give you some reference:
    1920x1080 video, h264 encoded.
    Analyzing pass for 10000 frames takes ~16s.
    You can also do this test, just open the video and click menu Tools->Benchmark analyze pass.
    This only measures reading and decoding the video: this is absolute minimum of time required to do anything with video. I can't compare frames faster than decoding.
    Then, remove frames/compare takes roughly the same time. This is very lightweight filter, there is absolutely nothing to optimize.

     
  • Anonymous

    Anonymous - 2020-02-08

    Ok I will take a look in case I have a bottle cause by performance or options settings. Also a way to optimize for better performance using the same method.

    A very nice lightweight filter.

    Hope the other options I mentioned can be realised the video filename and no delete would help processing greatly.

    I also tried the filter in Virtualdub and see that it is still disabled there. Hope you can enable the filter for use also with Virtualdub.

     
  • Anonymous

    Anonymous - 2020-02-28

    Needing now also an option Compare Frames as a Tick box (select box, check box). so we can also use all the Remove Frames for batch processing.

    As a batch process with selected Compare Frames Tick box. The batch will then processes the video for all options we have selected in the Remove Frames filter such as...

    Compare Frames (will do so if no VideoFileName_FrameStat.txt is found, will it know if all frames have been checked, would be nice if it did know and continue Compare) ..or continue to next selection such as..

    Delete And Fix Rate

    Or other as the user may have selected.

     
  • Anonymous

    Anonymous - 2020-03-01
    1. RemoveFrames Filter > Compare Frames
    2. RemoveFrames Filter > After above select DeleteAndFix
    3. FrameRate > Set to a new FrameRate
    4. Encoder Settings > Set
    5. Add video to batch

    Friday:
    I added 3 videos with above process left the batch do its thing. The pc shut it self down after batch jobs completed.

    Saturday:
    With the 3 batch jobs from Friday still on the batch jobs list which is normal thing to do.

    All day I added 6 more videos each one using the same process as above. When got to the 6th video I got an error VD2 couldn't find the 75ae.frame_stat.txt (may have someother name not 75ae I forget). So I check the Virtualdub2 folder and see only four folders for RemoveFrames, instead of expected 8 or 9 folders that should have been there all I see is four three from Friday and only one from all the 6 videos I had just added !!

    I have no further info to give appreciate if you can take a look at VD2 or filter code to see if can find and fix.

    We need the Remove Frames Filter to be capable of running from a batch job so it can automate..

    1. Compare Frames
    2. Delete And Fix Frames

    Including other Remove Frames Filter selected options.

     
1 2 > >> (Page 1 of 2)

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB