OBS Studio OBS-Studio: Send an UDP Stream to a second PC using OBS [Deleted]

Status
Not open for further replies.
Hey guys,

I'm trying to figure out why my UDP local stream doesn't work but I guess some advices would help.

I managed to get a connection between my OBS and VLC but I've got no image and a super delayed and stuttering sound.

When I use the same settings and record as a file, it's super smooth, no frame skipping nor sound stuttering.

Could it be a router / switch issue ? (I use a basic instalation with my isp router > small 5 port switch > PC)

I've tried both unicast and multicast and encountered the same issue. I i'm trying to get it to work with same Broadcasting and Receiving PC.

If you have ideas, i'll be glad to hear, did a lot of googling already

Hello,

Could you send a print of your UDP settings screen?
 

Othni

New Member
Wow! This fixed my problem! I was trying everything I could find. Honestly did not have much hope.

I still do not understand how the pkt_size=1316 fixed it but it is working now!

Thank you!!!
 

Mark Weiss

Member
Your ISP will block your ability to multicast over the internet, and the receiver's ISPs will block them from receiving it. There actually is a mechanism for doing it: https://en.wikipedia.org/wiki/Multicast_address#GLOP but in practice it turned out to be unworkable.

What I am not clear on is why can't a stream be "public" and allow anyone to tap into it?
Think about a radio broadcast. One RF signal goes out, and millions of people within its coverage area can receive it.
Why isn't it possible to do this over the internet? Is it because every connection has to have a private 2-way "handshake"?

I expect that the person who manages to crack this riddle will become a millionaire overnight.
 

m1996

New Member
hi everyone
first i wanted to thanks for awesome tutorial. then i have a problem.when i use multicast its all fine and i do receive the video in my laptop using vlc or ffplay. but when i want to unicast i don't receive anything!
obs computer ip: 169.254.164.252
vlc laptop:
Autoconfiguration IPv4 Address: 169.254.61.149
IPv4 Subnet Mask: 255.255.0.0
IPv4 Default Gateway:
IPv4 DNS Server:
IPv4 WINS Server:
NetBIOS over Tcpip Enabled: Yes


i use 169.254.61.149:9999 as url path but it doesn't work...please help me as soon as you can
 

fgobs

New Member
I have problem with sound.
On PC with OBS (24.0.1) I have set udp://224.0.2.0:9090?pkt_size=1316 , mpegts, 2000 Kbps, 60 frames , libx264, 192 Kbps , acc
On PC with VLC I opened udp://@224.0.2.0:9090
The video works fine but there is no sound.
Any idea ? (thank you)
 

DragondogX

New Member
So I have been at this for hours. I would like to test the look of a stream on a computer on my local network. I have been all over the net. Using the settings in this forum, I get nothing on the receiving PC. Sometimes it will look like it's getting something (time code is going). Other times, it will act like it's buffering. In either case, I get nothing on my screen. Other issues are the generic "recording error" or an I/O message (this is random and I have not been able recreate on purpose).

I have tried direct TCP and UDP. It's not absolutely necessary to watch the stream on another computer, I just want to see how it looks on another device.

Any help would be greatly appreciated.

OBS computer: Win 10 - 64, OBS 24
Other computer: Win 7 - 32, VLC 3.0.8
 

VideoGuy

