Transcode question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Transcode question

William Salibrici

My development machine is windows 7 and I’m using GStreamer 1.10.4 with your windows pre-built binaries.

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.

Is there any way to tell the pipeline to process the data as fast as possible, i.e. non-real time? The difficulty with this question is the fact that I want the resultant mp4 recording to have a frame rate of 30 frames per second. 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.

I suspect that transcode speedup is not possible within the context of my I/O requirements. I figured it is worth the effort to ask the question and get input from the experts in case I missed something.

Thanks so much for your help,

Bill

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Transcode question

Tim Müller
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/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Transcode question

William Salibrici
Hi Tim,
Thank you for your reply.
After review of my pipeline I noticed that the output filesink had sync=true.
I removed this and observed a speedup factor of about 13!
The resultant output file plays back at the correct framerate too.

Cheers,
-Bill

 Bill Salibrici   Lattice Incorporated   http://www.latticeinc.com/


-----Original Message-----
From: gstreamer-devel [mailto:[hidden email]] On Behalf Of Tim Müller
Sent: Monday, October 09, 2017 3:16 PM
To: [hidden email]
Subject: Re: Transcode question

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/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel