RTSP cam in octoprint workaround

~/go/bin/videostreamer -input rtsp://192.168.1.125/user=admin_password=_channel=1_stream=0.sdp? -fcgi=false -format rtsp -host octoprint_ip

From external and within the url working:

http://octopi_ip:8080/stream

not working:
http://octopi_ip/stream
http://127.0.0.1:8080/stream

Soory did not read your information correctly.
I have now corrected this and the following issue has appeared: root@octopi: ~ # $ GOPATH / bin / videostreamer -input rtsp: //192.168.1.125/user=igor72_igorigor=_channel=1_stream=0.sdp? -fcgi = false -format rstp -host 192.168.1.5
2020/05/03 21:41:27 Starting to serve requests on 192.168.1.5:8080 (HTTP)
2020/05/03 21:41:27 encoder: Waiting for clients ...
2020/05/03 21:41:31 Serving [GET] request from [192.168.1.161:52561] to path [/ stream] (0 bytes)
2020/05/03 21:41:31 encoder: New client
input format not found
2020/05/03 21:41:31 encoder: Unable to open input
2020/05/03 21:41:31 192.168.1.161:52561: Read error: EOF
2020/05/03 21:41:31 192.168.1.161:52561: Client cleaned up
2020/05/03 21:41:31 Serving [GET] request from [192.168.1.161:52561] to path [/ stream] (0 bytes)
2020/05/03 21:41:31 Serving [GET] request from [192.168.1.161:52562] to path [/favicon.ico] (0 bytes)
2020/05/03 21:41:31 Unknown request.

Final ignorance, but if my webcam has the rstp string in this form, rtsp: // username: password @ IP Address: 554 / stream1) because with vlc it works, how can it read your string? does it matter to the webcam when and how the dates come? doesn't it have to have this format that it works?

Many thanks for the patience :slight_smile:

the host param "-host 192.168.1.5" is not necessary try without

have you used the port :8080 within your url? http://octopi_ip:8080/stream
I ony had this error when leaving it out

my output is:

2020/05/03 21:57:27 Starting to serve requests on 0.0.0.0:8080 (HTTP)
2020/05/03 21:57:27 encoder: Waiting for clients...
2020/05/03 21:57:28 Serving [GET] request from [192.168.1.71:54897] to path [/stream] (0 bytes)
2020/05/03 21:57:28 encoder: New client
2020/05/03 21:57:33 Opened output for client

rtsp: // userxx: [pwxxxxxxx@192.168.1.148]: 554 /
Maybe the : between user and pw is the problem does it work with & or _ instead within vlc? some ip cams have different ways for the url maybe yours not.

ist there a reason why you run this as superuser?

yes port 8080 answers correctly if I then access with a browser then the quick output the error.
I tried it with & but then he cuts the string and gives errors, it has to be _ for it to work.

1 Like

I think I found the problem in input string I did not specify port 554 do you know din syntax and the port when imputing?
thx

Hmm maybe this way it would work.
make file videostreamer.sh with:

/home/vanrzuf/go/bin/videostreamer -input rtsp://userxx:pwxxxxxxx@192.168.1.148:554/stream1 -fcgi=false -format rtsp

and run it

Hi, good tip mi .sh, no longer gives the string error, why?
now when i access with browser i get this error,
start the script with root so he should have all rights.

020/05/04 12:24:31 encoder: 0 clients
2020/05/04 12:24:31 encoder: Closed input
2020/05/04 12:24:31 encoder: Waiting for clients ...
2020/05/04 12:38:18 Serving [GET] request from [192.168.1.161:59902] to path [/ stream] (0 bytes)
2020/05/04 12:38:18 encoder: New client
2020/05/04 12:38:21 Opened output for client
2020/05/04 12:38:22 Serving [GET] request from [192.168.1.161:59903] to path [/ stream] (0 bytes)
2020/05/04 12:38:22 encoder: 2 clients
2020/05/04 12:38:22 Opened output for client
2020/05/04 12:38:22 192.168.1.161:59902: Write error: write tcp 192.168.1.5:8080->192.168.1.161:59902: write: broken pipe
2020/05/04 12:38:22 192.168.1.161:59902: Client cleaned up
unable to write frame: broken pipe
2020/05/04 12:38:24 Failure writing packet
2020/05/04 12:38:24 192.168.1.161:59903: Write error: write tcp 192.168.1.5:8080->192.168.1.161:59903: write: broken pipe
2020/05/04 12:38:24 192.168.1.161:59903: Client cleaned up
unable to write frame: broken pipe
2020/05/04 12:38:24 Failure writing packet
2020/05/04 12:38:26 Client too slow
unable to write trailer
2020/05/04 12:38:26 Client too slow
unable to write trailer
2020/05/04 12:38:26 encoder: 0 clients
2020/05/04 12:38:26 encoder: Closed input
2020/05/04 12:38:26 encoder: Waiting for clients ...

