Question / Help rtsp media source: how to pass parameters?

Claudio

New Member
Short question: I've a IP camera stream that it can't be grabbed by OBS directly.. I've to take with VLC and pass to OBS via localhost.

Digging in the problem just a bit, I've tried to play the stream by ffmpeg like this

ffmpeg -i rtsp://192.168.1.2:554/video -acodec copy -vcodec copy ./pp.mp4

and I got the message

"UDP timeout, retrying with TCP
[rtsp @ 0xe01140] Could not find codec parameters for stream 0 (Video: h264): unspecified size"

So.. doing some minor tweak, adding the parameter

ffmpeg -rtsp_transport tcp -i rtsp://192.168.1.2:554/video -acodec copy -vcodec copy ./pp.mp4

and.. voila! The magic happens, I can grab and save the stream.

The question is: HOW to pass that parameter to OBS in the INPUT field of MEDIA SOURCE?
I guess that if OBS knows how to handle that stream, it will work ok.

Any idea? Thanks!
 

Chase_

New Member
I'm also needing to know how to pass ffmpeg parameters. They way I'm trying right now does not seem to have an impact.

I also tried using the input format field which also did not have an impact.

upload_2017-5-30_8-26-30.png
 

Chase_

New Member
Essentially I want to pass the same parameters as I would with this line:

ffplay -i input -f rtsp -rtsp_transport tcp rtsp://10.4.0.222:554/s0
 

Claudio

New Member
Hi Chase. I had to change the camera from that time. I've no answer in how to pass parameters to obs media source.

Now I can grab the stream, but sometimes I still share those video artifacts (noise, bars, etc) that you have in the image attached.

TIP: when I've VLC getting the same video feed, no artifacts shown at all... so the problem is not in the camera but in the way OBS decodes input streams.

I've no solution to this to today, unfortunately, just I've to lower the bitrate to 512 K in 1280x720 streams, to minimize it.

Still waiting for an update that fixes this.
 

wa2flq

New Member
I've been hunting for a method to specify TCP as well. I get great recordings when doing this via ffmpeg or VLC, but I don't see any provision in OBS Studio for it.
 

Tuna

Member
If feasible for you - there is GStreamer plugin available on this site. You can receive RTP stream over TCP with that one when you use "rtspt://" as protocol. Check the plugin's origin URL and have a look at its examples.
 

Tuna

Member
Did you add it to a scene yet or does it just crash by putting it into the plugins directory? A crash dump would be to understand what may causing it. Make sure you have the GStreamer runtime libraries installed. Of course building the plugin yourself may help if there are some version conflicts somewhere..
 

J Gerstel

New Member
No it crashes just by adding the plugin in the folder. In the mean time I found a different workaround, but that is cumbersome. But at least it works and does not show the image artifacts when using UDP. Workaround is using cmd:
vlc --rtsp-tcp rtsp://192.168.2.84/live_stream --sout=#transcode{scodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/} :no-sout-all :sout-keep

Then create a Scene with Mediasource in OBS:
http://localhost:8080/
 
Top