Viewing direct from URL
Viewing direct from URL
Hi
I'm looking to set-up a live stream via a raspberry PI to a monitor but ideally would like to view the stream via a URL. Is there any way to do this? This was asked previously in the forum, but the links provided look to have changed since the post, rendering the advice futile.
Regards
I'm looking to set-up a live stream via a raspberry PI to a monitor but ideally would like to view the stream via a URL. Is there any way to do this? This was asked previously in the forum, but the links provided look to have changed since the post, rendering the advice futile.
Regards
Re: Viewing direct from URL
Hello,
First you will have to go to NETATMO connect DEV portal and identify yourself : https://dev.netatmo.com/resources/techn ... ethomedata
Call this method "Gethomedata" directly in the zone called "Try this method by yourself with our TRY IT module". Your "access_token" should already be fulfilled, "home_id" and "size" are optional. Clic "Try it", then expand "Body", "homes", "object", "cameras", "object" (select the one you want if you have multiple devices).
Copy the "vpn_url" which should be like : (do not forget the ',,' at the end if you have some)
Then go to this page to learn how to compose live snapshots et stream urls : https://dev.netatmo.com/resources/techn ... meras/live
Live Snapshot will be like :
Live Stream will be like :
If you want to get permanent direct access to your cams in your local network, compose this URL :
And perform a curl or wget in a terminal to see the content of the m3u8 :
You should get something like that :
Copy the base url and compose the final static urls :
Live Snapshot :
Live Stream :
You can open the m3u8 url in VLC app, or if you need another format you can use ffmpeg to transcode it or send it to any RTSP server :
This command line sample does not transcode the video (no need of CPU). It only removes the audio (-an) and keep the original video codec, size and bitrate (-vcodec copy) before sending it to the RTSP server. I use it to have my NETATMO cams displayed and 24/7 recorded in a Synology NAS with Surveillance Station.
I'm using this very simple RTSP server : https://github.com/revmischa/rtsp-server , but any other should be ok.
Then the url used for Surveillance Station is : rtsp://rtsp_server_local_ip/name_of_your_choice.sdp
Enjoy!
First you will have to go to NETATMO connect DEV portal and identify yourself : https://dev.netatmo.com/resources/techn ... ethomedata
Call this method "Gethomedata" directly in the zone called "Try this method by yourself with our TRY IT module". Your "access_token" should already be fulfilled, "home_id" and "size" are optional. Clic "Try it", then expand "Body", "homes", "object", "cameras", "object" (select the one you want if you have multiple devices).
Copy the "vpn_url" which should be like :
Code: Select all
https://v6.netatmo.net/restricted/10.255.201.22/xxxxxxxxxxxx/yyyyyyyyyyyy,,
Then go to this page to learn how to compose live snapshots et stream urls : https://dev.netatmo.com/resources/techn ... meras/live
Live Snapshot will be like :
Code: Select all
https://v6.netatmo.net/restricted/10.255.201.22/xxxxxxxxxxxx/yyyyyyyyyyyy,,/live/snapshot_720.jpg
Code: Select all
https://v6.netatmo.net/restricted/10.255.201.22/xxxxxxxxxxxx/yyyyyyyyyyyy,,/live/index.m3u8
Code: Select all
https://v6.netatmo.net/restricted/10.255.201.22/xxxxxxxxxxxx/yyyyyyyyyyyy,,/live/files/high/index_local.m3u8
Code: Select all
"curl https://v6.netatmo.net/restricted/10.255.201.22/xxxxxxxxxxxx/yyyyyyyyyyyy,,/live/files/high/index_local.m3u8"
Code: Select all
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:117647
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:2
#EXTINF:2.000000,
http://your_cam_local_ip/zzzzzzzzzzzzz/live/files/high/live0000117648.ts
#EXTINF:2.000000,
http://your_cam_local_ip/zzzzzzzzzzzzz/live/files/high/live0000117649.ts
#EXTINF:2.000000,
http://your_cam_local_ip/zzzzzzzzzzzzz/live/files/high/live0000117650.ts
Live Snapshot :
Code: Select all
http://your_cam_local_ip/zzzzzzzzzzzzz/live/snapshot_720.jpg
Code: Select all
http://your_cam_local_ip/zzzzzzzzzzzzz/live/files/high/index.m3u8
Code: Select all
ffmpeg -reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 120 -re -i http://your_cam_local_ip/zzzzzzzzzzzzz/live/files/high/index.m3u8 -vcodec copy -an -f rtsp -muxdelay 0.1 rtsp://rtsp_server_local_ip:5545/name_of_your_choice.sdp
I'm using this very simple RTSP server : https://github.com/revmischa/rtsp-server , but any other should be ok.
Then the url used for Surveillance Station is : rtsp://rtsp_server_local_ip/name_of_your_choice.sdp
Enjoy!
Re: Viewing direct from URL
This is great information. Can I also run the rtsp server on a Synology NAS or do I need to invest in another piece of hardware just for the RTSP Server (such as Raspberry PI). Are you using the Synology Network Video Recorder NVR216 or another model?
Re: Viewing direct from URL
Hello,
To "transcode", all you need is ffmpeg installed. So it can be done on many systems and a Synology should be OK. The used RTSP server is PERL based so it's also widely supported. On a Synology, you can use a Docker instance of any Linux distribution. Then you won't have to modify or complete the original packages of the Synology system. You'll be free to do and break anything you want.
I had a useless Raspberry Pi, so I took it to perform theses jobs. I added a "poor" crontab process monitoring to keep the ffmpeg task relaunched in case of disconnection or problem.
In crontab :
Very basic script "check-ffmpeg-presence-01.sh" - It only checks if the ffmpeg process is running with your Presence local IP (here 172.16.2.234). The last state is written in a static file (up or down) :
I'm using Surveillance Station 7.1-4155 on a Synology DS1815+ NAS, running DSM 5.2-5967 Update 2 (not yet upgraded to 6.1, I should think about it ).
To "transcode", all you need is ffmpeg installed. So it can be done on many systems and a Synology should be OK. The used RTSP server is PERL based so it's also widely supported. On a Synology, you can use a Docker instance of any Linux distribution. Then you won't have to modify or complete the original packages of the Synology system. You'll be free to do and break anything you want.
I had a useless Raspberry Pi, so I took it to perform theses jobs. I added a "poor" crontab process monitoring to keep the ffmpeg task relaunched in case of disconnection or problem.
In crontab :
Code: Select all
# ffmpeg check for Netatmo Presence
*/1 * * * * /home/monitoring/check-ffmpeg-presence-01.sh
Code: Select all
#!/bin/sh
if [ "$(ps aux | grep "[1]72.16.2.234")" ]
then
if [ -n "$(cat /home/monitoring/ffmpeg-presence-01.state | grep "down")" ]
then
# curl "my sms server url" >/dev/null 2>&1
echo "ffmpeg-presence-01 up again - SMS alert !"
fi
echo "up" > /home/monitoring/ffmpeg-presence-01.state
else
if [ -n "$(cat /home/monitoring/ffmpeg-presence-01.state | grep "up")" ]
then
# curl "my sms server url" >/dev/null 2>&1
echo "ffmpeg-presence-01 down - Restarting... - SMS alert !"
fi
echo "down" > /home/monitoring/ffmpeg-presence-01.state
ffmpeg -reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 120 -re -i http://172.16.2.234/your-static-local-live-token/live/files/high/index.m3u8 -vcodec copy -an -f rtsp -muxdelay 0.1 rtsp://rtsp_server_local_ip:5545/presence-01.sdp & >/dev/null 2>&1
fi
Re: Viewing direct from URL
Hi,
There something about the new improved video quality in Firmware 101 that's causing this problems, video quality of the output rtsp stream seems to degrade and pixelate over time. Any ideas on what to tweak on the ffmpeg command line to compensate?
Was working great on previous firmwares, even used the footage capture a clip of a strange standing next to my wife's car at 3am that the Netatmo motion detection had missed !!
Thanks
Chris
There something about the new improved video quality in Firmware 101 that's causing this problems, video quality of the output rtsp stream seems to degrade and pixelate over time. Any ideas on what to tweak on the ffmpeg command line to compensate?
Was working great on previous firmwares, even used the footage capture a clip of a strange standing next to my wife's car at 3am that the Netatmo motion detection had missed !!
Thanks
Chris
-
- Posts: 1
- Joined: 16 Jul 2017, 09:30
Re: Viewing direct from URL
buongiorno. qualcuno mi puo dire se la nettamo welcome si puo controllare anche da pc con win7? grazie..... e come????
-
- Posts: 828
- Joined: 18 Jun 2014, 15:09
Re: Viewing direct from URL
Ciao giuseppedlg,
La preghiamo di scrivere in inglese su questo forum, così possono partecipare tutti
Le videocamere Netatmo possono essere controllate da PC, bisogna rendersi su https://my.netatmo.com.
Grazie,
----
Hi giuseppedlg,
Please use English when writing in this forum so everyone can participate
Netatmo cameras can be controlled from a PC, you just need to go to https://my.netatmo.com.
Thanks,
La preghiamo di scrivere in inglese su questo forum, così possono partecipare tutti
Le videocamere Netatmo possono essere controllate da PC, bisogna rendersi su https://my.netatmo.com.
Grazie,
----
Hi giuseppedlg,
Please use English when writing in this forum so everyone can participate
Netatmo cameras can be controlled from a PC, you just need to go to https://my.netatmo.com.
Thanks,
Jofre - Netatmo Team
Re: Viewing direct from URL
I'm starting the Live Stream in VLC:Live Stream :
CODE: SELECT ALL
http://your_cam_local_ip/zzzzzzzzzzzzz/live/files/high/index.m3u8
You can open the m3u8 url in VLC app,
- "Stream" --> "Open Network Stream"
- paste the URL with correct IP
- Hit Play
After that the streaming stops and can't be resumed.
Is there a miss configuration in VLC?
Thanks,
Stefan