[gst-devel] Problems with clockoverlay and MJPEG stream

Noe Nieto tzicatl at gmail.com
Sat Oct 25 02:13:42 CEST 2008


This is strange,

If I use the test pipeline that comes in the documentation of the
clockoverlay element. This works well, but mine's do not.

gst-launch -v videotestsrc ! clockoverlay halign=right valign=bottom
text="Edge City" shaded-background=true ! ffmpegcolorspace ! ximagesink

gst-launch-0.10 -v gnomevfssrc location=$CAMERA ! mutipartdemux !
ffdec_mjpeg ! clockoverlay text="Camera 1" ! ffmpegcolorspace !   ximagesink


Why does it work with videotestsrc and why it does it freezes with a
MJPEG stream form network?




2008/10/23 Noe Nieto <tzicatl at gmail.com>

> Hi Sudarshan,
>
> I did not had the time to hack on this for a while, but finally I changed
> the pipeline to this:
>
> gst-launch-0.10 -v gnomevfssrc location=$CAMERA ! mutipartdemux !
> ffdec_mjpeg ! clockoverlay text="Camera 1" ! ffmpegcolorspace !   ximagesink
>
>
> The video still freezes. I still don't know why, even if the caps says that
> the video is at 25fps. If I try to close the window, gst-launch does not
> terminate the execution of the pipeline, I have to hit Ctrl-C to re-gain
> control over the console.
>
>
>
> Any idea?
>
>
>
> 2008/10/5 sudarshan bisht <bisht.sudarshan at gmail.com>
>
> Hi Noe ,
>>              As you are using decodebin here as a decoder element so what
>> is does is on the basis of input file it selects the decoder , here in your
>> case it is selecting jpegdec(see red line in your log) , that means it will
>> decode only one frame of data .
>>             To fix this problem you can use ffdec_mjpeg element which is
>> there in ffmpeg package.
>>
>>
>>
>> On Sat, Oct 4, 2008 at 6:06 AM, Noe Nieto <tzicatl at gmail.com> wrote:
>>
>>> Thanks Sudarshan
>>>
>>> Now I've changed the pipeline to this:
>>> gst-launch-0.10 -v gnomevfssrc location=$CAMERA ! decodebin !
>>> clockoverlay text="Camera 1" ! ffmpegcolorspace !  videoscale !  ximagesink
>>> force-aspect-ratio="true"
>>>
>>> But when I run the pipeline there is no video, it's only an still image
>>> with the clock time overlaid, but it is not moving.
>>>
>>> What is the problem? I have reviewed the output of gst-launch and I found
>>> a strange warning:
>>>
>>>
>>> Setting pipeline to PAUSED ...
>>> Pipeline is PREROLLING ...
>>> /pipeline0/decodebin0/typefind.src: caps = multipart/x-mixed-replace
>>> /pipeline0/decodebin0/multipartdemux0.sink: caps =
>>> multipart/x-mixed-replace
>>> /pipeline0/decodebin0/jpegdec0.sink: caps = image/jpeg
>>> /pipeline0/decodebin0/jpegdec0.src: caps = video/x-raw-yuv,
>>> format=(fourcc)I420, width=(int)640, height=(int)480,
>>> framerate=(fraction)0/1
>>> /pipeline0/clockoverlay0.src: caps = video/x-raw-yuv,
>>> format=(fourcc)I420, width=(int)640, height=(int)480,
>>> framerate=(fraction)0/1
>>> /pipeline0/clockoverlay0.video_sink: caps = video/x-raw-yuv,
>>> format=(fourcc)I420, width=(int)640, height=(int)480,
>>> framerate=(fraction)0/1
>>> /pipeline0/decodebin0.src0: caps = video/x-raw-yuv, format=(fourcc)I420,
>>> width=(int)640, height=(int)480, framerate=(fraction)0/1
>>> /pipeline0/decodebin0.src0.proxypad1: caps = video/x-raw-yuv,
>>> format=(fourcc)I420, width=(int)640, height=(int)480,
>>> framerate=(fraction)0/1
>>>
>>> (gst-launch-0.10:9349): GStreamer-CRITICAL **: gst_util_uint64_scale_int:
>>> assertion `denom > 0' failed
>>> /pipeline0/ffmpegcsp0.src: caps = video/x-raw-rgb, bpp=(int)32,
>>> depth=(int)24, endianness=(int)4321, red_mask=(int)65280,
>>> green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)640,
>>> height=(int)480, framerate=(fraction)0/1, pixel-aspect-ratio=(fraction)1/1
>>> /pipeline0/ffmpegcsp0.sink: caps = video/x-raw-yuv, format=(fourcc)I420,
>>> width=(int)640, height=(int)480, framerate=(fraction)0/1
>>> /pipeline0/videoscale0.src: caps = video/x-raw-rgb, bpp=(int)32,
>>> depth=(int)24, endianness=(int)4321, red_mask=(int)65280,
>>> green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)640,
>>> height=(int)480, framerate=(fraction)0/1, pixel-aspect-ratio=(fraction)1/1
>>> /pipeline0/videoscale0.sink: caps = video/x-raw-rgb, bpp=(int)32,
>>> depth=(int)24, endianness=(int)4321, red_mask=(int)65280,
>>> green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)640,
>>> height=(int)480, framerate=(fraction)0/1, pixel-aspect-ratio=(fraction)1/1
>>> /pipeline0/ximagesink0.sink: caps = video/x-raw-rgb, bpp=(int)32,
>>> depth=(int)24, endianness=(int)4321, red_mask=(int)65280,
>>> green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)640,
>>> height=(int)480, framerate=(fraction)0/1, pixel-aspect-ratio=(fraction)1/1
>>> Pipeline is PREROLLED ...
>>> Setting pipeline to PLAYING ...
>>> New clock: GstSystemClock
>>> Caught interrupt -- handling interrupt.
>>> Interrupt: Setting pipeline to PAUSED ...
>>> Execution ended after 8957877000 ns.
>>> Setting pipeline to PAUSED ...
>>> Setting pipeline to READY ...
>>> /pipeline0/ximagesink0.sink: caps = NULL
>>> /pipeline0/videoscale0.src: caps = NULL
>>> /pipeline0/videoscale0.sink: caps = NULL
>>> /pipeline0/ffmpegcsp0.src: caps = NULL
>>> /pipeline0/ffmpegcsp0.sink: caps = NULL
>>> /pipeline0/clockoverlay0.src: caps = NULL
>>> /pipeline0/clockoverlay0.video_sink: caps = NULL
>>> /pipeline0/decodebin0.src0: caps = NULL
>>> /pipeline0/decodebin0/jpegdec0.src: caps = NULL
>>> /pipeline0/decodebin0/jpegdec0.sink: caps = NULL
>>> /pipeline0/decodebin0/multipartdemux0.src_0: caps = NULL
>>> /pipeline0/decodebin0/multipartdemux0.sink: caps = NULL
>>> /pipeline0/decodebin0/typefind.src: caps = NULL
>>> Setting pipeline to NULL ...
>>> X connection to :0.0 broken (explicit kill or server shutdown).
>>>
>>> Is there a work around this, or a typical problem?
>>>
>>> Thank you.
>>>
>>> 2008/10/2 sudarshan bisht <bisht.sudarshan at gmail.com>
>>>
>>>  Hi Noe ,
>>>>
>>>>      Your problem is because clockoverlay element works on YUV 4:2:0
>>>> data ( see caps by doing gst-inspect clockoverlay ) that means it expects
>>>> YUV 4:2:0 data from previous element and sends YUV 4:2:0 data also to next
>>>> element .  But ximagesink works on RGB data thats why you can't connect
>>>> these tow elements .
>>>>    To solve this problem insert clockoverlay just after decodbin element
>>>> .
>>>>
>>>>
>>>>   On Thu, Oct 2, 2008 at 12:37 AM, Noe Nieto <tzicatl at gmail.com> wrote:
>>>>
>>>>>   Hi, I had posted this topic before but I am unsure if it reached the
>>>>> mailing list.
>>>>>
>>>>> I have an app that displays MJPEG Streams from webcam cameras that
>>>>> looks like the following:
>>>>>
>>>>> gst-launch-0.10 gnomevfssrc location="http://ip/image?speed=25" !
>>>>> decodebin ! ffmpegcolorspace ! videoscale ! ximagesink
>>>>> force-aspect-ratio="true"
>>>>>
>>>>> But when I add a clockoverlay element between the videoscale and
>>>>> ximagesink, the video gets frozen. Looks like it just displays the first
>>>>> frame.
>>>>>
>>>>> Can someone please, help me? What I am doing wrong.
>>>>>
>>>>> Noe Nieto.
>>>>>
>>>>>
>>>>> -------------------------------------------------------------------------
>>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>>> challenge
>>>>> Build the coolest Linux based applications with Moblin SDK & win great
>>>>> prizes
>>>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>>>> world
>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>>> _______________________________________________
>>>>> gstreamer-devel mailing list
>>>>> gstreamer-devel at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>>
>>>> Sudarshan Bisht
>>>>
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>> challenge
>>>> Build the coolest Linux based applications with Moblin SDK & win great
>>>> prizes
>>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>>> world
>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>>
>>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>
>>>
>>
>>
>> --
>> Regards,
>>
>> Sudarshan Bisht
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081024/0904e4b8/attachment.htm>


More information about the gstreamer-devel mailing list