<html><head></head><body><div style="color:#000; background-color:#fff; font-family:lucida console, sans-serif;font-size:13px"><div dir="ltr" id="yui_3_16_0_1_1488210672933_15462"><span id="yui_3_16_0_1_1488210672933_15401">textoverlay accepts caps defined as: <br></span><td id="yui_3_16_0_1_1488210672933_15403">text/x-raw, format=(string){ pango-markup, utf8 }<br><br>may be you need to set caps to "text/x-raw, format=utf8" or something along those line.<br></td></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: lucida console, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Le Lundi 27 février 2017 16h34, Nicolas Dufresne <nicolas@ndufresne.ca> a écrit :<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv6114034457"><div><div>Le lundi 27 février 2017 à 07:05 -0800, Adam Plocher a écrit :</div><blockquote type="cite"><div dir="ltr">Nicolas, thank you for your response.  fdsrc seems like it would be a good solution, but I'm having issues getting it to work.<div><br clear="none"></div><div>It seems like I need to specify the caps after the fdsrc, otherwise it fails in other ways.  e.g.</div><div><br clear="none"></div><div><br clear="none"></div><div>Specifying text/x-raw:</div><div><br clear="none"></div><div>tail -f /home/pi/test.txt | /opt/gst/bin/gst-launch-1.0 fdsrc fd=0 ! "text/x-raw" ! txt. videotestsrc ! videoconvert ! decodebin ! textoverlay name=txt ! omxh264enc target-bitrate=800000 control-rate=3 ! tcpserversink host=0.0.0.0 port=9000<br clear="none"></div></div></blockquote><div><br clear="none"></div><div>I think you forgot to keep subparse element.</div><div class="yiv6114034457yqt2722807076" id="yiv6114034457yqtfd60196"><div><br clear="none"></div><blockquote type="cite"><div dir="ltr"><div><br clear="none"></div><div>Results in:</div><div><br clear="none"></div><div><div>Pipeline is PREROLLING ...</div><div>ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter caps do not completely specify the output format</div><div>Additional debug info:</div><div>gstcapsfilter.c(455): gst_capsfilter_prepare_buf (): /GstPipeline:pipeline0/GstCapsFilter:capsfilter0:</div><div>Output caps are unfixed: text/x-raw, format=(string){ pango-markup, utf8 }</div><div>ERROR: pipeline doesn't want to preroll.</div></div><div><br clear="none"></div><div><br clear="none"></div><div>Specifying text/plain:</div><div><br clear="none"></div><div>tail -f /home/pi/test.txt | /opt/gst/bin/gst-launch-1.0 fdsrc fd=0 ! "text/plain" ! txt. videotestsrc ! videoconvert ! decodebin ! textoverlay name=txt ! omxh264enc target-bitrate=800000 control-rate=3 ! tcpserversink host=0.0.0.0 port=9000<br clear="none"></div><div><br clear="none"></div><div>Results in:</div><div><br clear="none"></div><div><div>0:00:00.501757360  4549  0x1e085c0 ERROR           GST_PIPELINE grammar.y:714:gst_parse_perform_link: could not link fdsrc0 to txt, txt can't handle caps text/plain</div><div>WARNING: erroneous pipeline: could not link fdsrc0 to txt, txt can't handle caps text/plain</div></div><div><br clear="none"></div><div><br clear="none"></div><div>No caps at all:</div><div><br clear="none"></div><div>tail -f /home/pi/test.txt | /opt/gst/bin/gst-launch-1.0 fdsrc fd=0 ! txt. videotestsrc ! videoconvert ! decodebin ! textoverlay name=txt !  omxh264enc target-bitrate=800000 control-rate=3 ! tcpserversink host=0.0.0.0 port=9000<br clear="none"></div><div><br clear="none"></div><div>Results in:</div><div><br clear="none"></div><div><div>Pipeline is PREROLLING ...</div><div>WARNING: from element /GstPipeline:pipeline0/GstTextOverlay:txt: Could not multiplex stream.</div><div>Additional debug info:</div><div>gstbasetextoverlay.c(2449): gst_base_text_overlay_video_event (): /GstPipeline:pipeline0/GstTextOverlay:txt:</div><div>received non-TIME newsegment event on video input</div><div>WARNING: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0: Delayed linking failed.</div><div>Additional debug info:</div><div>./grammar.y(510): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0:</div><div>failed delayed linking some pad of GstDecodeBin named decodebin0 to some pad of GstTextOverlay named txt</div><div>ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.</div><div>Additional debug info:</div><div>gstbasesrc.c(2951): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:</div><div>streaming stopped, reason not-linked (-1)</div><div>ERROR: pipeline doesn't want to preroll.</div></div><div><br clear="none"></div><div><br clear="none"></div><div>There is some information here (regarding the older version of gst-launch): </div><div><a rel="nofollow" shape="rect" target="_blank" href="http://gstreamer-devel.966125.n4.nabble.com/Dynamic-text-again-td3676141.html">http://gstreamer-devel.966125.n4.nabble.com/Dynamic-text-again-td3676141.html</a><br clear="none"></div><div><br clear="none"></div><div>And that links to this bug that was resolved (again, old gst-launch): </div><div><a rel="nofollow" shape="rect" target="_blank" href="https://bugzilla.gnome.org/show_bug.cgi?id=654959">https://bugzilla.gnome.org/show_bug.cgi?id=654959</a><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><div>I've seen a couple examples which used the "text/plain" caps.</div><div><br clear="none"></div><div>I'm certainly open to cracking open the Python lib and giving it a shot.  I would need to read up on it a bit and I'm not familiar with the appsrc, either, but that's something else I'm open to. I have done very basic stuff with the Python libs but nothing too fancy or dynamic (basic pipelines, no more complex than I would get from gst-launch-1.0).</div><div><br clear="none"></div><div>What would you recommend?  Is there an example or resource you could point me towards?</div><div><br clear="none"></div><div>Thank you for your help</div><div><br clear="none"></div></div><div class="yiv6114034457gmail_extra"><br clear="none"><div class="yiv6114034457gmail_quote">On Sun, Feb 26, 2017 at 2:46 PM, Nicolas Dufresne <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:nicolas@ndufresne.ca" target="_blank" href="mailto:nicolas@ndufresne.ca">nicolas@ndufresne.ca</a>></span> wrote:<br clear="none"><blockquote type="cite"><span class="yiv6114034457">Le dimanche 26 février 2017 à 06:18 -0800, Adam Plocher a écrit :<br clear="none">
> Hello, I apologize if I'm posting this in the wrong place. I've<br clear="none">
> previously asked this on stackoverflow and never got a response: http<br clear="none">
> ://<a rel="nofollow" shape="rect" target="_blank" href="http://stackoverflow.com/questions/42128804/polling-a-text-file-and-">stackoverflow.com/ questions/42128804/polling-a- text-file-and-</a><br clear="none">
> overlaying-the-result-in- gstreamer<br clear="none">
><br clear="none">
> I have a Raspberry Pi with a camera and I'm live streaming that back<br clear="none">
> to another unit (it's for a baby monitor).  On the same Pi, I have a<br clear="none">
> temperature sensor that is dumping the current temp to a file every 5<br clear="none">
> seconds.<br clear="none">
><br clear="none">
> My question: Is it possible to somehow poll that txt file and update<br clear="none">
> a text-overlay on the live stream based on the current contents of<br clear="none">
> that file?<br clear="none">
<br clear="none">
</span>filsesrc does not have this feature unfortunatly. I believe using<br clear="none">
fdsrc, you could:<br clear="none">
<br clear="none">
  tail -f text.txt | gst-launch-1.0 fdsrc ! ...<br clear="none">
<br clear="none">
Let me know if that is a good work-around. If you are writing an app,<br clear="none">
this can be done with a pipe, or if you prefer, with appsrc.<br clear="none">
<span class="yiv6114034457"><br clear="none">
><br clear="none">
> I've tried using a filesrc and subparse, and it will grab it<br clear="none">
> initially if I format the input text file properly, but it doesn't<br clear="none">
> seem to update itself:<br clear="none">
><br clear="none">
> gst-launch-1.0 -v \<br clear="none">
>     filesrc location=/home/pi/temp.txt ! subparse ! txt. rpicamsrc<br clear="none">
> awb-mode=0 awb-gain-red=1 awb-gain-blue=2 rotation=0 bitrate=820000<br clear="none">
> preview=false brightness=67 contrast=30 sharpness=40 \<br clear="none">
>     ! video/x-h264,width=800,height= 480,framerate=10/1 \<br clear="none">
>     ! h264parse ! decodebin ! videoconvert ! clockoverlay shaded-<br clear="none">
> background=true draw-shadow=true font-desc="Nimbus Mono" \<br clear="none">
>     ! textoverlay name=txt shaded-background=yes \<br clear="none">
>     ! omxh264enc control-rate=3 target-bitrate=850000 \<br clear="none">
>     ! tcpserversink host=0.0.0.0 port=5555 sync=true<br clear="none">
><br clear="none">
> The input file looks like this:<br clear="none">
> 1<br clear="none">
> 00:00:00,000 --> 99:59:59,000<br clear="none">
> 69 degrees<br clear="none">
> Thank you!<br clear="none">
</span>> ______________________________ _________________<br clear="none">
> gstreamer-devel mailing list<br clear="none">
> <a rel="nofollow" shape="rect" ymailto="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists. freedesktop.org</a><br clear="none">
> <a rel="nofollow" shape="rect" target="_blank" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/ mailman/listinfo/gstreamer- devel</a><br clear="none">______________________________ _________________<br clear="none">
gstreamer-devel mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists. freedesktop.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/ mailman/listinfo/gstreamer- devel</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div>
<pre>_______________________________________________
gstreamer-devel mailing list
<a rel="nofollow" shape="rect" ymailto="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a rel="nofollow" shape="rect" target="_blank" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre></blockquote></div></div></div><br><div class="yqt2722807076" id="yqtfd53422">_______________________________________________<br clear="none">gstreamer-devel mailing list<br clear="none"><a shape="rect" ymailto="mailto:gstreamer-devel@lists.freedesktop.org" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br clear="none"><a shape="rect" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>