Record video live to a server you control, just for fun or in case you need to collect evidence and don't want it just on your device or stored publicly. Can be built as a single Rust executable that acts as an HTTPS server or deployed on Apache/PHP server. (Note, you need to serve over HTTPS since modern browsers won't enable the camera/microphone on non-HTTPS pages) Based on https://raw.githubusercontent.com/muaz-khan/RecordRTC/
Download a release file from the release pages
OR
check out this repository somewhere with an updated copy of Rust and cargo build --release
it
Ideally you use valid SSL keys issued by a real certificate authority. Failing that, just generate self-signed keys by running openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365
or alternately, if that fails, openssl genrsa -out key.pem ; openssl req -x509 -key key.pem -out cert.pem -days 365
If you use an existing keyset, such as keys obtained from a CA, and this fails, you may need to remove password protection or convert format. Try running openssl rsa -in keyinpkcs8format.pem -out key.pem
Be sure to execute from a directory the program can create and write a subfolder of. Once it's running, go to https://[your_ip]:8443/ and your page should be visible.
Set environment variable RUST_LOG to debug or trace and run the program for verbose debug information.
- Drop the .htaccess, PHP, HTML, CSS, and JS files on an Apache PHP host with mod_rewrite and htaccess files enabled
- Create a subfolder named "ups"
- On your device, go to the rcrdr.html page and you should be good to go
- Open your device's browser and go to the appropriate recording home page of the server.
- Hit the button to start recording.
- When prompted to enable video/microphone access, be sure to check the box to remember this permission grant.
- Stop recording.
- Bookmark the page. Better yet, create a home page shortcut.
- When you see something you might want to record, open the shortcut and hit record.
- If you want to delete a video, by design you cannot do that from the page. You'll have to log into the server and delete the files manually.
- Keep in mind this code does not implement access control. You can place this behind .htpasswd restrictions, client certificate restrictions, VPN/IP restrictions, or just hide on an obscure randomized not-enumerable path, but pick a security measure you're comfortable with.