Multi-Stream Decoding - 2023.2 English

H.264/H.265 Video Decode Unit Solutions LogiCORE IP Product Guide (PG414)

Document ID
PG414
Release Date
2024-03-29
Version
2023.2 English
Decoding with single instance
Decode the H.265 input file using four decoder elements simultaneously and saving them to separate files. It uses the single decoder instance i.e /dev/allegroDecodeIP0
gst-launch-1.0 filesrc location=input_1920x1080.mp4 ! qtdemux ! h265parse ! tee name=t
t. ! queue ! omxh265dec device="/dev/allegroDecodeIP0" ! queue max-size-bytes=0 ! filesink location="output_0_1920x1080.yuv"
t. ! queue ! omxh265dec device="/dev/allegroDecodeIP0" ! queue max-size-bytes=0 ! filesink location="output_1_1920x1080.yuv"
t. ! queue ! omxh265dec device="/dev/allegroDecodeIP0" ! queue max-size-bytes=0 ! filesink location="output_2_1920x1080.yuv"
t. ! queue ! omxh265dec ! queue max-size-bytes=0 ! filesink location="output_3_1920x1080.yuv"
Note: The tee element is used to feed same input file into four decoder channels; you can use separate gst-launch-1.0 application to feed different inputs as below.
gst-launch-1.0 filesrc location=input_0_1920x1080.mp4 ! qtdemux ! h265parse ! omxh265dec device="/dev/allegroDecodeIP0" ! queue max-size-bytes=0 ! filesink location="output_0_1920x1080.yuv" &
gst-launch-1.0 filesrc location=input_1_1920x1080.mp4 ! qtdemux ! h265parse ! omxh265dec device="/dev/allegroDecodeIP0" ! queue max-size-bytes=0 ! filesink location="output_1_1920x1080.yuv" &
gst-launch-1.0 filesrc location=input_2_1920x1080.mp4 ! qtdemux ! h265parse ! omxh265dec device="/dev/allegroDecodeIP0" ! queue max-size-bytes=0 ! filesink location="output_2_1920x1080.yuv" &
gst-launch-1.0 filesrc location=input_3_1920x1080.mp4 ! qtdemux ! h265parse ! omxh265dec device="/dev/allegroDecodeIP0" ! queue max-size-bytes=0 ! filesink location="output_3_1920x1080.yuv" &
Decoding with multi decoder instances
Below example shows how to decode multiple encoded streams on different decoder instances.
gst-launch-1.0 filesrc location=input_0_1920x1080.mp4 ! qtdemux ! h265parse ! omxh265dec device="/dev/allegroDecodeIP0" ! queue max-size-bytes=0 ! filesink location="output_0_1920x1080.yuv" &
gst-launch-1.0 filesrc location=input_1_1920x1080.mp4 ! qtdemux ! h265parse ! omxh265dec device="/dev/allegroDecodeIP1" ! queue max-size-bytes=0 ! filesink location="output_1_1920x1080.yuv" &
gst-launch-1.0 filesrc location=input_2_1920x1080.mp4 ! qtdemux ! h265parse ! omxh265dec device="/dev/allegroDecodeIP2" ! queue max-size-bytes=0 ! filesink location="output_2_1920x1080.yuv" &
gst-launch-1.0 filesrc location=input_3_1920x1080.mp4 ! qtdemux ! h265parse ! omxh265dec device="/dev/allegroDecodeIP3" ! queue max-size-bytes=0 ! filesink location="output_3_1920x1080.yuv" &