<div dir="ltr"><div>Hi,<br><br></div><div>I have a pipeline in a C application which I've noticed doesn't work smoothly with more than one camera.<br><br></div><div>Currently I'm using two Logitech C920 cameras (with hardware H264 encoding) in a pipeline which has these branches from the two cameras:<br>
<br></div><div>v4l2src--->queue--->capsfilter--->h264parse--->tee---><br><br></div><div>v4l2src--->queue--->capsfilter--->h264parse--->tee---><br><br></div><div>After the tees, there are these two branches:<br>
<br></div><div>--->queue--->rtph264pay--->udpsink<br></div><div><br></div><div>--->matroskamux--->queue--->filesink<br><br></div><div>Each tee feeds into the matroskamux branch, which creates a file with (in this case) two video streams. Only one of the tees is linked to the network streaming branch at a time (the user can switch the linked tee when the application runs).<br>
<br></div><div>What I notice is that the program runs fine, and terminates fine when the user forces an EOS, but the received video (from over the network, currently just to 127.0.0.1) has quite a lot of artifacts.<br><br>
When I open the resulting MKV file (with VLC) the two video streams are displayed. However, there are similar artifacts to those seen when displaying the video live from UDP/RTP. The video also hangs for a few frames periodically, maybe once every couple of seconds. Finally, the timing is also wrong for the MKV.<br>
<br>For example, in a 47 second video, VLC kept track of the current time correctly up until 8 seconds in. Then the time displayed by VLC got stuck at 48 seconds(!) while the progress bar for the video continued to show the correct stream position right up until the video ended after 47 seconds.<br>
<br></div><div>None of these problems happen with either the RTP stream or the MKV file when only one camera is connected and used. (Well, the MKV playback getting stuck on the same frame every few seconds still happens, but that's the least of my problems).<br>
<br></div><div>Does anyone have any ideas what could be wrong? I thought it could be something to do with not having enough threads, which I've read can be a problem with a branching pipeline, but each branch has a queue element so I don't know what else to do.<br>
</div></div>