Well, I seem to have found the url to get what it seems to be the first frame of the last video as a jpg:
https://xxxxx.duckdns.org:8123/api/camera_proxy/camera.camara_del_salon?api_password=xxxxx
And for the video file:
https://xxxxx.duckdns.org:8123/api/camera_proxy_stream/camera.camara_del_salon?api_password=xxxxx
I can send the photo to Telegram with this:
{
"data": {
"photo": {
"url": "https://xxxxx.duckdns.org:8123/api/camera_proxy/camera.camara_del_salon?api_password=xxxxx"
}
},
"message": "Test",
"title": "My message title"
}
But when I try to send the video with this:
{
"data": {
"video": {
"url": "https://xxxxx.duckdns.org:8123/api/camera_proxy_stream/camera.camara_del_salon?api_password=xxxxx"
}
},
"message": "Test",
"title": "My message title"
}
I get a bunch of errors related to ffmpeg and the message is not sent.
2018-01-13 13:48:59 ERROR (MainThread) [haffmpeg.core] FFmpeg fails all args must be str or bytes
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/haffmpeg/core.py", line 114, in open
stderr=stderr
File "/usr/lib/python3.6/asyncio/subprocess.py", line 225, in create_subprocess_exec
stderr=stderr, **kwds)
File "uvloop/loop.pyx", line 2368, in __subprocess_run
File "uvloop/handles/process.pyx", line 564, in uvloop.loop.UVProcessTransport.new
File "uvloop/handles/process.pyx", line 49, in uvloop.loop.UVProcess._init
File "uvloop/handles/process.pyx", line 38, in uvloop.loop.UVProcess._init
File "uvloop/handles/process.pyx", line 227, in uvloop.loop.UVProcess._init_options
File "uvloop/handles/process.pyx", line 270, in uvloop.loop.UVProcess._init_args
TypeError: all args must be str or bytes
2018-01-13 13:48:59 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 410, in start
resp = yield from self._request_handler(request)
File "/usr/lib/python3.6/site-packages/aiohttp/web.py", line 325, in _handle
resp = yield from handler(request)
File "/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 93, in impl
return (yield from handler(request))
File "/usr/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 58, in ban_middleware
return (yield from handler(request))
File "/usr/lib/python3.6/asyncio/coroutines.py", line 213, in coro
res = yield from res
File "/usr/lib/python3.6/asyncio/coroutines.py", line 213, in coro
res = yield from res
File "/usr/lib/python3.6/site-packages/homeassistant/components/http/__init__.py", line 430, in handle
result = yield from result
File "/usr/lib/python3.6/site-packages/homeassistant/components/camera/__init__.py", line 387, in get
response = yield from self.handle(request, camera)
File "/usr/lib/python3.6/site-packages/homeassistant/components/camera/__init__.py", line 425, in handle
yield from camera.handle_async_mjpeg_stream(request)
File "/usr/lib/python3.6/site-packages/homeassistant/components/camera/yi.py", line 136, in handle_async_mjpeg_stream
'multipart/x-mixed-replace;boundary=ffserver')
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/aiohttp_client.py", line 121, in async_aiohttp_proxy_stream
data = yield from stream.read(buffer_size)
File "/usr/lib/python3.6/site-packages/haffmpeg/core.py", line 156, in read
return self._proc.stdout.read(count)
AttributeError: 'NoneType' object has no attribute 'stdout'
2018-01-13 13:48:59 ERROR (SyncWorker_10) [homeassistant.components.telegram_bot] Can't load photo into ByteIO: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
Any suggestion?