Hi, is it possible that this is a problem with the go version I am using 1.14 on ubuntu?
Thx

Hmm rather not, what version of ffmpeg you have?

found the problem !!!! :slight_smile:
the browser was the problem with chrome it works !!
Many thanks to all of you for the patience.

:star_struck: :star_struck: :star_struck: :see_no_evil: :see_no_evil:

Good to hear :slight_smile: BTW what browser do you use?

Safari on iMac last ios version

Hi Guys,
i'm really too stupid i think
I have adjusted the control file as described here but my screen remains black, nothing comes
who has an idea ??
can this be the same problem as with safari?
thank you

just tested and the errors are the same!
write: broken pipe

What browser do you use? Adblocker? Check in vlc

Hello solved all problems, runs great now thanks to everyone

1 Like

Hello,

Can someone write up a full tutorial on getting this to work on an Rpi 3?

I'm not sure how to build the videostreamer part....

@chilman408, I wrote a pair of docker-compose files and used the WebcamIframe plugin from jneilliii.

To build videostreamer I created a new folder, git cloned the repository, cd to videostreamer folder and create a docker-compose.yml file with:
version: "3.9"
services:
videostreamer:
build: .

after the build you should get a name, that you can find with docker ps -a (under the IMAGE column) and that name is the name I used in the rtsp_docker-compose.yaml

octoprint_docker-compose.yaml (412 Bytes) rtsp_docker-compose.yaml (1.7 KB) rtsp-simple-server.yaml (16 Bytes)
(maybe you want to rename the files)

and in the "Stream URL" of octoprint I set "http://192.168.1.XXX:8080/stream"

Some details: my webcam can output a h264 stream (so ffmpeg doesn't encode the video, just the audio). I use the rtsp stream to record and stream (on Twitch) with OBS, the I use kdenlive to create timelapses, so at the moment I don't care about the timelapse feature included in octoprint.

Hello! Thx for great app. Can you help me? I'm start streamer with command:

./videostreamer -input rtsp://admin:admin@10.0.1.25:8554/live1.264 -fcgi=false -format RTSP -port 8999

Chrome - perfectli works, but Octo show OK and dint show a stream. A NOT_OK log:

./videostreamer -input rtsp://admin:admin@10.0.1.25:8554/live1.264 -fcgi=false -format RTSP -port 8999
2023/10/06 07:04:26 Starting to serve requests on 0.0.0.0:8999 (HTTP)
2023/10/06 07:04:26 encoder: Waiting for clients...
2023/10/06 07:04:34 Serving [GET] request from [10.0.1.9:55728] to path [/stream] (0 bytes)
2023/10/06 07:04:34 encoder: New client
2023/10/06 07:04:35 Opened output for client
2023/10/06 07:04:38 10.0.1.9:55728: Write error: write tcp 10.0.1.43:8999->10.0.1.9:55728: write: broken pipe
2023/10/06 07:04:38 10.0.1.9:55728: Client cleaned up
unable to write frame: Broken pipe
2023/10/06 07:04:40 Failure writing packet
2023/10/06 07:04:41 Client too slow
unable to write trailer
2023/10/06 07:04:41 encoder: 0 clients
2023/10/06 07:04:41 encoder: Closed input
2023/10/06 07:04:41 encoder: Waiting for clients...

I'm find a control.jijnja2 in differnt folder - ~/OctoPrint/lib/python3.10/site-packages/octoprint/templates/tabs and it didnt contain