-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Explicit frame rate control #8
Comments
It's possible by changing the refresh rate of your local computer via the display adaptor settings. |
Hi, I'm in 1920x1080 60hz on my display adaptator and the stream received from NewTek Studios Monitor is 1080p 29.97. The framerate is not the same... |
It also depends on the frame rate of Unity. Do your project keep 60 fps? |
Yes, according to my stats, my project is always upper than 80fps. |
The setting can be set in "void sendFrame" sender.h.
Be mindfull with the settings. I have some problems, but also changed a lot of other things.. |
I thought that the frame rate setting is only meaningful when When I tested the plugin with NDI Monitor and OBS, it worked at 60 fps. I wonder how I can reproduce the problem with my environment. |
I don't have much knowledge. Only puzzle pieces together. |
I found that the behavior was changed in the latest version (3.5) of the NDI SDK. It also causes a frame freeze issue with the Windows version of Studio Monitor (issue #9). I changed the sender code to explicitly set the frame rate to 60. This change has been applied in the following update of the plugin. https://github.com/keijiro/KlakNDI/releases/tag/v0.0.5 This is just a hot fix for the urgent critical issue. I'm thinking of adding a frame rate property to the sender component. |
Nice, thank you ! I'll try that and send you a feeback. Regards, |
It would be great if the frame rate property could be added to the sender component. Love the plugin by the way :) |
@decowboy Just curious but I wonder how you want to use it. Running game at 60fps while sending frames at 30fps? |
Hi @keijiro In short, we'd be running both the "game" and the NDI at 30 fps. |
@decowboy In that case, I think frames are sent at 30 fps even though the receiver app says it's 60 fps. Anyway, thanks for providing the information about your use case. I'll consider it in future updates. |
Hi @keijiro I am having a similar issue here. |
Hi @keijiro, thanks a lot for this wonderful plugin. It works wonders at 60p... but I'd really need to change the frame rate to 25 fps for video output. Could you tell where to do that in the code, if that's feasible? I tried changing the setting in sender.h but sources still appear at 60p in Studio Monitor and the video mixing software I use (Vmix), and it creates all sorts of problems, lags, hicups when trying to mix it with 25 fps footage (I'm in Europe) or other framerates. Thanks a lot, that would be wonderful. |
Support for NDI 4.0 and NDI HX is great, but the framerate still looks hard-locked to 60fps. Has anyone found a way to change that? Thanks for your help. |
I still can't make time for doing research on this topic, but I just wonder why the changes @ericmarodon made didn't take any effect.
Did you change the following line to https://github.com/keijiro/KlakNDI/blob/master/Plugin/Include/Sender.h#L28 I think you also have to change the display refresh rate on your PC to 25Hz. Then it should work. |
Yes, that's exactly what I did. I had numerator = 25 and denominator = 1, but it looks like it's being ignored. So I was wondering if there was a hard-coded 60 fps value somewhere else I couldn't find. I'll try messing with the display refresh rate, but if this was a factor, being in in Europe, I would have thought this would output a multiple or 25 or 50hz, not 60. Thanks for the great work on the plugin nonetheless. |
FYI, I've tried to change the display setting from 60 hz to 75 hz (the only other option I have) but it doesn't change anything. Also I've created a script to set the application.targetframerate to 25 fps, and despite it working in the editor, in both cases, the NDI stream is a steady 60 fps. |
control over the output frame rate would be great. I too am looking to send output ranging from 29.97, 25, 50, to 60 etc. |
Hi @keijiro thanks very much for this plugin. |
I experienced the same issues last week. Changing screen resolution didn't effect the ndi output. It was always 60fps. |
Any progress or update on this? I would also need to make the NDI output be 30fps for broadcast tv. It would be nice if I can run Unity separately at 60fps, though, but not a big deal if it matches the NDI output. The sender.h file has a variable for changing the frame rate, but it's under "iOS" folder, so I'm assuming that's why it doesn't work on Windows? Studio Monitor is always receiving 60fps, even if I change my game's target framerate to 30fps. |
@eric29 That's old information. Now it's on the C# side. You can modify |
Thanks keijiro. I've got an old version of Klak NDI, gotta update. |
@keijiro You wrote: You can modify NdiSender.cs to add frame rate attributes. Can you please tell us how? Can I modify the frameData e.g. for 30/25 fps ? |
@johannesklaer Please check this reply: #8 (comment) You can add The usage is not clearly documented, but you can guess how they work from the comments. |
@keijiro Hi, We have a hard time setting the frame rate in a NDI Stream. we tried to set FrameRateN and FrameRateD, it seems that the framerate is lower (eg. 30 fps), the NDI Monitor shows 30fps but the Datarate increases somehow. Is it possible that we have to feed at a lower rate as well? Thanks for your help. |
What is the Datarate in this context? |
we have different Streams, one of them has around 200 MBit its 3840 * 1024 and streams from a RenderTexture. If we could make the stream play at 30 FPS it would have only 100 MBit, that would be great. Also would be nice if we could switch to YUV for the stream, I tried, but then you have to convert the RenderTexture with the encode shader, I dont know how to change it. |
Have you changed the target frame rate of Unity to a proper value? |
Yes, I tried, but no difference. (Application.TragetFramerate=30). It increases / doubles the datarate. But I found out something weird. If I clamp the Application to 30fps and set the metadata to 300p |
Do you think I could set the TargetFramerate to 60 and render only every second frame to the NDI Stream? |
Then, use it. That kind of weirdness is acceptable because the NDI SDK is a closed blackbox. Or you can ask NewTek about it.
You have to modify the sender code. |
Do you have an Idea how I could switch to a different FOURCC? I can switch it, but it creates just garbage, I think I have to convert It the right way. In Encoder.compute are different conversions, but how can I use them? |
@johannesklaer The discussion is getting off topic. Also I'm afraid that it sounds like free personal technical consulting rather than contribution to the open source project. If you'd like to continue the discussion about FourCC, please create a new issue for it. |
That is fine with me. But can you confirm that the NDI Sender depends on the Games Framerate when streaming? It seems to me the case, but framerate control in Unity is quite awkward (sorry another topic). And if I find out more about NDI I may contribute to this wonderful project. |
It depends on the NDI SDK implementation, and that hasn't been disclosed. |
Hi,
Good job for this plugin. One good thing will be to be able to change the framerate of the stream send, is that possible in any ways ? Like 50/60hz will be great.
Thanks !
The text was updated successfully, but these errors were encountered: