fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
550 stars 102 forks source link

A space " " character prevents playback of recorded clips from SD card #395

Closed KruyKaze closed 2 years ago

KruyKaze commented 2 years ago

Hello , and thanks for making this integration. I was unable to playback the SD recordings and looked at the logs . They show : Error opening stream rtmp://REDACTED:1935/vod/Rec_20211208_065445_541_M.mp4?channel= 0&stream=0&token=REDACTED Note the space between "channel=" and "0" . When I removed that line and tried it on VLC it worked just fine.

I also do not see any thumbnails . Not sure it it's related.

Environment:

cpainchaud commented 2 years ago

This code is producing it:

stream_source = f"rtmp://{self._host}:{self._rtmp_port}/vod/{filename.replace('/', '%20')}?channel={self._channel}&stream=0&token={self._token}"

As you can see there is no space. What are the odds that said space is actually in your configuration/user input ?

KruyKaze commented 2 years ago

Thanks for the reply, I just recently installed the camera and this is the extent of the configuration i have : image

I don't see where you would specify the channel number. Can you point me to where that would be? Thanks again

thomasloven commented 2 years ago

This code is producing it:

stream_source = f"rtmp://{self._host}:{self._rtmp_port}/vod/{filename.replace('/', '%20')}?channel={self._channel}&stream=0&token={self._token}"

As you can see there is no space. What are the odds that said space is actually in your configuration/user input ?

That's not what the code says, though.

        stream_source = f"rtmp://{self._host}:{self._rtmp_port}/vod/{filename.replace('/', '%20')}?channel=\
                            {self._channel}&stream=0&token={self._token}"

The indentation causes the space.

Helpful link to the actual code

cpainchaud commented 2 years ago

my eyes are hurting, I know where I got my copy/paste from now .......