[Gambas-user] Fwd: gb.media v4l2 mediaplayer webcam image choopy
Sorin Alecu
alecusorin at ...626...
Thu May 15 14:31:35 CEST 2014
Mr.Benoit,
As i say, I've use your code from MTest.module from your Media example
which is in fact the same thing in gb.media ( using mediapipeline instead
of mediaplayer ) that is in the gstreamer code " gst-launch -e v4l2src
device =/dev/video0 ! 'video/x-raw-yuv,width=640,height=480,framerate=30/1'
! xvimagesink " and the webcam it ok.
My project is to see permanently the webcam image on the screen and capture
some frame and saving on the disk at 10s pause.
Using the mediaplayer I can do this very easly, because this control, once
the pipeline is open, have a proprety mediaplayer.video.image that make the
capture job.
Using Mediapipeline (which don't have this proprety) I have to close and
open (play) the pipeline in order to give the control to gstreamer capture
command (using multifilesink, bla,bla..). Otherwise i'll have a busy device.
I've tried this, work fine but after few ( 16 ) close/open (play) cycles of
mediapipeline I've loose the image on the screen and I've receive the
message, I think from xvimagesink:
"Could not initialise the xv output"
The frame saving proccess still working but no video image on the screen.
Any help?
Sorin
2014-05-15 14:34 GMT+03:00 Benoît Minisini <gambas at ...1...>:
> Le 15/05/2014 13:20, Benoît Minisini a écrit :
> >
> >
> >
> > -------- Message original --------
> > Sujet: gb.media v4l2 mediaplayer webcam image choopy
> > Date : Thu, 15 May 2014 14:10:36 +0300
> > De : Sorin Alecu <alecusorin at ...626...>
> > Pour : gambas at ...1...
> >
> >
> >
> > Hi everyone,
> > I'm using gambas3 gb.media mediaplayer control mainly with these
> > instructions:
> >
> > $hPlayer = New Mediaplayer
> > $hPlayer.url = "v4l2:///dev/video0"
> > hSink = New MediaControl($hPlayer, "xvimagesink")
> > $hPlayer.video.output= hsink
> > try $hPlayer.play
> >
> > which is something similar whit what Mr.Benoit use in the Media 3.4.90
> > code example, in order to see a webcam image.
> >
> > But the image is choppy, not fluent, the image is changed with around 1
> > second pause.
> >
>
> MediaPlayer builds its own pipeline, but it does what he wants...
>
> > If i'll use
> > Shell "gst-launch -e v4l2src device =/dev/video0 !
> > 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! xvimagesink"
> >
> > everything it ok.
>
> You can mimic this pipeline with gb.media and see if then it works.
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list