Transcode question
Tim Müller
tim at centricular.com
Mon Oct 9 19:15:47 UTC 2017
Hi William,
> I have a transcode pipeline [not shown here] that
> takes 2 avi movie files as input and combines them into a single mp4
> recording with video side by side. They both were recorded with a
> frame rate of 30 frames per second. I use uridecodebin to demux the
> input recordings. I use the compositor and interleave elements to
> combine video and audio respectively.
>
> The pipeline runs without errors and the mp4 result plays out just
> fine. The problem is the overall transcode time for large input
> files. It appears that the pipeline runs in real time as though I
> were playing the files. For example, if I have one hour recordings as
> inputs, the total transcode time will be about an hour also.
What platform is this on? What decoder is used in your case?
In a plain transcoding pipeline with input from files and output to
file there should be nothing that syncs to the clock. Everything should
be processed as fast as possible. You could try adding a few queue
elements here and there, esp. before and after expensive elements such
as decoders and encoders, to force processing into different threads,
but the most likely cause of slow processing in your case is that the
decoders or encoders are slower than you want them to be. Try
configuring your video encoder to a more efficient mode of encoding
perhaps?
> I see from your documentation that the compositor output framerate
> will be determined by the framerate of the fastest incoming one. So
> it seems that I’m limited by the input recording framerate as well as
> the compositor output behavior.
If inputs come from a file, compositor will process data as fast as
possible. It won't wait or throttle processing to the configured
framerate. You can also force compositor to use a certain output
framerate by putting a capsfilter with the desired output framerate
after it, e.g.:
... ! compositor ! video/x-raw,framerate=30/1 ! ...
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/
More information about the gstreamer-devel
mailing list