Gstreamer based Multiple bit rate hardware encoding

Nicolas Dufresne nicolas at ndufresne.ca
Fri Jan 13 00:50:59 UTC 2017


Le jeudi 12 janvier 2017 à 15:25 -0800, ilyani a écrit :
> I want to take an input video file from my hard drive and want to
> encode it into 3 different bit rates H264 streams and then mux all
> these into one file. Is it possible to use Gstreamer for this purpose
> or not any working commandline example is highly appriciated

Sure, here's an example:

gst-launch-1.0 \
  filesrc location=input.mov ! decodebin3 ! video/x-raw ! tee name=t \
    t. ! queue ! x264enc bitrate=1000 ! mux. \
    t. ! queue ! x264enc bitrate=2000 ! mux. \
    t. ! queue ! x264enc bitrate=5000 ! mux. \
  qtmux name=mux ! filesink location=output.mov

So first step it decodes the input stream, I use the brand new
decodebin3 but just decodebin should do. Then tee is used to multiply
the decoded stream. Then we create the right number of encoder with the
appropriate settings, and finally, we mux it back together.

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170112/6e09fdef/attachment.sig>


More information about the gstreamer-devel mailing list