gst-launch hangs after displaying first frame

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

gst-launch hangs after displaying first frame

John Buckley
Hello,
I seem to be having a pretty common problem.
My gst-launch command executes and starts the pipeline properly with no errors.  Then displays a single frame and the video freezes.  There are no errors and it appears that the pipeline is still running.  Ctrl-C pauses the pipeline properly and then everything cleans up nicely.

I read on this mailing list that the jpegdec element only decodes one frame and that I should use the ffdec_mjpeg element.  So I did.  Same problem.  According to that same mail thread this is not true and the individual was able to eventually get his streaming working using jpegdec.

So, I am stuck.  These are the commands that I have tried with a couple of slight variations.  Does anyone have any ideas?

gst-launch v4l2src ! image/jpeg,width=320,framerate=30/1,rate=30 ! jpegdec ! ffmpegcolorspace ! ximagesink
gst-launch v4l2src ! image/jpeg,width=320,framerate=30/1,rate=30 ! ffdec_mjpeg ! ffmpegcolorspace ! ximagesink

Thanks,
John Buckley
Reply | Threaded
Open this post in threaded view
|

Re: gst-launch hangs after displaying first frame

John Buckley
Attached is the output of my gst-launch command with decodebin2...

root@gumstix-custom-verdex:~# gst-launch v4l2src ! decodebin2 ! ffmpegcolorspace ! ximagesink -v
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)15/1
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:src: caps = image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:sink: caps = image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstGhostPad:sink: caps = image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstGhostPad:sink.GstProxyPad:proxypad0: caps = image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstJpegDec:jpegdec0.GstPad:sink: caps = image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstDecodePad:src0: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstJpegDec:jpegdec0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps = video/x-raw-rgb, bpp=(int)16, depth=(int)16, endianness=(int)1234, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)640, height=(int)480, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstDecodePad:src0.GstProxyPad:proxypad2: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, framerate=(fraction)15/1
/GstPipeline:pipeline0/GstXImageSink:ximagesink0.GstPad:sink: caps = video/x-raw-rgb, bpp=(int)16, depth=(int)16, endianness=(int)1234, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)640, height=(int)480, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1

...eventually <ctrl>-c

Caught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 5261348824 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstXImageSink:ximagesink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstDecodePad:src0: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstJpegDec:jpegdec0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstJpegDec:jpegdec0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstGhostPad:sink: caps = NULL
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
root@gumstix-custom-verdex:~#
Reply | Threaded
Open this post in threaded view
|

Re: gst-launch hangs after displaying first frame

Kapil Agrawal
In reply to this post by John Buckley
John,

For me it work perfectly.
Please try following things

1) gst-launch v4l2src ! image/jpeg,width=320,
framerate=30/1,rate=30 !
ffdec_mjpeg ! ffmpegcolorspace ! ximagesink sync=false
To know its not because of sink dropping

2) try with videotestsrc ! jpegenc , instead of v4l2src

3) if your cam also outputs yuv/rgb try without capsfilter and decoder

4) If non of above gives any clue run with GST_DEBUG

thanks
regards
kapil 


On Fri, Nov 6, 2009 at 10:40 AM, John Buckley <[hidden email]> wrote:

Hello,
I seem to be having a pretty common problem.
My gst-launch command executes and starts the pipeline properly with no
errors.  Then displays a single frame and the video freezes.  There are no
errors and it appears that the pipeline is still running.  Ctrl-C pauses the
pipeline properly and then everything cleans up nicely.

I read on this mailing list that the jpegdec element only decodes one frame
and that I should use the ffdec_mjpeg element.  So I did.  Same problem.
According to that same mail thread this is not true and the individual was
able to eventually get his streaming working using jpegdec.

So, I am stuck.  These are the commands that I have tried with a couple of
slight variations.  Does anyone have any ideas?

gst-launch v4l2src ! image/jpeg,width=320,framerate=30/1,rate=30 ! jpegdec !
ffmpegcolorspace ! ximagesink
gst-launch v4l2src ! image/jpeg,width=320,framerate=30/1,rate=30 !
ffdec_mjpeg ! ffmpegcolorspace ! ximagesink

Thanks,
John Buckley
--
View this message in context: http://old.nabble.com/gst-launch-hangs-after-displaying-first-frame-tp26226559p26226559.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
http://www.linkedin.com/in/kapilagrawal

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst-launch hangs after displaying first frame

