user14515: I'm using the following ffmpeg command to create an H.264 encoded MPEG transport stream from a single png file with a text overlay.
ffmpeg -re -loop 1 -i smpte-color-bars-1080p.png -vf drawtext="fontfile=monofonto.ttf: fontsize=96: box=1: boxcolor=black@0.75: boxborderw=5: fontcolor=white: x=(w-text_w)/2: y=(h-text_h)/2: text='MY OVERLAY'" -r 25 -vcodec libx264 -f mpegts udp://0.0.0.0:1234

This seems to be working well, but as it is static you cannot easily tell if the encode has stopped. I'd therefore also like to add a timecode overlay so that the image has some changing content.
It is important that the stream is generated from a single static frame as I want the stream to be absolutely continuous and not a looped pre-encoded TS file.
Is there any way to add this dynamic overlay using ffmpeg? (I'm currently thinking piping one stream into another but that seems a bit hacky)
I'm trying to do this on a linux (Ubuntu) platform.

user14515: Wow... ffmpeg never ceases to amaze.. it's built in!
ffmpeg -re -loop 1 -i smpte-color-bars-1080p.png -vf drawtext="fontfile=monofonto.ttf: fontsize=96: box=1: boxcolor=black@0.75: boxborderw=5: fontcolor=white: x=(w-text_w)/2: y=((h-text_h)/2)+((h-text_h)/4): text='%{gmtime\:%H\\\\\:%M\\\\\:%S}'" -r 25 -vcodec libx264 -f mpegts udp://127.0.0.1:1234

The important bit for the timecode being: text='%{gmtime\:%H\\\\\:%M\\\\\:%S}'
There is some crazy escaping in there to get the colons to display(in bash), but that is UTC/GMT time of day timecode burnt in... just need to figure out the syntax for multiple drawtext functions now and I'm all set...

14515: <p>I'm using the following <code>ffmpeg</code> command to create an H.264 encoded MPEG transport stream from a single png file with a text overlay.</p>

<pre><code>ffmpeg -re -loop 1 -i smpte-color-bars-1080p.png -vf drawtext="fontfile=monofonto.ttf: fontsize=96: box=1: boxcolor=black@0.75: boxborderw=5: fontcolor=white: x=(w-text_w)/2: y=(h-text_h)/2: text='MY OVERLAY'" -r 25 -vcodec libx264 -f mpegts udp://0.0.0.0:1234
</code></pre>

<p>This seems to be working well, but as it is static you cannot easily tell if the encode has stopped. I'd therefore also like to add a timecode overlay so that the image has some changing content.</p>

<p>It is important that the stream is generated from a single static frame as I want the stream to be absolutely continuous and not a looped pre-encoded TS file.</p>

<p>Is there any way to add this dynamic overlay using ffmpeg? (I'm currently thinking piping one stream into another but that seems a bit hacky)</p>

<p>I'm trying to do this on a linux (Ubuntu) platform.</p>
 14515: <p>Wow... ffmpeg never ceases to amaze.. it's built in!</p>

<pre><code>ffmpeg -re -loop 1 -i smpte-color-bars-1080p.png -vf drawtext="fontfile=monofonto.ttf: fontsize=96: box=1: boxcolor=black@0.75: boxborderw=5: fontcolor=white: x=(w-text_w)/2: y=((h-text_h)/2)+((h-text_h)/4): text='%{gmtime\:%H\\\\\:%M\\\\\:%S}'" -r 25 -vcodec libx264 -f mpegts udp://127.0.0.1:1234
</code></pre>

<p>The important bit for the timecode being: <code>text='%{gmtime\:%H\\\\\:%M\\\\\:%S}'</code></p>

<p>There is some crazy escaping in there to get the colons to display(in <code>bash</code>), but that is UTC/GMT time of day timecode burnt in... just need to figure out the syntax for multiple <code>drawtext</code> functions now and I'm all set...</p>
