我已经尝试了许多应该通过VLC使用RTSP流式传输RPi相机然后使用VLC在Windows计算机上播放流而没有成功的示例。
例如在我的RPi 3上更新了Jessie(约20170820)
我进入终端窗口:raspivid -o - -t 0 -w 1920 -h 1080 -fps 30 -b 1000000 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
我从一个四分之一(https://forum.qnap.com/viewtopic.php?t=97676) 以及写的:
Hi, with VLC I just need to open the network stream with this string: "rtsp://192.168.1.58:8554". I also tried with port 554 and managed to add a path (I tried with path /live.sdp), but while the stream opens with no problems in VLC, i have no luck with SS. Obviously when I changed config I changed both cvlc parameters on the Pi and vlc connection string on my pc
Yeah, I'm using Generic RTSP (I have SS 5.0.1, can't find SS Pro)
I didn't check if it was using UDP or TCP, i leaved them to default values. If I'd know what codec to use I could specify it in cvlc, but since I wasn't able to find what is supported by SS and what is not, I tried default with h264.
当我尝试使用VLC时,我会收到带有消息的VLC错误对话框:
Your input can't be opened:
VLC is unable to open the MRL 'rtsp://192.168.1.58:8554'. Check the log for details.
我制作了一条铁丝鲨,试图登录:
No. Time Source Destination Protocol Length Info
32 2017-08-30 16:42:42.889437000 192.168.1.29 192.168.1.58 RTSP 172 OPTIONS rtsp://192.168.1.58:8554 RTSP/1.0
Frame 32: 172 bytes on wire (1376 bits), 172 bytes captured (1376 bits) on interface 0
Ethernet II, Src: GoodWayI_11:6d:ac (00:50:b6:11:6d:ac), Dst: Raspberr_f5:b7:3e (b8:27:eb:f5:b7:3e)
Internet Protocol Version 4, Src: 192.168.1.29 (192.168.1.29), Dst: 192.168.1.58 (192.168.1.58)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
Total Length: 158
Identification: 0x1fac (8108)
Flags: 0x02 (Don't Fragment)
Fragment offset: 0
Time to live: 128
Protocol: TCP (6)
Header checksum: 0x5706 [validation disabled]
Source: 192.168.1.29 (192.168.1.29)
Destination: 192.168.1.58 (192.168.1.58)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 65024 (65024), Dst Port: 8554 (8554), Seq: 1, Ack: 1, Len: 118
Real Time Streaming Protocol
Request: OPTIONS rtsp://192.168.1.58:8554 RTSP/1.0\r\n
CSeq: 2\r\n
User-Agent: LibVLC/2.2.6 (LIVE555 Streaming Media v2016.02.22)\r\n
\r\n
No. Time Source Destination Protocol Length Info
34 2017-08-30 16:42:42.912266000 192.168.1.58 192.168.1.29 RTSP 178 Reply: RTSP/1.0 200 OK
Frame 34: 178 bytes on wire (1424 bits), 178 bytes captured (1424 bits) on interface 0
Ethernet II, Src: Raspberr_f5:b7:3e (b8:27:eb:f5:b7:3e), Dst: GoodWayI_11:6d:ac (00:50:b6:11:6d:ac)
Internet Protocol Version 4, Src: 192.168.1.58 (192.168.1.58), Dst: 192.168.1.29 (192.168.1.29)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
Total Length: 164
Identification: 0xa134 (41268)
Flags: 0x02 (Don't Fragment)
Fragment offset: 0
Time to live: 64
Protocol: TCP (6)
Header checksum: 0x1578 [validation disabled]
Source: 192.168.1.58 (192.168.1.58)
Destination: 192.168.1.29 (192.168.1.29)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 8554 (8554), Dst Port: 65024 (65024), Seq: 1, Ack: 119, Len: 124
Real Time Streaming Protocol
Response: RTSP/1.0 200 OK\r\n
Server: VLC/2.2.6\r\n
Content-length: 0
Cseq: 2\r\n
Public: DESCRIBE,SETUP,TEARDOWN,PLAY,PAUSE,GET_PARAMETER\r\n
\r\n
No. Time Source Destination Protocol Length Info
35 2017-08-30 16:42:42.912534000 192.168.1.29 192.168.1.58 RTSP 198 DESCRIBE rtsp://192.168.1.58:8554 RTSP/1.0
Frame 35: 198 bytes on wire (1584 bits), 198 bytes captured (1584 bits) on interface 0
Ethernet II, Src: GoodWayI_11:6d:ac (00:50:b6:11:6d:ac), Dst: Raspberr_f5:b7:3e (b8:27:eb:f5:b7:3e)
Internet Protocol Version 4, Src: 192.168.1.29 (192.168.1.29), Dst: 192.168.1.58 (192.168.1.58)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
Total Length: 184
Identification: 0x1fad (8109)
Flags: 0x02 (Don't Fragment)
Fragment offset: 0
Time to live: 128
Protocol: TCP (6)
Header checksum: 0x56eb [validation disabled]
Source: 192.168.1.29 (192.168.1.29)
Destination: 192.168.1.58 (192.168.1.58)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 65024 (65024), Dst Port: 8554 (8554), Seq: 119, Ack: 125, Len: 144
Real Time Streaming Protocol
Request: DESCRIBE rtsp://192.168.1.58:8554 RTSP/1.0\r\n
CSeq: 3\r\n
User-Agent: LibVLC/2.2.6 (LIVE555 Streaming Media v2016.02.22)\r\n
Accept: application/sdp\r\n
\r\n
No. Time Source Destination Protocol Length Info
38 2017-08-30 16:42:42.998577000 192.168.1.58 192.168.1.29 RTSP/XML 371 Reply: RTSP/1.0 404 Client error
Frame 38: 371 bytes on wire (2968 bits), 371 bytes captured (2968 bits) on interface 0
Ethernet II, Src: Raspberr_f5:b7:3e (b8:27:eb:f5:b7:3e), Dst: GoodWayI_11:6d:ac (00:50:b6:11:6d:ac)
Internet Protocol Version 4, Src: 192.168.1.58 (192.168.1.58), Dst: 192.168.1.29 (192.168.1.29)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
Total Length: 357
Identification: 0xa136 (41270)
Flags: 0x02 (Don't Fragment)
Fragment offset: 0
Time to live: 64
Protocol: TCP (6)
Header checksum: 0x14b5 [validation disabled]
Source: 192.168.1.58 (192.168.1.58)
Destination: 192.168.1.29 (192.168.1.29)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 8554 (8554), Dst Port: 65024 (65024), Seq: 200, Ack: 263, Len: 317
[2 Reassembled TCP Segments (392 bytes): #36(75), #38(317)]
Real Time Streaming Protocol
Response: RTSP/1.0 404 Client error\r\n
Content-length: 317
Content-type: text/html
\r\n
eXtensible Markup Language
No. Time Source Destination Protocol Length Info
47 2017-08-30 16:42:43.004164000 192.168.1.29 192.168.1.58 RTSP 389 OPTIONS rtsp://192.168.1.58:8554 RTSP/1.0
Frame 47: 389 bytes on wire (3112 bits), 389 bytes captured (3112 bits) on interface 0
Ethernet II, Src: GoodWayI_11:6d:ac (00:50:b6:11:6d:ac), Dst: Raspberr_f5:b7:3e (b8:27:eb:f5:b7:3e)
Internet Protocol Version 4, Src: 192.168.1.29 (192.168.1.29), Dst: 192.168.1.58 (192.168.1.58)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
Total Length: 375
Identification: 0x1fb4 (8116)
Flags: 0x02 (Don't Fragment)
Fragment offset: 0
Time to live: 128
Protocol: TCP (6)
Header checksum: 0x5625 [validation disabled]
Source: 192.168.1.29 (192.168.1.29)
Destination: 192.168.1.58 (192.168.1.58)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 65028 (65028), Dst Port: 8554 (8554), Seq: 44, Ack: 1, Len: 335
[2 Reassembled TCP Segments (378 bytes): #45(43), #47(335)]
Real Time Streaming Protocol
Request: OPTIONS rtsp://192.168.1.58:8554 RTSP/1.0\r\n
CSeq: 1\r\n
User-Agent: RealMedia Player Version 6.0.9.1235 (linux-2.0-libc6-i386-gcc2.95)\r\n
ClientChallenge: 9e26d33f2984236010ef6253fb1887f7\r\n
PlayerStarttime: [28/03/2003:22:50:23 00:00]\r\n
CompanyID: KnKV4M4I/B2FjJ1TToLycw==\r\n
GUID: 00000000-0000-0000-0000-000000000000\r\n
RegionData: 0\r\n
ClientID: Linux_2.4_6.0.9.1235_play32_RN01_EN_586\r\n
\r\n
No. Time Source Destination Protocol Length Info
57 2017-08-30 16:42:43.027340000 192.168.1.58 192.168.1.29 RTSP 178 Reply: RTSP/1.0 200 OK
Frame 57: 178 bytes on wire (1424 bits), 178 bytes captured (1424 bits) on interface 0
Ethernet II, Src: Raspberr_f5:b7:3e (b8:27:eb:f5:b7:3e), Dst: GoodWayI_11:6d:ac (00:50:b6:11:6d:ac)
Internet Protocol Version 4, Src: 192.168.1.58 (192.168.1.58), Dst: 192.168.1.29 (192.168.1.29)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
Total Length: 164
Identification: 0x7282 (29314)
Flags: 0x02 (Don't Fragment)
Fragment offset: 0
Time to live: 64
Protocol: TCP (6)
Header checksum: 0x442a [validation disabled]
Source: 192.168.1.58 (192.168.1.58)
Destination: 192.168.1.29 (192.168.1.29)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 8554 (8554), Dst Port: 65028 (65028), Seq: 1, Ack: 379, Len: 124
Real Time Streaming Protocol
Response: RTSP/1.0 200 OK\r\n
Server: VLC/2.2.6\r\n
Content-length: 0
Cseq: 1\r\n
Public: DESCRIBE,SETUP,TEARDOWN,PLAY,PAUSE,GET_PARAMETER\r\n
\r\n
不确定接下来要尝试什么。
答案 0 :(得分:2)
我在这个论坛上找到了我的问题的答案: https://www.raspberrypi.org/forums/viewtopic.php?t=132116 Solution here
答案是在rtsp流中添加文件名。
自:
raspivid -o - -e -t 0 -p 0,0,640,480 -w 680 -h 480 -fps 30 -g 30 -ih -pf baseline -md 4 -k -b 1000000 | cvlc -A-vvv alsa,none -v stream:/// dev / stdin --sout' #rtp {sdp = rtsp://:8554}' :解复用器= H264
要:
raspivid -o - -e -t 0 -p 0,0,640,480 -w 680 -h 480 -fps 30 -g 30 -ih -pf baseline -md 4 -k -b 1000000 | cvlc -A-vvv alsa,none -v stream:/// dev / stdin --sout' #rtp {sdp = rtsp://:8554 / x}' :解复用器= H264
在这里,我会尝试大胆一点。 raspivid -o - -e -t 0 -p 0,0,640,480 -w 680 -h 480 -fps 30 -g 30 -ih -pf baseline -md 4 -k -b 1000000 | cvlc -A-vvv alsa,none -v stream:/// dev / stdin --sout' #rtp {sdp = rtsp://:8554 ** / x **}' :解复用器= H264