Page 1 of 1

Exporting from "VideoFile" module doubles frames

Posted: Fri Mar 18, 2022 5:23 pm
by Raul
Hello,

I have been having this issue ever since I've upgraded to a new computer with a high-end GPU.
Basically every time I try to export something using the VideoFile module, the exported clip has every 2/3 frames repeating the previous frame, so instead of exporting each frame like from the original input, it doubles some of them, resulting in a choppy export.
I have tested this with no additional modules, and I have tried various export methods, and even PNG sequences give the same error. I have also tried exporting at different FPS, enabling/disabling throttling and double buffering etc. and nothing seems to work.
I have a 3080Ti and Windows 11, but I also tried this on a 2070 with Windows 10 and the same thing happens, whereas I've never had such an issue on my old laptop.

Does anyone know any other settings I might try to fix this? It's really bothersome since I use a lot of the effects from MMV on my videos.

I appreciate any tips you can give me, and thanks for the amazing software.

Raul

Re: Exporting from "VideoFile" module doubles frames

Posted: Tue Mar 22, 2022 5:17 pm
by Magic
If the VideoFile module's video is 24 fps and you're exporting at 60 fps, then yes, that's exactly what would happen.

Re: Exporting from "VideoFile" module doubles frames

Posted: Wed Mar 23, 2022 8:56 am
by Raul
Thanks for the response, but unfortunately this happens even if the FPS are the same.

Re: Exporting from "VideoFile" module doubles frames

Posted: Wed Mar 23, 2022 5:43 pm
by Magic
I can't reproduce this problem on my machine.

So if your VideoFolder module is playing a video at 24fps, and then you do a movie export at 24fps, and then you get some frames doubled in the exported movie, does this mean that the non-doubled frames are lost completely?

Re: Exporting from "VideoFile" module doubles frames

Posted: Thu Mar 24, 2022 8:45 pm
by Raul
Yes, that's correct.

This also happens using the VideoFolder module, and using video files with different encoding.
I even tried stacking up a bunch of Antialiasing modules, just to forcefully slow down the machine when exporting, hoping that would fix it somehow.
I also made sure to close every other software that might interfere.

All the videos play back smoothly in the Magic window, it's just the export that doubles every 2 or 3 frames (it doesn't always double every frame, sometimes it doubles every 2 or 3 frames).

It's really inexplicable to me... I'd much appreciate any tip you could give me to work this out

Re: Exporting from "VideoFile" module doubles frames

Posted: Fri Mar 25, 2022 5:52 pm
by Magic
Can you post a screenshot of the VideoFolder module and any other subsequent modules in your project?

Re: Exporting from "VideoFile" module doubles frames

Posted: Sat Mar 26, 2022 8:31 am
by Raul
There are no other modules, this happens with just the VideoFile/VideoFolder modules, on default with just the input video file loaded, connected to the Magic module...

This issue does not present itself however when exporting from any other module that generates the visuals in real time, like shaders and such.

Re: Exporting from "VideoFile" module doubles frames

Posted: Sat Mar 26, 2022 4:44 pm
by Magic
Ok, well since this doesn’t happen on your old laptop, the only thing I can suggest is to compare your graphics card settings between your old and new computers, because that seems to be the decisive factor. If you want, you can post a screenshot and I can see if there are any settings that stand out in particular.

Re: Exporting from "VideoFile" module doubles frames

Posted: Sun Mar 27, 2022 10:38 am
by Sadler
You would think, at least in principle, that this scene would generate one number/frame.
Screenshot 2022-03-27 110645.png
Screenshot 2022-03-27 110645.png (28.14 KiB) Viewed 5533 times
But this is what it looks like exported at 24fps - 3,6,9 etc does not exist in the file.
Frames wrapped manually to fit on screen
Frames wrapped manually to fit on screen
frame-numbers.jpg (40.98 KiB) Viewed 5533 times
Tried
Throttle: 0 and 10
Double Buffer and Vertical Sync on and off
frame-export-doubling.magic
For convenience
(1.53 KiB) Downloaded 273 times

Re: Exporting from "VideoFile" module doubles frames

Posted: Mon Mar 28, 2022 8:55 pm
by Magic
I tried it with a simplified project, just the following module:
Capture.PNG
Capture.PNG (14.17 KiB) Viewed 5503 times
The Text parameter is: 0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\20\\21\\22\\23

The Line # parameter has no source and then an Increase modifier with 24 as the value. This makes it increase from 0 to 24 in exactly 1 second.

If I export this as a png sequence at 24 fps with a duration of exactly 1 second, I get a perfect sequence of png images counting from 0 to 23.

To me, this is the expected result.

To make it a slightly better test (for simulating video playback), I tried using Increase(1) and Scale(24), but it yields the same expected result.

So in other words, nothing seems to be broken with timing here on my side.

Can you try, Sadler and Raul?

Re: Exporting from "VideoFile" module doubles frames

Posted: Tue Mar 29, 2022 6:54 am
by Sadler
I can confirm that this (with a Wrap on 24 added) gives expected results for at least 10 seconds - mp4 1080p24. I used Media Player Classic to step through the frames.

Re: Exporting from "VideoFile" module doubles frames

Posted: Tue Mar 29, 2022 8:41 pm
by Raul
I did the test and the first export, from the text module, gives expected results, exported as mp4 file.
However, when using that same mp4 file in the VideoFile module, and re-exporting it at the same framerate, it doubles the some of the frames, therefore some of the numbers disappear (it becomes 0, 2, 2, 3, 5, 5, 6, 8, 8, 9, 11, 11...). Same results with double buffering and vsync on and off, and with throttling at 1ms and 100ms.

I am unable to access my old laptop to compare my graphics card settings, but from what I recall it had just an Intel integrated graphics card so I don't think there'd be much to compare between it and my new configuration.

I also updated my Nvidia drivers today but it hasn't fixed the issue, Studio or Game drivers don't seem to make a difference. I tried changing some of the parameters in the graphics card settings, but the ones that I've tried haven't fixed anything it seems. Are there any settings in particular I should look into?

Re: Exporting from "VideoFile" module doubles frames

Posted: Thu Mar 31, 2022 7:33 am
by Sadler
Me too.

Exporting from a text module puts all frames in. Exporting from the same video file doubles frames.

One can export the video with the text module included in the same scene. Then in the export the text module displays all numbers but the video does not.

Re: Exporting from "VideoFile" module doubles frames

Posted: Mon Apr 04, 2022 5:34 pm
by Magic
Ok, I have a notion that there may be an infinitesimally small error in the Video modules that has to do with double-precision rounding of time values, and it may be machine dependent which is why it's gone unnoticed for so long. I will see what I can do.

Re: Exporting from "VideoFile" module doubles frames

Posted: Tue Apr 05, 2022 4:20 pm
by Raul
Hope you can fix it! Thank you so much