Multiple H264 cameras to MKV (GST1.1.2)
Tim-Philipp Müller
t.i.m at zen.co.uk
Sun Sep 8 11:17:09 PDT 2013
On Sun, 2013-09-08 at 21:24 +1200, Adam Goodwin wrote:
Hi Adam,
> I have a pipeline in a C application which I've noticed doesn't work
> smoothly with more than one camera.
>
>
> Currently I'm using two Logitech C920 cameras (with hardware H264
> encoding) in a pipeline which has these branches from the two cameras:
>
>
> v4l2src--->queue--->capsfilter--->h264parse--->tee--->
>
>
> v4l2src--->queue--->capsfilter--->h264parse--->tee--->
>
>
> After the tees, there are these two branches:
>
>
> --->queue--->rtph264pay--->udpsink
>
>
>
> --->matroskamux--->queue--->filesink
>
>
> 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).
>
>
> 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.
>
> 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.
>
> 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.
>
>
> 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).
>
>
> 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.
Maybe it's related to
https://bugzilla.gnome.org/show_bug.cgi?id=706083
only that running it with two cameras increases the chances of it
happening?
Cheers
-Tim
More information about the gstreamer-devel
mailing list