Hi... Please let me know, if exist a procedure for creating a log file that enlist all the dropped frames.
For example I have this file (the same I used in another thread) for learning reason:
https://drive.google.com/file/d/1tiqyLmlTFuI1Nnx_JXB0-EYKk2woQIRU/view?usp=sharing
With the help of Jagabo I used:
ShowFrameNumber(x=10, y=20)
If my assumption is correct, there is one dropped frame every 20, right? This is part of the concert, but I have seen that the pattern is the same for the entire concert.
I was using this old thread
https://forum.videohelp.com/threads/407054-Duplicate-Frames-or
but I don't understand this post:
https://forum.videohelp.com/threads/407054-Duplicate-Frames-or#post2668081
Why if in the old thread there are two dropped frames every 50, with selecteven, are selected 61 and 63 instead of 51 and 53?
Please if you can give me a script to fix this, thanks.
+ Reply to Thread
Results 1 to 30 of 33
-
Last edited by salvo00786; 24th Jun 2023 at 13:11.
-
Dups are easy to find but dropped frames are difficult because detection relies on sensing a jump between frames that is larger than the normal temporal difference between nearby frames.
I did write an AVISnyth script which attempted to deal with this:
Automatically fix dups followed (eventually) by drops
Note that it also talks about duplicates. That is because, in most situations, a dropped frame is usually "made up for" by adding a duplicate frame shortly after the drop. If this weren't done, the audio would be out of sync after a few drops.
Here is another thread about the same topic, but with different solutions offered.
Dropped frames -
Hi johnmeyer. Thanks I read these threads, and I have tried your scripts. After using your script, the problem decreases but remains. Sometimes ago, Jagabo gave me a completely smoother file, with the problem totally resolved. Your script is very useful because I have tried it on other files, but this file is very difficult to repair.
-
-
The pattern is set in your example, every 20th frame is missing - between 3,4 , 23-24, etc...
Code:orig = LWLibavVideoSource("002 - Copia.mkv") orig.selectevery(20,3,4) z_convertformat(pixel_type="RGBPS", colorspace_op="709:709:709:l=>rgb:709:709:f") RIFE(model=5, sc=true , sc_threshold=0.11).selectevery(8, 1,5) z_convertformat(pixel_type=orig.pixeltype, colorspace_op="rgb:709:709:f=>709:709:709:l") replace=last interleaveevery(orig, replace, 21,4)
Last edited by poisondeathray; 24th Jun 2023 at 15:18.
-
poisondeathray, thanks for the script. I somehow missed RIFE. When did that get developed? I'll have to try it out!
-
RIFE was ported to AVS+ Aug 21, 2022
https://github.com/Asd-g/AviSynthPlus-RIFE
This is the NCNN version - that means it runs on vulkan and is quite a bit slower than the CUDA or Tensor version in vapoursynth if you have a Nvidia card. But vulkan version can run on all modern GPU's , so it's more accessible to everyone -
Hi... I was using this script, but probably I am wrong because this doesn't resolve completely my problem.
FrameRateConverter(FrameDouble=true)
SelectEvery(20, 0,2,3,4,6,8,10,12,14,16,18).
Is rife better or there is an error in my script? -
It would be
Code:SelectEvery(20, 0,2,4,6,7,8,10,12,14,16,18)
RIFE is a frame interpolator, just like FramerateConveter . It uses machine learning, the results are generally better - there are fewer artifacts, less blending. But it's much slower. Newer versions of FrameRateConverter have the option to use RIFE as well .
EDIT: that's not right either for SelectEvery... It should be every 40 for 1 cycle, because you're selecting from the FRC output in that script . I'll look at it later, but the script in post #5 worksLast edited by poisondeathray; 24th Jun 2023 at 16:47.
-
The pattern repeats every 20 frames. After doubling the frame rate those 20 frames have increased to 40 frames, with the even numbered frames the original frames, and the odd numbered frames the interpolated frames.
Code:SelectEvery(40, 0, 2, 4, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38)
RIFE usually gives better quality motion interpolation. But it's much slower and only works on planar RGB. -
Ok, thanks for all your replies. I have not considered the fact that after doubling frames, the frames are not in the same position as before.
Is Rife the best frame interpolator that I can use with Avisynth?
How is the quality of SVPflow? -
Overall, yes . The 2.3 and 2.4 models are generally the best for general use, but slower. The 4.x models are about 2x faster
Look on your video - the images are cleaner, less ghosting and lblending
How is the quality of SVPflow?
Newer versions of SVPFlow use RIFE too now, but not avs version has not been updated
You can use RIFE with SelectEvery only. It looks simpler, and the end results are the same as the RIFE + InterleaveEvery script
Code:z_convertformat(pixel_type="RGBPS", colorspace_op="709:709:709:l=>rgb:709:709:f") RIFE(model=5, sc=true , sc_threshold=0.11) z_convertformat(pixel_type=orig.pixeltype, colorspace_op="rgb:709:709:f=>709:709:709:l") SelectEvery(40, 0, 2, 4, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38)
-
I think that I can use safely the 4.6 model because after that I am taking 1 new interpolated frame every 40, and I will discard all the new interpolated frames.
But with this, you are telling me that 2.3 and 2.4 models are better than the last 4.6 model?Last edited by salvo00786; 25th Jun 2023 at 11:22.
-
I would still use the InterleaveEvery script, because it's faster . It's interpolating fewer additional frames that you are only discarding later
But with this, you are telling me that 2.3 and 2.4 models are better than the last 4.6 model?
You can test it yourself, examine a few frames, maybe 4.x is good enough for on this source (it probably is). But FRC using mvtools2 is clearly worse on your source
A certain model might "solve" a given frame almost perfectly , but another might fail on the same frame, you might have to switch to say 3.0 for one frame. Maybe 2.8 for another. It's just the way machine learning models work. Or maybe mvtools2 might solve one frame better- I've seen this happen and can post examples where 99% of the frames RIFE solves , but a few frames it misses (artifacts), but mvtools2 works on a given frame, but fails the others. You might have to mix/match if you want to improve results. On some types of content, they all fail miserably. If you want to use a general "best" model for live action content, set and forget - it would be 2.3 or 2.4. If you care more about speed, use a 4.x model -
Ok thanks. Another question, please can you tell me the commands for convert the colors to RGB48le and to BT709 and what is the best plugin for the conversion?
-
I have to convert a file to RGB48le, upscale it in Topaz and after topaz reconvert it in BT709. This is my question.
Is this the right way?
ConvertToRGB48(matrix="rec709")
Use Topaz
ConvertToBt709(matrix="rec709")
II know that there are two rgb48, rgb48le and rgb48be, but please can you explain me the differences? le and be stands for? Rgb48 is a 16 bit depth file or is a 8 bit depth file?Last edited by salvo00786; 25th Jun 2023 at 14:23.
-
Code:
ConvertToRGB48(matrix="rec709")
rgb48le is little endian, rgb48be is big endian
RGB48 is 16bit packed RGB . gbrp16le is 16bit planar RGB, little endian
After topaz , if you load an RGB file (such as image sequence) and want to convert to 8bit YUV 4:2:0 (you didn't specify the end format you wanted)
Code:ConvertToYV12(matrix="rec709")
-
I am not using image sequence. What container I have to use because of RGB48? Probably not a h264 mp4, because is 8bit, right? Ok and if I convert to rgb48 is not important if the file is a be or le? After Topaz i want to convert it to 10bits bt709 into a prores mov file
Last edited by salvo00786; 25th Jun 2023 at 16:34.
-
h264 doesn't support 16bit RGB
16bit RGB PNG or TIFF image sequence, always works
16bit RGB FFV1 in MKV used to work, but got broken in some versions
AVS input used to work, but got broken in some versions
EXR image sequence used to work, but got broken in some versions .
You can ask on Topaz forum too
Ok and if I convert to rgb48 is not important if the file is a be or le?
After Topaz i want to convert it to 10bits bt709 into a prores mov file
What format are you exporting from Topaz?
I use PNG image sequences in/out -
Little endian and big endian. Multibyte values (16 bits is two bytes) can be stored with the low order byte first, followed by the high order byte, little endian; or the high order byte first, followed by the low order byte, big endian.
https://en.wikipedia.org/wiki/Endianness
16 bits per channel. Ie, 16 bits for each red, 16 bits for each green, 16 bits for each blue.
Then there are interleaved vs. planar formats. In interleaved formats the channels are interleaved: RGBRGRGB.... In planar formats all the R are stored first, then all the G, then all the B: RRRRRR...GGGGGG....BBBBBB... -
Ok, thanks, this is very informative.
For poisondeathray, usually I export in h265 mkv.
Now I am experimenting with Iris and I like it very much (not too sharp, very natural). After that with Staxrip, I use CASm (the upgraded CAS) for sharpening and sometimes f3dkbneo for add grain.
Sometimes I give a file two passage, one in TOPAZ VIDEO ENHANCE AI 2.3.0, when I use the Alq-8 at 100% or 120% (one of the best models of all Topaz version for me). After that i go on with Proteus model or now with the Iris model -
What kind of h265 ?
Assuming it's 8bit or 10bit YUV h265, assuming everything was done correctly up to that point (709 matrix in/out) . To convert that to 10bit 422 for Prores HQ ,
Code:z_convertformat(pixel_type="YUV422P10")
Now I am experimenting -
Some programs may support both -- in that sense it doesn't matter. But to clarify, it matters that it's flagged correctly. If you save big endian but flag as little endian (of vice versa) you will get very bad results. And of course, some programs will only support one of the two.
-
Yes poisondeathray, this is very true. I reported a bad bug. The latest version without this bug was the 3.0.11. After that this bug is present in all versions. When the software can't reconstruct detail go in full dehaloing mode and this is true for proteus and for dione robust 4.
-
Hi... Please can you help me with this file? I post an example, I can't find the right pattern for restoring the correct rotation without dropped frames.
Code:FrameRateConverter(FrameDouble=true) SelectEvery(100, 0,2,4,6,8,10,12,14,16,18,\ 20,22,24,26,28,30,32,34,36,38,\ 40,42,44,46,48,50,52,54,56,58,\ 60,62,64,66,68,70,72,74,76,78,\ 80,82,84,86,88,90,92,94,96,97,98,99)
This is the file before my script
https://drive.google.com/file/d/1tkKApUzx2qiMTiXOFU7QyV5djZ0xziyn/view?usp=sharing -
Thank you Jagabo, but I necessary have to use 97 and 99, because after the initial rotation circle the pattern change, but If I use 97 and 99 with your script, the circle rotation is not good. Anyway, probably the easiest solution is to split the file and after the first 16 seconds of the circle with your script, merge the file with my script.
Similar Threads
-
Is a full frame TBC necessary if I'm not getting dropped frames?
By nightowl3090 in forum Capturing and VCRReplies: 16Last Post: 4th Oct 2022, 18:02 -
Deleted
By KhAoS182 in forum Capturing and VCRReplies: 5Last Post: 22nd Sep 2022, 05:12 -
Dropped Frames?
By Craft in forum EditingReplies: 3Last Post: 13th Apr 2021, 11:05 -
How do you know the cause of dropped frames capturing VHS?
By bigbadben in forum Newbie / General discussionsReplies: 3Last Post: 18th Oct 2020, 07:54 -
25fps with duplicates and dropped frames
By embis2003 in forum RestorationReplies: 6Last Post: 12th Oct 2020, 00:43