NatronGitHub / Natron

Open-source video compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
http://NatronGitHub.github.io
GNU General Public License v2.0
4.65k stars 338 forks source link

(Bug): Write node will not render video with FPS value above 100 #822

Closed soandnb closed 2 years ago

soandnb commented 2 years ago

Make sure to follow our issue report guidelines

Natron version

2.4.3

Operating system

Windows 10 21H2 19044.1766

System specs

RAM: 32GB (2x16GB DDR4 3600MHz clocked at 3200MHz) Ryzen 2700X Vega 64

Did you install Natron using the official installer?

Custom installation path

No response

What were you trying to do?

Render a video at 120 FPS.

image

What did you expect to happen? What happened instead?

I expected the video to have a framerate of 120. Instead, the video had a framerate of 100, which coincidentally is the maximum the slider in the Write tab will go. image

120fps test.zip Furthermore, saving the project with any values above 100 FPS in the Write node will be set to 100fps,

Step-by-step reproduction instructions

  1. Start Natron
  2. Open attached file and set the FPS in the Write1 node to 120, or create a project with a Writer node with the FPS parameter set above 100
  3. Render the video
  4. Play the resulting output (if you have the monitor and the eye to see 100+ fps videos) or check the details for the framerate. It will say it's at 100 FPS.

Additional details

I first encountered this error when working on a much more elaborate project. However, the problem occurred in exactly the same manner when creating this simple demo project with no external files being read by Reader nodes. Therefore, I can safely conclude the glitch does not originate within my elaborate project.

Furthermore, I have ruled out the slider going from 1 to 100 on the FPS value in the Write node being a deliberate hard cap, as Natron has plenty of other sliders with minimum and maximum values that can be easily exceeded by manually typing in the numbers in the input boxes located next to them. Also, since the Viewer itself is capable of rendering and previewing a project at framerates higher than 100 (both the demo project attached and the elaborate project I was working on use a framerate of 120, and it previewed at that FPS no problem), this is further evidence that the limit to the FPS parameter in the Write node is an oversight.

rodlie commented 2 years ago

Looks like WriteFFmpeg is capped at 100: https://github.com/NatronGitHub/openfx-io/blob/22751c949f0992644af2bf70bbffc438fbb10caa/FFmpeg/WriteFFmpeg.cpp#L5456

Easy fix, what should the max be?

Shrinks99 commented 2 years ago

Is there a good reason to have a maximum displayed to the user? Do all float knobs have sliders in Natron?

If no, I think 360 is the highest refresh rate that monitors are at now and provides a good practical upper limit.

YakoYakoYokuYoku commented 2 years ago

FFmpeg assigns FPS with the AVRational type, which uses 32 bit signed integers for both numerator and denominator, this means that a ratio of INT_MAX / 1 (i.e. 2147483647 / 1) is the maximum outside from what codecs support. GStreamer also uses INT_MAX as the framerate top for many encoders. Browsing for what other compositors do yielded no information, so no clue there.

IMO 165.0 would be a safer choice for a maximum, keeping in mind that those might be the most frequent monitors in the higher Hertz range. Another choice is 240.0, though there are lesser options than the previous. 480.0 could be an exaggeration but at least vendors like LG had announced that they are going to release them to the market. Aside from that there aren't that many TVs with a higher display refresh than 144 Hz. So I'd say go for 165.0 or 240.0.

soandnb commented 1 year ago

Hmm, is it possible to leave it uncapped? I'm sure someone will have an unusual use case that would require a high fps. If there has to be a limit, I would guess 240 FPS is a good cap, based on my limited knowledge of the high-refresh-rate monitor market. 144 would be a good max value for the slider, even if the input could go higher.

On Tue, Jul 5, 2022, 10:10 AM Ole-André @.***> wrote:

Looks like WriteFFmpeg is capped at 100: https://github.com/NatronGitHub/openfx-io/blob/22751c949f0992644af2bf70bbffc438fbb10caa/FFmpeg/WriteFFmpeg.cpp#L5456

Easy fix, what should the max be?

— Reply to this email directly, view it on GitHub https://github.com/NatronGitHub/Natron/issues/822#issuecomment-1175107368, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ5TNCZMZTBKZFLLGIEXV5DVSQ65RANCNFSM52WGA7SQ . You are receiving this because you authored the thread.Message ID: @.***>