Reputation: 2675
I'am actually streaming raw h.264 from a raspberry-pi with raspivid
.
Then, I'm sending out the stream via TCP/IP on port 8080 using netcat
:
raspivid -n -ih -t 0 -rot 0 -w 1280 -h 720 -fps 15 -b 1000000 -o - | nc -lkv4 8080
Actually, this stream is currently working and I'd like to read it on my webApp.
I've tried to do so using the HTML5 video
tag:
<video src="rtp://192.168.42.3:8080">
Your browser does not support RTP streams.
</video>
or
<video src="rtsp://192.168.42.3:8080">
Your browser does not support RTP streams.
</video>
but none of these are working. I can't even read the stream rtp://192.168.42.3:8080
on my VLC player. Is there something I am missing here?
I've actually tried cvlc
and GStreamer
and I'm still not able to connect to RTP either on a web browser or via VLC... I would love any insights of what to check next.
raspivid -n -ih -t 0 -rot 0 -w 1280 -h 720 -fps 15 -b 1000000 -o - | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8080/}' :demux=h264
raspivid -n -ih -t 0 -rot 0 -w 1280 -h 720 -fps 15 -b 1000000 -o - | \
gst-launch-1.0 udpsrc port=8080 \
caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" \
! rtph264depay \
! avdec_h264 \
! autovideosink
Upvotes: 0
Views: 1232
Reputation: 666
You can deliver video streams to web browsers as HLS, MPEG DASH, WebRTC using specific codecs (H264 baseline video with AAC audio for HLS/MPEG and Opus for WebRTC).
Upvotes: 1