Trying to use raspberry pi to stream live video to IP, but video not showing up on client side

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Trying to use raspberry pi to stream live video to IP, but video not showing up on client side

Post by /RaspberryPi »

I have a raspberry pi 4 which I have a see3cam connected to via USB. I am trying to stream the live video to IP so that a computer on the same network can access the live feed.
I have tested that the camera in fact works with the raspberry pi. I'm able to watch it on the pi itself.
I've been following thistutorial.
My directory is /home/pi/cam, which now contains the multiple segment files, playlist.m3u8, and index.html.
In one terminal I ran the following:
pi@raspberrypi:~/cam $ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, framerate=30/1 ! videoconvert ! videoscale ! clockoverlay time-format="%D %H:%M:%S" ! x264enc tune=zerolatency ! mpegtsmux ! hlssink playlist-root=http://123.456.78.910 location=/home/pi/cam/segment_%05d.ts target-duration=5 max-files=5 It ran successfully with the message "Setting pipeline to PLAYING..."
In another console I ran (results included):
pi@raspberrypi:~/cam $ python3 -m http.server 8080 Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) ... When opening http://123.456.78.910:8080/index.html on another computer the page loads, but once you click play it just keeps loading forever and no video is actually shown. After trying to access the feed from the second computer, the raspberry pi displays:
123.456.78.910 - - [31/Oct/2022 14:03:18] "GET /index.html HTTP/1.1" 200 - 123.456.78.910 - - [31/Oct/2022 14:03:19] "GET /playlist.m3u8 HTTP/1.1" 200 - 123.456.78.910 - - [31/Oct/2022 14:03:26] "GET /playlist.m3u8 HTTP/1.1" 200 - There are no error messages. I appreciate any advice if you have any ideas, thanks for your time!

submitted by /u/Vinyameen
[link] [comments]

More...
Post Reply

Return to “Raspberry Pi Forum”