Encode the input YUV file into eight streams by using eight encoder elements simultaneously.
gst-launch-1.0 filesrc location=input_nv12_1920x1080.yuv ! rawvideoparse width=1920 height=1080 format=nv12 framerate=30/1 ! tee name=t
t. ! queue ! omxh264enc control-rate=2 target-bitrate=8000 ! video/x-h264,
profile=high ! filesink location="ouput_0.h264"
t. ! queue ! omxh264enc control-rate=2 target-bitrate=8000 ! video/x-h264,
profile=high ! filesink location="ouput_1.h264"
t. ! queue ! omxh264enc control-rate=2 target-bitrate=8000 ! video/x-h264,
profile=high ! filesink location="ouput_2.h264"
t. ! queue ! omxh264enc control-rate=2 target-bitrate=8000 ! video/x-h264,
profile=high ! filesink location="ouput_3.h264"
t. ! queue ! omxh264enc control-rate=2 target-bitrate=8000 ! video/x-h264,
profile=high ! filesink location="ouput_4.h264"
t. ! queue ! omxh264enc control-rate=2 target-bitrate=8000 ! video/x-h264,
profile=high ! filesink location="ouput_5.h264"
t. ! queue ! omxh264enc control-rate=2 target-bitrate=8000 ! video/x-h264,
profile=high ! filesink location="ouput_6.h264"
t. ! queue ! omxh264enc control-rate=2 target-bitrate=8000 ! video/x-h264,
profile=high ! filesink location="ouput_7.h264"
Note: The tee element is used to feed the same input file into eight encoder instances. You can separate the gst-launch-1.0 application to be fed with different inputs.
For alternate input YUV formats, the following changes are required in the above pipeline:
Format/Profile | Arguments |
---|---|
4:2:2 8-bit (NV16) | format=nv16 profile=high-4:2:2 |
4:2:0 10-bit (NV12_10LE32) | format=nv12-10le32 profile=high-10 |
4:2:2 10-bit (NV16_10LE32) | format=nv16-10le32 profile=high-4:2:2 |
4:0:0 8-bit (GRAY8) | Not supported |
4:0:0 10-bit (GRAY10_LE32) | Not supported |