Skip to content

Instantly share code, notes, and snippets.

@matiaspl
Last active November 5, 2023 21:00
Show Gist options
  • Save matiaspl/23248eedc23b0890b8cadc59dc9a62c3 to your computer and use it in GitHub Desktop.
Save matiaspl/23248eedc23b0890b8cadc59dc9a62c3 to your computer and use it in GitHub Desktop.
gstreamer pipelines with Intel HW acceleration

TS: VAAPI H264 to H265 transcode with deinterlacing

gst-launch-1.0 --gst-debug=2 -ev mpegtsmux name="mux"
souphttpsrc location=http://stream/url ! parsebin ! queue ! vaapih264dec ! vaapipostproc deinterlace-mode=1 deinterlace-method=4 width=1280 height=720 ! vaapih265enc rate-control=vbr bitrate=2000 keyframe-period=50 max-bframes=0 quality-level=4 ! video/x-h265,stream-format=hvc1 ! queue ! h265parse config-interval=1 ! video/x-h265,alignment=au,stream-format=byte-stream ! mux. tcpserversink host=0.0.0.0 port=1234

TS: audio transcode

gst-launch-1.0 --gst-debug=2 -ev souphttpsrc location=http://stream/url ! tsparse ! tsdemux ! queue ! flump3dec ! audioconvert ! avenc_aac ! aacparse ! mpegtsmux ! tcpserversink host=0.0.0.0 port=1234

TS: audio remux

gst-launch-1.0 --gst-debug=2 -ev souphttpsrc location=http://stream/url ! tsparse ! tsdemux ! queue ! mpegaudioparse ! mpegtsmux ! tcpserversink host=0.0.0.0 port=1234

TS: audio remux+VAAPI H264 to H265 transcode with deinterlacing

gst-launch-1.0 --gst-debug=2 -ev souphttpsrc location=http://http://stream/url ! tsparse ! queue ! tsdemux name=dm dm. ! queue ! mpegaudioparse ! queue ! mpegtsmux name="mux" ! tcpserversink host=0.0.0.0 port=1234 dm. ! queue ! h264parse ! queue ! vaapih264dec ! vaapipostproc deinterlace-mode=1 deinterlace-method=4 width=1280 height=720 ! vaapih265enc rate-control=vbr bitrate=2000 keyframe-period=50 max-bframes=0 quality-level=5 ! video/x-h265,stream-format=hvc1 ! queue ! h265parse config-interval=1 ! video/x-h265,alignment=au,stream-format=byte-stream ! mux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment