-
Notifications
You must be signed in to change notification settings - Fork 26
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
SRT broadcast error with large screens? #89
Comments
360 projection system!! Wouahou that would be a premiere for vimix :) !!
good
The Display view shows the screens actually connected to the computer : if you plug a monitor, it appears here.
Replicated
Exactly! it is a problem with hardware accelerated capture of frames : the resolution is too big for the GPU frame capture. |
NB: surprisingly, the documentation does not specify this resolution limit for vaapih264enc cf; gstreamer documentation : sink resolution MAX is 2147483647 : That 7680x742 is not accepted on my machine with nvidia is expected, as the nvh264enc MAX sink resolution is 4096: Therefore I conclude that the vaapih264enc gstreamer module is generic and cannot specify the hardware limit without knowing the hardware behind, and you have to test with your hardware. |
Thanks! Yeah there seem to be a bunch of issues trying to get this running and at a reasonable framerate, going in to test tonight and got a dummy HDMI plug that helps test virtual monitors. May do a 4k broadcast and then double that on the machine running the projectors as I was getting 4 fps trying to do virtual screens the full 7680px. EDIT: No longer valid:
Got SRT working in compiled version. |
OK, got in to test, but unfortunately was not able to make things work. 😞 Using the flatpak on Ubuntu 22.04 with 12thgen Intel CPU and integrated graphics. Tried with both hardware and software decoding and with h264 and JPEG variations. Receiving (SRT caller) the stream was a Windows 11 machine using latest ffmpeg. We tried a number of params generally of the format:
Errors (on receiver) looked like:
(Just tested to see if I could receive SRT using ffmpeg on the same machine as vimix and got the same errors. Hrm.) Vimix showed no errors. They do connect, we can see a spike of traffic initially and then nothing and get different errors when the connection doesn't happen at all. ffmpeg was able to use SRT to send a video though, so this worked from the same machine as vimix to that receiver:
Played with many different options and could get anything to work. We also tried gstreamer window capture to virtual webcam and then ffmpeg webcam to srt, but couldn't quite get the format working (not being gstreamer or ffmpeg experts). That looked a bit like:
Note: the virtual webcam does show up fine in vimix. Any ideas or suggestions? |
Err, my bad with compiled vimix missing SRT broadcast, for some reason I had missed out installing the bad plugins on this machine. Now showing up! |
Testing with gstreamer SRT receiver on same machine as vimix (compiled latest):
No output video window though. Same output using |
I tried on my machine with the following receiver and it works:
I will add more info in the wiki |
Thanks, more details on the wiki would help. Especially for testing and connections to gstreamer and ffplay. Using that receiver I can get a video test:
I can get ffmpeg SRT with a video working with:
Note: 127.0.0.1 does not work for listener, only port works, Including With and without
But no video display window. Note we are trying to do vimix to Windows with ffmpeg. When I test vimix to
But can receive the Receiver I'm testing is Ubuntu 22.04:
So then I dug into the code and recreated the gstreamer init:
This causes the error in So then I removed that from the code and recompiled... turned off hardware decode and no luck in ffplay or gstreamer. Argh. But, when I turned hardware decode on I did get a video briefly in ffplay before it died but gstreamer still has no output window. I'm not sure what would be different from my linux tests to yours. :| |
Thanks a lot! You indeed had a quite deep debugging session 😄 The minimal pipeline working with vimix is
Note that I do not use the quotes (" ") for the parameters of I tried with ffmpeg and it works with;
Note: it worked, but it there were errors on h264 decoding, packets size mismatch, and visual artefacts. Also it is normal to have to wait for a second at least until SRT connection is established. Following your different points:
I updated a bit the code of VideoBroadcaster in vimix (commit 088cf97 in beta), hoping that it would make things better also on your side (here I am under Ubuntu 22.10, amd64). |
Thanks! Can confirm those fixes made linux-linux SRT work with both ffplay and gstreamer. ffplay was about 4 sec delayed and gstreamer about 1 sec, so still not ideal for live shows, is there any receiver-side options to reduce the buffer maybe? Got ffplay done to half second delay or so with this?
|
Here are more tips in the SRT wiki In particular, it took me a while to understand why ffmpeg and gstreamer behave differently. With the hack to run ffmpeg twice (with for loop in bash), vimix is happy to reveive ffmpeg SRT streams ! |
Thanks, yeah using that I'm seeing everything working. I was able to reduce the delay when receiving to gstreamer by doing |
Good!
The SRT protocol has priority on not loosing data, thus includes several checks and corrections, which rely on the possibility to store several frames. To my experience, it always introduce some delay indeed... This is why I use direct UDP streaming for the Peer-to-peer streaming between vimix instances; but then I had to implement my own handshake protocol between two programs (here in UDP). It is fast but is not portable to other programs as this is a custom protocol. Alternatively, the user has to know all the information and enter the settings manually; I did not go for this option. Other protocols I saw require a server and a full implementation of a client connection mechanism: I didn't have the motivation (nor the knowledge) to implement this. Maybe you can tell and help ? |
aha... I just found out that webtrcbin is soon available in gstreamer package... This could be an option: i'll keep an eye on it |
Back to this issue with a new option: I added a mechanism to obtain a direct SRT stream on UDP from vimix using the same mechanism than the peer-to-peer. vimix can now receive stream requests from any program that follows the following procedure:
This is available on Beta branch. You can use and/or adjust this simple shell script : https://github.com/brunoherbelin/vimix/blob/beta/rsc/osc/vimix_connect.sh So, for your example application case, the target machine only needs standard programs (liblo-tools and gstreamer on command line) to be able to request and receive a video stream from vimix. You could also implement this in any other way you want, like e.g. with Python. |
I'm hoping to do a gig at the end of the month using vimix where they have a 360 projection system! (Sweet!) The resolution is 7680x742, so I tried a quick test today (using the flatpak) by making a new project with that custom resolution. I can use the Geometry interface to position videos, great. The Display interface doesn't show the full window size, but hopefully that's not a problem.
However, I'm hoping to use SRT broadcast to connect to the projection system, and when I try that it gives an error:
I do not get the same error with projects with more typical sizes, so I'm wondering if it has something to do with the resolution? What can you recommend to test? Thanks?
The text was updated successfully, but these errors were encountered: