<div dir="ltr">Hello, I apologize if I'm posting this in the wrong place. I've previously asked this on stackoverflow and never got a response: <a href="http://stackoverflow.com/questions/42128804/polling-a-text-file-and-overlaying-the-result-in-gstreamer">http://stackoverflow.com/questions/42128804/polling-a-text-file-and-overlaying-the-result-in-gstreamer</a><div><br></div><div>I have a Raspberry Pi with a camera and I'm live streaming that back to another unit (it's for a baby monitor).  On the same Pi, I have a temperature sensor that is dumping the current temp to a file every 5 seconds.</div><div><br></div><div><b>My question: </b>Is it possible to somehow poll that txt file and update a text-overlay on the live stream based on the current contents of that file?</div><div><br></div><div>I've tried using a filesrc and subparse, and it will grab it initially if I format the input text file properly, but it doesn't seem to update itself:</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);word-wrap:normal;color:rgb(36,39,41)"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;white-space:inherit">gst-launch-1.0 -v \
    filesrc location=/home/pi/temp.txt ! subparse ! txt. rpicamsrc awb-mode=0 awb-gain-red=1 awb-gain-blue=2 rotation=0 bitrate=820000 preview=false brightness=67 contrast=30 sharpness=40 \
    ! video/x-h264,width=800,height=480,framerate=10/1 \
    ! h264parse ! decodebin ! videoconvert ! clockoverlay shaded-background=true draw-shadow=true font-desc="Nimbus Mono" \
    ! textoverlay name=txt shaded-background=yes \
    ! omxh264enc control-rate=3 target-bitrate=850000 \
    ! tcpserversink host=0.0.0.0 port=5555 sync=true</code></pre><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);word-wrap:normal;color:rgb(36,39,41)"><span style="white-space:inherit"><br></span></pre><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);word-wrap:normal;color:rgb(36,39,41)"><span style="white-space:inherit">The input file looks like this:</span><br></pre><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);word-wrap:normal;color:rgb(36,39,41)"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;white-space:inherit"><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;white-space:inherit">1
00:00:00,000 --> 99:59:59,000
69 degrees</code></pre><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;white-space:inherit">Thank you!</code></pre></code></pre></div></div>