AaronFeng753 / Waifu2x-Extension-GUI

Video, Image and GIF upscale/enlarge(Super-Resolution) and Video frame interpolation. Achieved with Waifu2x, Real-ESRGAN, Real-CUGAN, RTX Video Super Resolution VSR, SRMD, RealSR, Anime4K, RIFE, IFRNet, CAIN, DAIN, and ACNet.
https://patreon.com/aaronfeng
Other
12.98k stars 874 forks source link

[BUG] wrong framecount in the output after interpolation #629

Closed cd1188 closed 1 month ago

cd1188 commented 2 months ago

Software Version Waifu2x-Extension-GUI-v3.116.01-Premium-Win64 (Relase)

Problem: If I interpolate a video or an image-folder with Rife, I have the following problems (I only use interpolation)

Example 1: Input: 000001.avi (20 frames) Output: 000001_W2xEX_VFI_avi.mkv -> framecount of 40 is correct but frame 19 and 20 are Identical!! That means that all frames after 20 are shifted by one (bad for sound or composition work afterwards)

Example 2: Input: Folder IMG (20 frames) Output: Folder IMG_VFI_W2xEX -> interpolation is correct but only 39 frames are there (should be 40)

INFO: If I call "rife-ncnn-vulkan_waifu2xEX.exe" direct from CMD, I'm getting the correct framecount of 40 and the last frame is doubbled wich is good! Time of input and output is than correct

I have attached a zip-file with the examples Waifu_bug.zip

BTW: I like that you are using the RIFE implementation from 'nihui' ,because I have tested other tools like RIFE-App or Flowframes and both produce the interpolated images a little brighter than the original images and I have a slight flicker in the video with both of them. After a long time I have found nihui and your tool and I have now absolute no flicker! :) At first I thoungt it must be Rife itselfe, but I think there must be a color conversion bug in the other tools? I am glad that I can now use Rife.

AaronFeng753 commented 2 months ago
  1. There is no "all frames shift by 1" issue just because you see one duplicated frame, and waifu2x won't mess with frames in the middle of a frame sequence
AaronFeng753 commented 2 months ago
  1. Thank you for reporting the "last frame removed" issue, it shouldn't be removed in some situations (including the one you mentioned) I will address this issue in the near future update
cd1188 commented 2 months ago
  1. There is no "all frames shift by 1" issue just because you see one duplicated frame, and waifu2x won't mess with frames in the middle of a frame sequence

Sorry but for me is after frame 20 a frameshift, if I export as a Video. I do a lot of compositon work and thats not optimal. Maybe others don't mind, but until it is not fixed, I will use the output from the image-sequence folder for work. This bug has not a high prioritiy, but I would fix this.

frameshift

AaronFeng753 commented 1 month ago
  1. Thank you for reporting the "last frame removed" issue, it shouldn't be removed in some situations (including the one you mentioned) I will address this issue in the near future update

This will be fixed in the next beta update which will be released very soon

AaronFeng753 commented 1 month ago

Output: 000001_W2xEX_VFI_avi.mkv -> framecount of 40 is correct but frame 19 and 20 are Identical!!

I just applied 2x frame interpolation to your video and the frame 19 and 20 are clearly not identical

1

🔗Cache files: Cache files.zip

AaronFeng753 commented 1 month ago

✅ Fixed in v3.116.13-beta and later versions

cd1188 commented 1 month ago

Thanks! 3.116.13-beta is working now with correct lenght and without duplicate frames in the middle!

Btw. I have reinstalled v3.116.01 and tested many different settings and I have found out that if I disable the option 'Maintain consitent Video FPS' then there were no duplicate images, otherwise, I wasn't lucky to get rid of the duplicte images in the middle.