lidedongsn
lidedongsn

Reputation: 135

How to play two videos at the same time with gstreamer?

I want to play two videos at the same time with gstreamer.But I have no idea with it.I use playbin2 as the pipeline,xvimagesink as the sink element.Now I want this pipeline to play two videos.Any solutions?

Upvotes: 2

Views: 2284

Answers (3)

Sam
Sam

Reputation: 179

gst-launch-1.0 videotestsrc ! video/x-raw,width=160,height=120 ! m.sink_0 \ videotestsrc ! video/x-raw,width=160,height=120 ! m.sink_1 \ videomixer name=m sink_1::xpos=160 ! video/x-raw,width=320,height=120 ! xvimagesink

Upvotes: 2

For playing two videos you can use videomixer and videobox components. Advantage of these components is , both of the two videos will be played in a single window.

Or

You can use two sinks for those two videos, then those will be played in two different windows.

Upvotes: 0

thiagoss
thiagoss

Reputation: 2094

You can't do that with playbin2, either use multiple playbin2 or create your own pipeline with multiple uridecodebin and link that to multiple sinks.

Also, gstreamer 0.10 is obsolete. Please move to the latest 1.0 version (currently 1.2.4)

Upvotes: 0

Related Questions