Stefan Sauer
In reply to this post by John Buckley
John Buckley schrieb:

> Hello,
> I seem to be having a pretty common problem.
> My gst-launch command executes and starts the pipeline properly with no
> errors.  Then displays a single frame and the video freezes.  There are no
> errors and it appears that the pipeline is still running.  Ctrl-C pauses the
> pipeline properly and then everything cleans up nicely.
>
> I read on this mailing list that the jpegdec element only decodes one frame
> and that I should use the ffdec_mjpeg element.  So I did.  Same problem.
> According to that same mail thread this is not true and the individual was
> able to eventually get his streaming working using jpegdec.
>
> So, I am stuck.  These are the commands that I have tried with a couple of
> slight variations.  Does anyone have any ideas?
>
> gst-launch v4l2src ! image/jpeg,width=320,framerate=30/1,rate=30 ! jpegdec !
> ffmpegcolorspace ! ximagesink
> gst-launch v4l2src ! image/jpeg,width=320,framerate=30/1,rate=30 !
> ffdec_mjpeg ! ffmpegcolorspace ! ximagesink
>
> Thanks,
> John Buckley
>  
rate=30 is nonsense, also framerate=30/1should be written as
framerate=\(fraction\)30/1
if that does not help, try GST_DEBUG="v4l2src:4" gst-launch ...

Stefan

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst-launch hangs after displaying first frame

John Buckley

Stefan Kost wrote
rate=30 is nonsense, also framerate=30/1should be written as
framerate=\(fraction\)30/1
if that does not help, try GST_DEBUG="v4l2src:4" gst-launch ...

Stefan
Excellent.  I removed the rate=30 nonsense and used the type cast \(fraction\) and it seems to work.
It seems to work most of the time now when I use gst-launch from the command line.
The video appears to be running pretty fast but there's a large delay on the order of 0.5sec in the video stream on the LCD of my gumstix target board.
But I am getting a steady video stream and that is great news!!!

My gst-launch command looks like this:
# gst-launch v4l2src ! image/jpeg,width=320,framerate=\(fraction\)30/1 ! jpegdec ! ffmpegcolorspace ! ximagesink sync=false

John Buckley
Reply | Threaded
Open this post in threaded view
|

Re: gst-launch hangs after displaying first frame

John Buckley

John Buckley wrote
Excellent.  I removed the rate=30 nonsense and used the type cast \(fraction\) and it seems to work.
It seems to work most of the time now when I use gst-launch from the command line.
The video appears to be running pretty fast but there's a large delay on the order of 0.5sec in the video stream on the LCD of my gumstix target board.
But I am getting a steady video stream and that is great news!!!

My gst-launch command looks like this:
# gst-launch v4l2src ! image/jpeg,width=320,framerate=\(fraction\)30/1 ! jpegdec ! ffmpegcolorspace ! ximagesink sync=false

John Buckley
Okay, I've verified that it is the  "ximagesink sync=false" command that is allowing the video to stream properly.
-John
Reply | Threaded
Open this post in threaded view
|

Gstreamer file source for Live stream from net

Shivaprasad P
In reply to this post by Stefan Sauer

Which gstreamer element shall handle the live stream from
network/internet based source?
The information contained in this e-mail message and in any
attachments/annexure/appendices is confidential to the
recipient and may contain privileged information.
If you are not the intended recipient, please notify the
sender and delete the message along with any
attachments/annexure/appendices. You should not disclose,
copy or otherwise use the information contained in the
message or any annexure. Any views expressed in this e-mail
are those of the individual sender except where the sender
specifically states them to be the views of
Toshiba Embedded Software India Pvt. Ltd. (TESI),Bangalore.

Although this transmission and any attachments are believed to be
free of any virus or other defect that might affect any computer
system into which it is received and opened, it is the responsibility
of the recipient to ensure that it is virus free and no responsibility
is accepted by Toshiba Embedded Software India Pvt. Ltd, for any loss or
damage arising in any way from its use.




------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer file source for Live stream from net

Florent THIERY-2
Hi

> Which gstreamer element shall handle the live stream from
> network/internet based source?

Depends on the protocol you're looking at, but generally see playbin2
which handles uris automatically (rtsp, http, ...).

Florent

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel