Decode AVC or HEVC file and display it on the monitor connected to the display port:
gst-launch-1.0 filesrc location=in.mp4 ! qtdemux name=demux demux.video_0 ! h264parse ! omxh264dec ! queue max-size-bytes=0 ! kmssink bus-id=fd4a0000.display fullscreen-overlay=1
gst-launch-1.0 filesrc location=in.mp4 ! qtdemux name=demux demux.video_0 ! h265parse ! omxh265dec ! queue max-size-bytes=0 ! kmssink bus-id=fd4a0000.display fullscreen-overlay=1
To smooth out high bitstreams (>100 Mb/s), when additional delay is
introduced:
- Increase the number of internal decode buffers to 9 or 10, using property internal-entropy-buffers.
- Add a queue at the decoder
input
gst-launch-1.0 filesrc location=in.mp4 ! qtdemux name=demux demux.video_0 ! h264parse ! queue max-size-bytes=0 ! omxh264dec internal-entropy-buffers=10 ! queue max-size-bytes=0 ! kmssink bus-id=fd4a0000.display fullscreen-overlay=1
Encoding a 3840x2160 4:2:0 8-bit (NV12) YUV file for AVC,
HEVC:
gst-launch-1.0 filesrc location=in.yuv ! rawvideoparse format=nv12 width=3840 height=2160 framerate=30/1 ! omxh264enc ! filesink location=out.h264
gst-launch-1.0 filesrc location=in.yuv ! rawvideoparse format=nv12 width=3840 height=2160 framerate=30/1 ! omxh265enc ! filesink location=out.h265
Encode a 3840×2160 4:2:2 8-bit (NV16) YUV file to AVC,
HEVC:
gst-launch-1.0 filesrc location=in.yuv ! rawvideoparse format=nv16 width=3840 height=2160 framerate=30/1 ! omxh264enc ! filesink location=out.h264
gst-launch-1.0 filesrc location=in.yuv ! rawvideoparse format=nv16 width=3840 height=2160 framerate=30/1 ! omxh265enc ! filesink location=out.h265
Transcode AVC to HEVC (followed by HEVC to
AVC):
gst-launch-1.0 filesrc location=in.mp4 ! qtdemux name=demux demux.video_0 ! h264parse ! video/x-h264, alignment=au ! omxh264dec low-latency=0 ! omxh265enc ! video/x-h265, alignment=au ! filesink location=out.h265
gst-launch-1.0 filesrc location=in.mp4 ! qtdemux name=demux demux.video_0 ! h265parse ! video/x-h265, alignment=au ! omxh265dec low-latency=0 ! omxh264enc ! video/x-h264, alignment=au ! filesink location=out.h264
Transcode JPEG to
HEVCgst-launch-1.0 multifilesrc location=in.jpeg caps="image/jpeg,framerate=60/1" stop-index=0 ! jpegparse ! omxmjpegdec ! omxh265enc ! filesink location=out.h265