Hello,
'I have the question, if I could use syslog-ng to filter the start and stop of the stream'
Yes, it can filter those messages (disclaimer without seeing those messages).
'and execute an action "ffmpeg stop" and "delete video segments". '
It was not something syslog-ng is designed to, but for example you could use program destination to execute arbitrary executable (like s small script to call ffmpeg stop).
You could do something like this (not tested) to have separate things to do based on start/stop:
@version: 3.20
source xupnpd2 {
stdin(flags(no-parse));
};
destination start {
program("/usr/bin/do-start-magic.sh");
};
destination stop {
program("/usr/bin/do-stop-magic.sh");
};
log { source(xupnpd2); filter { program("xupnpd2") AND message("start"); }; destination(start); };
log { source(xupnpd2); filter { program("xupnpd2") AND message("stop"); } ; destination(stop); };
Each log/event is a single new line to the program stdin, which it should process.
--
Kokan