Page 1 of 1

[SOLVED] Need Help: How to use a snapshot generated by avconv/ffmpeg

Posted: Tuesday 13 February 2018 13:47
by Antori91
Hello,

I use avconv to generate snapshots from a camera that doesn't support this feature (avconv -i http://user:[email protected]/img/video.asf -update 1 -vsync 1 -r .5 -an /home/pi/Samba/WVC54GC-MEZZANINE.jpg )

Then I have a symbolic link to get the snapshot within domoticz web domain (/home/pi/domoticz/www/iot_CAM> ln -s /home/pi/Samba/WVC54GC-MEZZANINE.jpg ./WVC54GC-MEZZANINE)
Up to this step, everything works fine.

But I can't success to use the snapshots with Domoticz. You can see in the screenshot below the parameters I use in Edit Camera Mode. In this edit mode, I can get the snapshot if the username is null.

The issues I get :
- when in Edit mode I save the parameters, the username doesn't stay null, I get my login user name and then I can't get the snapshots anymore,
- It doesn't work at all in ShowCameraLiveSteam (when you click at the camera icon of the switch linked to the camera).

What is wrong? How do you parameter Domoticz to use snapshots generated by avconv?
Capture.JPG
Capture.JPG (107.16 KiB) Viewed 4450 times

[SOLVED] Re: Need Help: How to use a snapshot generated by avconv/ffmpeg

Posted: Wednesday 14 February 2018 8:23
by Antori91
OK Solved. I've found the trick. You have to use a snapshot name corresponding to a fake cgi url with user/password

Re: [SOLVED] Re: Need Help: How to use a snapshot generated by avconv/ffmpeg

Posted: Sunday 03 March 2019 16:32
by FunFair
Antori91 wrote: Wednesday 14 February 2018 8:23 OK Solved. I've found the trick. You have to use a snapshot name corresponding to a fake cgi url with user/password
Did you create an ImageURL.cgi file or something that redirects to the image?
What does the cgi file contain to do this?

I can't really seem to find a good example of the contents of a camera.cgi file.

Re: [SOLVED] Need Help: How to use a snapshot generated by avconv/ffmpeg

Posted: Sunday 03 March 2019 18:10
by Antori91
Hello,
I did this using Apache with cgi support.
I've changed my cameras and don't use anymore this. As far as I remember, the cookbook is:
First to get the avconv snapshots in Apache, use symbolic link:
[/var/www/html]> ln -s .../AVCONV/MY_SNAPSHOT.jpg ./CGIProxy.fcgi.MY_SNAPSHOT.usr=MY_USER_NAME
Then in Domoticz, enter
IP Address: Apache IP address
Port: Apache Port number
Username: MY_USER_NAME
Password: leave blank
imageUrl: /CGIProxy.fcgi.MY_SNAPSHOT.usr=#USERNAME

Re: [SOLVED] Need Help: How to use a snapshot generated by avconv/ffmpeg

Posted: Monday 04 March 2019 11:20
by FunFair
Antori91 wrote: Sunday 03 March 2019 18:10 Hello,
I did this using Apache with cgi support.
I've changed my cameras and don't use anymore this. As far as I remember, the cookbook is:
First to get the avconv snapshots in Apache, use symbolic link:
[/var/www/html]> ln -s .../AVCONV/MY_SNAPSHOT.jpg ./CGIProxy.fcgi.MY_SNAPSHOT.usr=MY_USER_NAME
Then in Domoticz, enter
IP Address: Apache IP address
Port: Apache Port number
Username: MY_USER_NAME
Password: leave blank
imageUrl: /CGIProxy.fcgi.MY_SNAPSHOT.usr=#USERNAME
Thanks. I will try that :)