How to keep multiple input sources in sync?

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

How to keep multiple input sources in sync?

Francis Rammeloo
I have a pipeline that combines three incoming streams (webcam, desktop capture, and a logo) into one movie using the videomixer plugin. I created the pipeline in text and load it into my program with gst_parse_launch. The pipeline description looks like this:


      desktop. ! queue   
               ! ffmpegcolorspace
               ! videoscale
               ! video/x-raw-yuv,width=640,height=400
               ! videobox right=-320
               ! ffmpegcolorspace
               ! vmix.sink_0
      webcam. ! queue
              ! ffmpegcolorspace
              ! videoscale
              ! video/x-raw-yuv,width=320,height=240
              ! vmix.sink_1
      logo. ! queue
            ! jpegdec
            ! ffmpegcolorspace
            ! videoscale
            ! video/x-raw-yuv,width=320,height=160
            ! vmix.sink_2
      vmix. ! queue 
            ! ffmpegcolorspace
            ! dshowvideosink
      dx9screencapsrc name="desktop"
      ksvideosrc device-name="Built-in iSight" name="webcam"
      multifilesrc name="logo" location="chrome/skin/ivpv.jpg"
      videomixer name=vmix
                 sink_0::xpos=0 sink_0::ypos=0 sink_0::zorder=0
                 sink_1::xpos=640 sink_1::ypos=0 sink_1::zorder=1
                 sink_2::xpos=640 sink_2::ypos=240 sink_2::zorder=2

The pipeline is playable, but the webcam is terribly out of sync. The desktop capture is fine. If I leave out the desktop capture element and only combine the webcam and the logo image then it's also fine. It seems that only the combination of the desktop and webcam capture is problematic.

Any idea on how I should fix this?

Francis


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to keep multiple input sources in sync?

Stefan Sauer
Am 06.01.2010 15:42, schrieb Francis Rammeloo:

> I have a pipeline that combines three incoming streams (webcam, desktop
> capture, and a logo) into one movie using the videomixer plugin. I
> created the pipeline in text and load it into my program with
> gst_parse_launch. The pipeline description looks like this:
>
>
>       desktop. ! queue  
>                ! ffmpegcolorspace
>                ! videoscale
>                ! video/x-raw-yuv,width=640,height=400
>                ! videobox right=-320
>                ! ffmpegcolorspace
>                ! vmix.sink_0
>       webcam. ! queue
>               ! ffmpegcolorspace
>               ! videoscale
>               ! video/x-raw-yuv,width=320,height=240
>               ! vmix.sink_1
>       logo. ! queue
>             ! jpegdec
>             ! ffmpegcolorspace
>             ! videoscale
>             ! video/x-raw-yuv,width=320,height=160
>             ! vmix.sink_2
>       vmix. ! queue
>             ! ffmpegcolorspace
>             ! dshowvideosink
>       dx9screencapsrc name="desktop"
>       ksvideosrc device-name="Built-in iSight" name="webcam"
>       multifilesrc name="logo" location="chrome/skin/ivpv.jpg"
>       videomixer name=vmix
>                  sink_0::xpos=0 sink_0::ypos=0 sink_0::zorder=0
>                  sink_1::xpos=640 sink_1::ypos=0 sink_1::zorder=1
>                  sink_2::xpos=640 sink_2::ypos=240 sink_2::zorder=2
>
> The pipeline is playable, but the webcam is terribly out of sync. The
> desktop capture is fine. If I leave out the desktop capture element and
> only combine the webcam and the logo image then it's also fine. It seems
> that only the combination of the desktop and webcam capture is problematic.
>
> Any idea on how I should fix this?


Can you try adding capsfilters to each videobranch before the videomixer and set
a common framerate there. This might require the use of videorate infront of the
capsfilters.

stefan

>
> Francis
>
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel