首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >试图流树莓Pi相机与VLC。无法在Windows上获得VLC来播放流

试图流树莓Pi相机与VLC。无法在Windows上获得VLC来播放流
EN

Stack Overflow用户
提问于 2017-08-30 21:20:55
回答 1查看 5.3K关注 0票数 1

我已经尝试了许多例子,假设通过VLC流的RPi相机使用RTSP,然后在windows计算机上播放流使用VLC,但没有成功。

例如,在我的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)上得到的,上面写着:

代码语言:javascript
复制
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错误对话框:

代码语言:javascript
复制
Your input can't be opened:
VLC is unable to open the MRL 'rtsp://192.168.1.58:8554'. Check the log for details.

我试着用圆木做了一条线鲨笼:

代码语言:javascript
复制
  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

不知道下一步该做什么。

EN

回答 1

Stack Overflow用户

发布于 2017-08-31 03:05:51

我在这个论坛上找到了我的问题的答案:https://www.raspberrypi.org/forums/viewtopic.php?t=132116 解在这里

答案是向rtsp流添加一个文件名。

发自:

raspivid -o - -e -t 0 -p 0,640,480 -w 680 -h 480 -fps 30 -g 30 -ih -pf基准-md 4 -k -b 1000000 _ cvlc - alsa,无-v流://dev/stdin-sout‘#rtp=rtsp://:8554}’:demux=h264

至:

raspivid -o - -e -t 0 -p 0,640,480 -w 680 -h 480 -fps 30 -g 30 -ih -pf基准-md 4 -k -b 1000000 cvlc -A-vvv,无-v流://dev/sout‘#rtp’sdp=rtsp://:8554/x} :demux=h264

在这里,我将尝试大胆地去做。raspivid -o - -e -t 0 -p 0,640,480 -w 680 -h 480 -fps 30 -g 30 -ih -pf基准-md 4 -k -b 1000000 cvlc A-vvv,无-v流://dev/stdin-sout‘#rtp=rtsp://:8554*x*} :demux=h264

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45969873

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档