Can't switch video streams

I have two identical streams created from two different cameras.

pipeline_create src1 v4l2src device=/dev/cam1 ! image/jpeg, width=(int)1280,height=(int)720, framerate=(fraction)30/1 ! jpegdec ! queue ! omxh264enc ! interpipesink name=cam1

pipeline_create src3 v4l2src device=/dev/cam3 ! image/jpeg, width=(int)1280,height=(int)720, framerate=(fraction)30/1 ! jpegdec ! queue ! omxh264enc ! interpipesink name=cam3

And then one more pipeline that lets me switch between them.

pipeline_create stream1 interpipesrc name=switch listen-to=cam1 block=true is-live=true allow-renegotiation=true stream-sync=compensate-ts ! h264parse ! blah blah… this part isn’t critical

When I play this then the camera I start with works. So I can view the output from cam1 in the above example since stream1 starts with it in the interpipesrc. But if I try to switch to the other stream than it doesn’t work. I was trying to find ways to debug it but idk how to get export GST_DEBUG=4 to work with gst-client. Doesn’t do anything.

Any help apprecieated

I figured it out. I needed to specify the format before the interpipesink. I geuss it negotiated the wrong format on the camera it didn’t start on.

1 Like