New Member
I've been trying to make UPD local work for several hours. I've read through this thread multiple times. I'm just trying to get it to work on a single machine, not on my lan. I can get OBS to "record" the correct upd output, and I can get my VLC player to find the stream - BUT, no picture. Here's a screen shot of all my settings, any assistance appreciated.
(Note: I was unable to get VLC to connect using upd://@:(port) but was able to get it to connect when I used the comlete UPD url).

Thanks! Love OBS!
obs_udp_test.jpg
 

Tomasz Góral

Active Member
Keyframe set to fps * 2
Now you have 250 / 30 = almost 8 second to see picture.
Why you set 250 ? you have 30 fps, keyframes is always 2, 4, or 10 time more fps.
 

scaesare

New Member
I've been fiddling with this for a while now, and I can't seem to get get an artifact free second stream.

Setup:
- OBS video source = feed from IP camera via RTSP
- "Recording" to UDP out to IP address of recv'ing machine @ port 4242
- Container type = mpegts
- bitrate = 8192Kbps
- encoder = libx264
-audio = ac3 @128Kbps
-recv'ing machine opening network stream in VLC (v3.0.8) using "udp://@:4242"
-both machines on local GigE switch

I get artifacts occasionally, but regualary,a nd not necessarily on fast-motion. The artifacts are not in the source video feed. Nor are they present when streaming via RTMP to an internet conferencing service.

CPU usage in OBS is only about 10%. It happens regardless as to if I'm also streaming to the conferencing service or not.I was thinking perhaps dropped UDP packets. Things I've tried:

- using a different GigE switch
- varying the bitrate (4-50Kbps)
- USB webcam instead of IP cam.
- AMD accelerated libx264
- using rtp:// for URL and rtp_mpegts as transport type
- different rcv'ing machines
-varying keyframes from 1-250
- a few different encoder types (a number of combinations throw errors or will hang OBS)
- Adding "?=pkt_sze=1316" to the stream output URL

All of the above have some affect, but none eliminates the problem, and some introduce more (i.e. green screen tearing, frozen frames, etc...)

With using RTP rather than UTP, believe the packet loss that UDP can experience should be eliminated. My network interfaces aren't even breaking a sweat.

Given that the incoming video feed and the stream out to the internet are OK, I feel like this has to be a local problem: OBS settings, transport layer issues, or VLC choking.

Any other suggestions that I might try (or any other questions on my configuration)?

Thanks for this thread, and any help.
 

scaesare

New Member
I've been fiddling with this for a while now, and I can't seem to get get an artifact free second stream.

Setup:
- OBS video source = feed from IP camera via RTSP
- "Recording" to UDP out to IP address of recv'ing machine @ port 4242
- Container type = mpegts
- bitrate = 8192Kbps
- encoder = libx264
-audio = ac3 @128Kbps
-recv'ing machine opening network stream in VLC (v3.0.8) using "udp://@:4242"
-both machines on local GigE switch

I get artifacts occasionally, but regualary,a nd not necessarily on fast-motion. The artifacts are not in the source video feed. Nor are they present when streaming via RTMP to an internet conferencing service.

CPU usage in OBS is only about 10%. It happens regardless as to if I'm also streaming to the conferencing service or not.I was thinking perhaps dropped UDP packets. Things I've tried:

- using a different GigE switch
- varying the bitrate (4-50Kbps)
- USB webcam instead of IP cam.
- AMD accelerated libx264
- using rtp:// for URL and rtp_mpegts as transport type
- different rcv'ing machines
-varying keyframes from 1-250
- a few different encoder types (a number of combinations throw errors or will hang OBS)
- Adding "?=pkt_sze=1316" to the stream output URL

All of the above have some affect, but none eliminates the problem, and some introduce more (i.e. green screen tearing, frozen frames, etc...)

With using RTP rather than UTP, believe the packet loss that UDP can experience should be eliminated. My network interfaces aren't even breaking a sweat.

Given that the incoming video feed and the stream out to the internet are OK, I feel like this has to be a local problem: OBS settings, transport layer issues, or VLC choking.

Any other suggestions that I might try (or any other questions on my configuration)?

Thanks for this thread, and any help.

Well, to answer my own question, this was partly hardware. I had a consumer-grade Gig-E switch going bad, and it was apparently dropping a ton of packets.

However, I still have to set a keyframe of 1 along with a healthy bitrate to avoid introducing artifacts... which seems odd.
 

Skutov

New Member
I've run into an interesting issue while following this guide. Issue I came across was the stream would fail after a few minutes with the error receive_audio: Error writing packet: No buffer space available which is very misleading. I believe the cause of the issue is UDP rate-limiting within the Mac OSX kernel, which I worked around by adding ?overrun_nonfatal=1 to the streaming URL.
 

Skutov

New Member
I've run into an interesting issue while following this guide. Issue I came across was the stream would fail after a few minutes with the error receive_audio: Error writing packet: No buffer space available which is very misleading. I believe the cause of the issue is UDP rate-limiting within the Mac OSX kernel, which I worked around by adding ?overrun_nonfatal=1 to the streaming URL.

Actually, scratch that, this didn't fix the issue, just made it run for a bit longer before crashing. Still trying to find a solution.
 

MarcTh85

New Member
Hi there!

first, really like this thread! I'm figuring out how to connect 2 macs. This week I tried to set up the connection using UDP between 2 macs. It seems that there is a connection. On the first mac I have OBS, and send it to the other. There I have VLC, and open the network source. I do get the window but it's either black, or white with gray.

I tried several container formats and video-encoder settings. Once I saw a small stroke of the source, but besides that it's just blank. (e.g. output > record, container format: mpegts; video-encoder: default / libx264 ) Any suggestions what settings must be different? The info I find is mostly for this setup between 2 pc's.

And, a second question:
If I want to see it on my own mac (in VLC), how can I make that work? Is that possible, and if so, what settings must I use in VLC to see the stream?
 

bcctvph

New Member
I did the tutorial by using a specific address example (192.168.50.2) and it works fine, however, I can only view it to a targeted PC. When I try it to view from another PC I am unable to do so, it has an error "Your input can't be opened:" Is there a way I can view it to multiple devices?
 

scaesare

New Member
I did the tutorial by using a specific address example (192.168.50.2) and it works fine, however, I can only view it to a targeted PC. When I try it to view from another PC I am unable to do so, it has an error "Your input can't be opened:" Is there a way I can view it to multiple devices?

I suspect you'd need to use multicast for this.
 
Status
Not open for further replies.
Top