Does OBS support streaming over UDP?

Ajay PV

New Member
Hello everyone,

I know that OBS uses RTMP to stream data and RTMP works only on TCP. I wanted to stream data over UDP. There is another flavour of RTMP - RTMFP which uses UDP but does latest OBS support streaming via RTMFP? My guess is that it is not supported.

Can someone help me understand if I can streaming over UDP using protocol like RTP and how easy / difficult is it to integrate RTP to OBS? Please help. Thanks!
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Possibly through the FFmpeg output, but otherwise it just does TCP RTMP streaming at the moment. Though how you would do it via the FFmpeg output I don't quite know unfortunately. That's a bit beyond my experience with FFmpeg.
 

Ajay PV

New Member
Thank you Jim for giving a pointer. I read FFMPEG streaming docs and I was able to stream a sample video using FFMPEG binaries:

Sender side:
ffmpeg -f dshow -framerate 20 -i video="Integrated Webcam" -vf scale=1280:720 -vcodec libx264 -pix_fmt yuv420p -tune zerolatency -preset ultrafast -f rtsp -rtsp_transport udp rtsp://localhost:8888/live.sdp

Receiver side:
ffplay -rtsp_flags listen rtsp://localhost:8888/live.sdp

This was just a sample to test the behaviour where I am streaming webcam video output and it worked.
Now I need to check how do I do it via code and stream x264 encoded video output instead of webcam. If you or anyone could help me with how to do it i.e. what APIs to be called, it would be great.
 

pkv

Developer
look at output > advanced > recording > custom output (ffmpeg)
you can paste your ffmpeg settings in OBS studio, that's pretty straightforward
 
Top