Skip to content
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

Can't receive frames being sent #15

Open
Nimisha-Pabbichetty opened this issue Apr 22, 2022 · 9 comments
Open

Can't receive frames being sent #15

Nimisha-Pabbichetty opened this issue Apr 22, 2022 · 9 comments
Assignees
Labels
bug Something isn't working confirmed

Comments

@Nimisha-Pabbichetty
Copy link

Hi! I'm sending video frames using send_video.py and trying to receive them using either recv.py or recv_cv.py. On the sending side, it is printed that frames are being sent like this:

image

But on the receiving side, it is only showing 'Looking for sources' when running both files like this:
image

What should I do?

@buresu
Copy link
Owner

buresu commented Apr 22, 2022

Hi, Thank you for reporting.
I confirmed same problem on ubuntu 22.04, but on Arch Linux, I didn't have any problems.
This problem seems to be related on avahi, but the solution is not yet known.
I will continue to find the solution.

@buresu buresu self-assigned this Apr 22, 2022
@buresu buresu added bug Something isn't working confirmed labels Apr 22, 2022
@Nimisha-Pabbichetty
Copy link
Author

Nimisha-Pabbichetty commented Apr 24, 2022

Thank you for your prompt response. Can you let me know if this issue exists on Windows? Also could you clarify if there are any differences to setting up this repo on windows when compared to ubuntu?

@buresu
Copy link
Owner

buresu commented Apr 26, 2022

Yes, it works fine on windows. The setup step is almost the same.

# install ndi-python
pip install ndi-python

# run examples
git clone --recursive https://github.com/buresu/ndi-python.git
cd ndi-python/example
pip install -r requirements.txt
python find.py

But ubuntu needs avahi daemon to search for ndi sources, you need to install avahi.

sudo apt install avahi-daemon
sudo systemctl enable --now avahi-daemon

@Nimisha-Pabbichetty
Copy link
Author

Ah okay thanks!

@buresu
Copy link
Owner

buresu commented May 22, 2022

Update:
Curiously, it works fine in my current environment.

Ubuntu 22.04 LTS
Anaconda 4.12.0
Python 3.10.4
ndi-python 5.1.1.2
avahi-daemon 0.8

You can use avahi-discover to make sure that it is working properly.

sudo apt install avahi-discover
avahi-discover

Screenshot_20220522_200640

@Nimisha-Pabbichetty
Copy link
Author

Interesting, I'll try to match your setup and see if it works.

@tgentry1986
Copy link

Hi There,

For what its worth im having similar issues on rocky 8.6 - although not quite the same - i can usually discover sources both locally and on the network, sometimes i cant, and so far ive not been able to get a picture out of this machine to either a local monitor or a monitor on the network (windows or linux). Still investigating...

Cheers!

@Nimisha-Pabbichetty
Copy link
Author

@buresu I migrated to Windows and it works fine there. I do have a different issue though. I'm transmitting frames of the format 'FOURCC_VIDEO_TYPE_UYVY' but I am only able to receive them in 'RECV_COLOR_FORMAT_BGRX_BGRA' format. The other formats throw an error like this when I try to visualise them:

image

@buresu
Copy link
Owner

buresu commented Jul 5, 2022

@Nimisha-Pabbichetty cv.imshow() is not support uyvy format.
If you want to get it in uyvy format, you have to convert it yourself.

You can change the following lines.

ndi_recv_create.color_format = ndi.RECV_COLOR_FORMAT_BGRX_BGRA
to
ndi_recv_create.color_format = ndi.RECV_COLOR_FORMAT_FASTEST

and

frame = np.copy(v.data)
to
frame = cv.cvtColor(v.data, cv.COLOR_YUV2BGR_UYVY)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

No branches or pull requests

3 participants