Screen video capture with ffmpeg and secure transfer over the network
Unix creators set up a design philosophy based around simplicity : specific pieces of software should be built to do one thing and do that one thing well. I wanted to toy around ffmpeg and netcat on my free time, and came up with a train pipe that stream the output of the screen, compress it, and encrypt it with Rijndael cypher, its like AES but with 256bit block instead (Yes Iām extremely paranoid), and finally send it over the network with netcat. Each block will be explained separately then reassembled at the end.
1- The screen capture is performed with fmpeg and stream read with ffplay.
NB: The ā-ā symbol replace a file in general, and instead of I/O on a file, it does it on pipe.
2- Compression is done with the classic gzip.
3- ccrypt is doing the encryption here.
NB: Of course, never use plain text keys on prod, just for demonstration purposes.
4- netcat finally which just opens a socket connection.
Thats how you capture video with ffmpeg and secure transfer over the network with just unix commands.