Open WhitecastlePT opened 4 years ago
@WhitecastlePT - I was able to get local streaming to work following this walkthrough on Medium. I'm just having problems trying to control the camera (power on/off) via port 9999. Overall not a huge deal though.
@WhitecastlePT - I was able to get local streaming to work following this walkthrough on Medium. I'm just having problems trying to control the camera (power on/off) via port 9999. Overall not a huge deal though.
Can you tell me what did you used to see the stream outside Kasa'a app ?
@WhitecastlePT - the last portion of the walkthrough contains the following snippet:
curl -vv -k -u admin:YWRtaW4= --ignore-content-length "https://192.168.10.40:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd&deviceId= CAFEDEADBEAFCAFEDEADBEAFCAFEDEADBEAFCAFE" --output - | ffmpeg -y -i - test.mp4
Using this snippet (on a linux machine with Ffmpeg installed) I made the following modifications:
-u admin:YWRtaW4=
portion of the command needs to be updated with your TP Link Kasa account credentials. Say my username is name@example.com
and my password is mypassword
. You need to Base64 encode the password. So mypassword
becomes bXlwYXNzd29yZA==
. This portion of the command now becomes -u name@example.com:bXlwYXNzd29yZA==
&deviceId= CAFEDEADBEAFCAFEDEADBEAFCAFEDEADBEAFCAFE
parameter from the request (since I didn't know what the deviceId was).My final command was then:
curl -vv -k -u name@example.com:bXlwYXNzd29yZA== --ignore-content-length "https://<CAMERAIPADDRESS>:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd" --output - | ffmpeg -y -i - test.mp4
This command will use cURL to make a request to the camera, and then pipe it out to FFmpeg which will write to the file test.mp4
. After terminating the command I was able to open test.mp4
in VLC.
Ok, only need to discover deviceID aswell...thx ;)
Oh perhaps I wasn't clear you can leave the deviceID
parameter out. Hope it works for you!
Sorry didn´t read the part "I removed the &deviceId=" sorry 👍
Thanks @WhitecastlePT. This seems to stream the feed to an mp4 file. What about streaming a live view in the browser? Would that be possible?
Tried to use this for KC100. I detected that port 9999 is also open in this device. But i can´t get it to work with the provided commands.
If i wanted to get the video stream from this cam without the need of the app. Think its possible ?