transcode video

Add Date and Time to Each Line in ffmpeg Log with awk

When transcode video or catch bugs in live stream, sometimes it is necessary to log ffmpeg messages with also date and time. This is possible with awk.


Insert date and time to ffmpeg log messages using awk

Here we use test stream link from [3]. We run ffplay for check its work:

ffplay 2>&1 | awk 'NF {print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush()}'