I have a Linux server running and I would like to stream the first four consoles (TTY1,TTY2,TTY3,TTY4) where I have different tails with with my log-files to the network so I can receive the stream in the way I receive a webcam in my network.
The reason is that my NVR (Network Video Recorder) Device can split the screen in 4 and display 4 log-files or even 16 log files in the same time.
The NVR supports the following protocols : N1 and ONVIF
I found different solutions to stream a media file, bit none for streaming the console.
Honestly, I think you're working too hard. Try looking at something like
tmux
which can do the console multiplexing, as well as allowing multiple connections to the console it creates. You can also split the "screens" into multiple consoles, and switch between them.This is something that can easily be re-connected to from as many consoles as you have access to, as well as detaching from the tmux session, without killing any processes.
This will create a video of TTY1 and pipe it to ffplay (you could do something else with it)
You can also check when LOGFILE changes. Each time that happens it will get the last 25 files, convert them to an image and feed it to
ffmpeg
, that creates a matroska video file and writes it tostdout
, whereffplay
picks it up and plays it.I left all the pipes so that you can decide where to insert the solutions you already had for media files.