Dynamic text again

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic text again

jaro
Hi, I was looking for howto enhance a video stream with a dynamic text, I have seen some discussions, but still I see no solution.
My problem:  I want to put GPS information on top of a webcam stream.
I played a little with a named pipe subtitles.fifo and a modified example
gst-launch -v filesrc location=subtitles.fifo ! subparse ! txt.   videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes ! xvimagesink
but without a big success.

Maybe there is some chance with appsrc, but I can see no examples to start with. You see, my abilities are not high, I use gstreamer very simply from a commandline.
thans
jarom
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic text again

Stefan Sauer
On 07/18/11 20:56, jaro wrote:
> Hi, I was looking for howto enhance a video stream with a dynamic text, I
> have seen some discussions, but still I see no solution.
> My problem:  I want to put GPS information on top of a webcam stream.
> I played a little with a named pipe subtitles.fifo and a modified example
> gst-launch -v filesrc location=subtitles.fifo ! subparse ! txt.  
> videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes !
> xvimagesink
> but without a big success.

gst-launch fdsrc fd=0 ! text/plain ! txt. videotestsrc ! textoverlay
name=txt shaded-background=yes font-desc="Serif 40" ! xvimagesink

would read the text from stdin. For some reason it does only for the
first line.

gst-launch fdsrc fd=0 ! text/plain ! txt. videotestsrc ! textoverlay
name=txt shaded-background=yes font-desc="Serif 40" wait-text=false !
xvimagesink

this does not wait, but the text gets cleared on the next frame again :/

Stefan

> Maybe there is some chance with appsrc, but I can see no examples to start
> with. You see, my abilities are not high, I use gstreamer very simply from a
> commandline.
> thans
> jarom
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Dynamic-text-again-tp3676141p3676141.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic text again

jaro
Thanks, this is close. I have a small question - why this text-clearing is not a problem here? :


gst-launch -v filesrc location=subtitles.srt ! subparse ! txt.   videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes ! xvimagesink

Maybe the subparse plugin does something special? Does there exist any similar plugin?
jarom
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic text again

Stefan Sauer
On 07/19/11 19:35, jaro wrote:

> Thanks, this is close. I have a small question - why this text-clearing is
> not a problem here? :
>
>
> gst-launch -v filesrc location=subtitles.srt ! subparse ! txt.  
> videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes !
> xvimagesink
>
> Maybe the subparse plugin does something special? Does there exist any
> similar plugin?
srt files contain timestamps. subparse will simple send a new buffer
when a new string is due. I have not check what in particular causes
textoverlay to remove the text.

You can either try to figure that out, or write an application that
whenever you get new text, set the text property of textoverlay.

Stefan

> jarom
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Dynamic-text-again-tp3676141p3678736.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic text again

jaro
Maybe, subparse repeats the text for every single frame until the end-timestamp?
Anyway, any recomendation/tutorial/hint how to write a filter?

jarom
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic text again

Stefan Sauer
In reply to this post by Stefan Sauer
On 07/19/11 17:10, Stefan Kost wrote:

> On 07/18/11 20:56, jaro wrote:
>> Hi, I was looking for howto enhance a video stream with a dynamic text, I
>> have seen some discussions, but still I see no solution.
>> My problem:  I want to put GPS information on top of a webcam stream.
>> I played a little with a named pipe subtitles.fifo and a modified example
>> gst-launch -v filesrc location=subtitles.fifo ! subparse ! txt.  
>> videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes !
>> xvimagesink
>> but without a big success.
> gst-launch fdsrc fd=0 ! text/plain ! txt. videotestsrc ! textoverlay
> name=txt shaded-background=yes font-desc="Serif 40" ! xvimagesink
>
> would read the text from stdin. For some reason it does only for the
> first line.
>
> gst-launch fdsrc fd=0 ! text/plain ! txt. videotestsrc ! textoverlay
> name=txt shaded-background=yes font-desc="Serif 40" wait-text=false !
> xvimagesink
>
> this does not wait, but the text gets cleared on the next frame again :/
I filed a bug+patch at
https://bugzilla.gnome.org/show_bug.cgi?id=654959

Stefan

> Stefan
>> Maybe there is some chance with appsrc, but I can see no examples to start
>> with. You see, my abilities are not high, I use gstreamer very simply from a
>> commandline.
>> thans
>> jarom
>>
>> --
>> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Dynamic-text-again-tp3676141p3676141.html
>> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel