Git Product home page Git Product logo

Comments (10)

leadedge avatar leadedge commented on July 29, 2024

OK I will have a look at it. It shouldn't crash if returning NDIlib_frame_type_none because it isn't doing anything. I have been using the basic classes (ofxNDIsend and ofxNDIreceive) with 3.8 without any trouble. I am not sure why the receiver should require 3.5. It might take me a few days due to other commitments.

from ofxndi.

ertertq avatar ertertq commented on July 29, 2024

Thank you very much for your reply.

I saw this label “Update to NDI 3.5 and Openframewoks 10”. I thought the examples/example-receiver code would work only in version 3.5. Thank you very much.

from ofxndi.

leadedge avatar leadedge commented on July 29, 2024

Yes I have not updated the examples. The rest is updated for 3.8 and is up to date. Let me know whether updating to 3.8 fixes the problem.

Also what sender did you use to get this error? Recent work has indicated that the sender should be clocked or else asynchronous sending will cause problems. If you still get the error, please test with the NDI SDK "C++" sending example "NDIlib_Send_Video.cpp". Also try release as well as debug.

Edit - the examples should still work fine as they are with NDI 3.8 libraries.

from ofxndi.

ertertq avatar ertertq commented on July 29, 2024

Hello, I use VLC Player to play video and send video data stream. VLC has a plug-in option of NDI to send ( NewTek VLC Media plugin ).
And now I found the cause of the program crash, because my Processing. NDI.Lib.x86.DLL file was damaged. After I replaced the new file in SDK, the program work fine.

thank you very much.
I would like to ask a question, that is, the frame rate. Through this acquisition of ndiReceiver. GetFps (), how can I keep the frame rate of OfApp the same as that of data acquired through NDI? Thank you

like ofSetFrameRate((int)ndiReceiver.GetFps()); but not work.

from ofxndi.

leadedge avatar leadedge commented on July 29, 2024

The GetFps function actually calculates the received frame rate so it isn't exactly the fps set for the received sender. Also you will only get a steady value after it has received frames for a few seconds, so it is really no good for adjusting OpenFrameworks framerate.

In fact I intend to remove this function and return the NDI sender frame rate instead. Then you can adjust from that. I will create another function "GetSenderFps" to do this.

The problem remains that you will only get an fps value after the receiver has connected to the sender and received a frame, which then has the fps information. So this has to be done within the addon. I will look into how that can be done.

But I am interested to know why you want to adjust the Openframeworks framerate. Could you explain this for me?

from ofxndi.

leadedge avatar leadedge commented on July 29, 2024

I have made some changes to include a GetSenderFps function which retrieves the fps that the sender was set up with. The timed function is still there if required.

This will allow you to set the Openframeworks fps to that of the sender. But it depends on the receiver being connected so that the sender fps can be retrieved. A new GetReceiverConnected function allows for this. Some work is needed in Update() to do this. I have not included the code in the receiver example, but can share via email - use the address on the GitHub repositories page.

I will close this now since this can be achieved and the original problem is resolved.

from ofxndi.

ertertq avatar ertertq commented on July 29, 2024

thanks.

from ofxndi.

ertertq avatar ertertq commented on July 29, 2024

This is because of network reasons, such as I receive data frame rate of 25 frames per second, but the refresh rate of open frameworks is 60 frames per second, so there will be screen jitter.

So I would like to ask you how you optimize the frame rate settings.

from ofxndi.

leadedge avatar leadedge commented on July 29, 2024

If you already know the sender fps is 25, what happens if you change the Openframeworks frame rate to 25? That is all that you could do if the sender fps was detected by the receiver.

To detect the rate for different senders you can put this in Update().

```
// "int senderFps" is global and initialized to 0 in Setup
if (ndiReceiver.ReceiverConnected()) {
	// The receiver has received frames from the sender
	int fps = (int)round(ndiReceiver.GetSenderFps());
	if (senderFps != fps) {
		senderFps = fps;
		printf("Change fps to %d\n", senderFps);
		ofSetFrameRate(senderFps);
	}
}
else {
	// Sender has closed or dropped out
	if (senderFps > 0) {
		printf("Reset fps\n");
		senderFps = 0;
		ofSetFrameRate(60);
	}
}
```

from ofxndi.

ertertq avatar ertertq commented on July 29, 2024

Thank you very much. According to the method you provided, the problem has been solved. Thank you.

from ofxndi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.