Gstreamer based Multiple bit rate hardware encoding

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

Gstreamer based Multiple bit rate hardware encoding

ilyani
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

Ilyani
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer based Multiple bit rate hardware encoding

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

signature.asc (188 bytes) Download Attachment