2017-08-30 7 views
0

J'ai essayé de nombreux exemples censés diffuser la caméra RPi par VLC en utilisant RTSP, puis de lire le flux sur un ordinateur Windows en utilisant VLC sans succès.Essayer de diffuser la caméra Raspberry Pi avec VLC. Impossible d'obtenir VLC sur Windows pour jouer Stream

Par exemple sur mon RPi 3 avec mise à jour Jessie (sur A propos de 20170820) J'entre dans une fenêtre de terminal: raspivid -o - -t 0 -w 1920 -h 1080 -fps 30 -b 1000000 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

qui je suis descendu d'un fourm (https://forum.qnap.com/viewtopic.php?t=97676) et dont a été écrit:

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. 

Lorsque je tente de jouer avec VLC je reçois la boîte de dialogue d'erreur VLC avec le message:

Your input can't be opened: 
VLC is unable to open the MRL 'rtsp://192.168.1.58:8554'. Check the log for details. 

J'ai fait une caputre de requin du fil tentative de connexion:

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 

Je ne sais pas quoi essayer prochain.

Répondre

1

J'ai trouvé la réponse à ma question à ce forum: https://www.raspberrypi.org/forums/viewtopic.php?t=132116 Solution here

La réponse a été d'ajouter un nom de fichier dans le flux RTSP.

de:

raspivid -o - -e -t 0 -p -h 0,0,640,480 -w 680 480 -fps 30 -g 30 -ih référence -pf -md 4 -k - b 1000000 | CVLC -A-VVV alsa, aucun flux -v: /// dev/stdin --sout '#rtp {= sdp rtsp: //: 8554}': démultiplexage = H264

Pour:

raspivid -o - -e -t 0 -p 0,0,640,480 -w 680 -h 480 -fps 30 -g 30 -ih -pf ligne de base -md 4 -k -b 1000000 | CVLC -A-VVV alsa, aucun flux -v: /// dev/stdin --sout '#rtp {= sdp rtsp: //: 8554/x}': démultiplexage = H264

Ici, je vais essayez de le mettre en gras. raspivid -o - -e -t 0 -p 0,0,640,480 -w 680 -h 480 -fps 30 -g 30 -ih -pf ligne de base -md 4 -k -b 1000000 | cvlc -A-vvv alsa, aucun -v flux: /// dev/stdin --sout '#rtp {sdp = rtsp: //: 8554 **/x **}': demux = h264