SvenVD / rpisurv

Raspberry Pi surveillance
https://community.rpisurv.net
GNU General Public License v2.0
609 stars 101 forks source link

not all RTSP are equal? #22

Closed eaglerare closed 7 years ago

eaglerare commented 7 years ago

First, thanks so much for your work on this. Everything about it seemed to work just as expected. I had no problem getting 3 cameras showing on my TV via Pi2 hdmi with rpisurv :+1: +1:

I ran upon an issue, and I'm unsure how diagnose it any further. I decided to add a 4th feed to my system, by using VLC RTSP server to stream the screen of a PC. The idea being that, I would then have my cameras plus an information stream flowing as a 4th source. The use of VLC to stream the screen via RTSP seems to work fine, I can access the stream from other clients, and even from my pi2 bu using the following command: sudo omxplayer --live -o hdmi rtsp://xx.xx.xx.xx:8554/scr.sdp If I change one of my already tested and functioning stream sources to use this new one, it causes an error in surveillance.py

Traceback (most recent call last): File "surveillance.py", line 10, in from config import cfg File "/usr/local/bin/rpisurv/config.py", line 4, in cfg = yaml.load(ymlfile) File "/usr/lib/python2.7/dist-packages/yaml/init.py", line 71, in load return loader.get_single_data() File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data node = self.get_single_node() File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 82, in compose_node node = self.compose_sequence_node(anchor) File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 110, in compose_sequence_node while not self.check_event(SequenceEndEvent): File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 393, in parse_block_sequence_entry "expected , but found %r" % token.id, token.start_mark) yaml.parser.ParserError: while parsing a block collection in "conf/surveillance.yml", line 6, column 9 expected , but found '' in "conf/surveillance.yml", line 19, column 10

Any thoughts?

eaglerare commented 7 years ago

also, I notice that surveillance.yml seems to be just a copy of /etc/rpisurv so I ran a diff of it vs my known good rpisurv I don't see any issues.

diff ./surveillance.yml /etc/rpisurvwrx 16c16 < - rtsp_url: "rtsp://xx.xx.xx.xx:8554/p1.sdp"

    - rtsp_url: "rtsp://pi:unl0ckpi@xx.xx.xx.xx:554/pxay1.sdp"

19c19 < rtsp_over_tcp: true

     #rtsp_over_tcp: true
SvenVD commented 7 years ago

Did you use tabs in surveillance.yml?

eaglerare commented 7 years ago

No sir, I didn't modify surveillance.yml I was merely using diff to compare between survellance.yml and my functional backup of /etc/rpisurv.

I'll download the source and get my py environment stood up, I'm 100% certain its something to do with differences between RTSP stream from VLC server versus the camera streams. I may have to learn about tweaking VLC rstsp server settings to make it all happy.

SvenVD commented 7 years ago

The error you posted seems to be an a parse error in trying to read the surveillance.yml file. Can you paste the complete surveillance.yml here, so we can have a look what might be wrong?

Thanks

SvenVD commented 7 years ago

Any update?