i.MX8 - Multimedia - Gstreamer Support - Pipeline Examples
IMPORTANT NOTES:
|
|
Pipelines
Audio decoding
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! mpegaudioparse ! beepdec ! alsasink
H.264 encoding
gst-launch-1.0 -v -e videotestsrc is-live=true ! queue ! x264enc ! mp4mux ! filesink location=test.avi
gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! queue ! x264enc ! mp4mux ! filesink location=test.mp4
gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! queue ! x264enc ! matroskamux ! filesink location=test.mkv
H.264 decoding
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! qtdemux ! h264parse ! queue ! avdec_h264 ! waylandsink async=false enable-last-sample=false qos=false sync=false
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! qtdemux ! h264parse ! queue ! vpudec ! waylandsink async=false enable-last-sample=false qos=false sync=false
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! qtdemux ! h264parse ! queue ! vpudec ! glimagesink async=false enable-last-sample=false qos=false sync=false
4K@30fps
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! qtdemux ! h264parse ! queue ! vpudec ! perf !fakesink INFO: Timestamp: 0:14:16.028816321; Bps: 14078789; fps: 28.12; CPU: 1; INFO Timestamp: 0:14:17.068262062; Bps: 13970386; fps: 26.94; CPU: 1; INFO: Timestamp: 0:14:18.116462637; Bps: 13850412; fps: 26.71; CPU: 1; INFO: Timestamp: 0:14:19.116470306; Bps: 14515232; fps: 27.0; CPU: 2; INFO: Timestamp: 0:14:20.166649109; Bps: 13824030; fps: 26.66; CPU: 7; INFO: Timestamp: 0:14:21.216295201; Bps: 13837208; fps: 25.73; CPU: 6; INFO: Timestamp: 0:14:22.216333789; Bps: 14515232; fps: 25.0; CPU: 1; INFO: Timestamp: 0:14:23.233240762; Bps: 14286645; fps: 23.62; CPU: 3; INFO: Timestamp: 0:14:24.249738271; Bps: 14286645; fps: 25.59; CPU: 1; INFO: Timestamp: 0:14:25.282993761; Bps: 14051531; fps: 26.13; CPU: 1;
H.265 decoding
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! qtdemux ! h265parse ! queue ! avdec_h265 ! xvimagesink async=false enable-last-sample=false qos=false sync=false
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! qtdemux ! h265parse ! queue ! vpudec ! waylandsink async=false enable-last-sample=false qos=false sync=false
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! qtdemux ! h265parse ! queue ! vpudec ! glimagesink async=false enable-last-sample=false qos=false sync=false
4K@60fps
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! qtdemux ! h265parse ! queue ! vpudec ! perf ! fakesink INFO: Timestamp: 0:14:16.028816321; Bps: 14078789; fps: 58.15; CPU: 1; INFO Timestamp: 0:14:17.068262062; Bps: 13970386; fps: 56.34; CPU: 1; INFO: Timestamp: 0:14:18.116462637; Bps: 13850412; fps: 60.01; CPU: 1; INFO: Timestamp: 0:14:19.116470306; Bps: 14515232; fps: 57.0; CPU: 2; INFO: Timestamp: 0:14:20.166649109; Bps: 13824030; fps: 58.66; CPU: 7; INFO: Timestamp: 0:14:21.216295201; Bps: 13837208; fps: 55.73; CPU: 6; INFO: Timestamp: 0:14:22.216333789; Bps: 14515232; fps: 59.10; CPU: 1; INFO: Timestamp: 0:14:23.233240762; Bps: 14286645; fps: 58.18; CPU: 3; INFO:
VP8 decoding
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! matroskademux ! queue ! vpudec ! waylandsink async=false enable-last-sample=false qos=false sync=false
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! matroskademux ! queue ! vpudec ! glimagesink async=false enable-last-sample=false qos=false sync=false
4K@30fps
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! matroskademux ! queue ! vpudec ! perf ! fakesink INFO: Timestamp: 0:16:53.306795985; Bps: 12209632; fps: 29.44; CPU: 1; INFO: Timestamp: 0:16:54.327020574; Bps: 12197662; fps: 29.41; CPU: 1; INFO: Timestamp: 0:16:55.346495858; Bps: 12209632; fps: 29.44; CPU: 2; INFO: Timestamp: 0:16:56.365888936; Bps: 12209632; fps: 29.44; CPU: 1; INFO: Timestamp: 0:16:57.388490297; Bps: 12173792; fps: 29.35; CPU: 7; INFO: Timestamp: 0:16:58.410389515; Bps: 12185715; fps: 29.38; CPU: 3; INFO: Timestamp: 0:16:59.428182337; Bps: 12233644; fps: 29.49; CPU: 0; INFO: Timestamp: 0:17:00.446827898; Bps: 12221626; fps: 29.46; CPU: 0; INFO: Timestamp: 0:17:01.463513441; Bps: 12245685; fps: 29.52; CPU: 0;
VP9 decoding
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! matroskademux ! queue ! vpudec ! waylandsink async=false enable-last-sample=false qos=false sync=false
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! matroskademux ! queue ! vpudec ! glimagesink async=false enable-last-sample=false qos=false sync=false
4K@60fps
gst-launch-1.0 -v filesrc location=<PATH-TO_FILE> ! matroskademux ! queue ! vpudec ! perf ! fakesink INFO: Timestamp: 0:10:31.988890201; Bps: 12306231; fps: 58.35; CPU: 2; INFO: Timestamp: 0:10:32.988896941; Bps: 12441600; fps: 60.0; CPU: 2; INFO: Timestamp: 0:10:33.988913562; Bps: 12441600; fps: 60.0; CPU: 2; INFO: Timestamp: 0:10:34.988933342; Bps: 12441600; fps: 60.0; CPU: 1; INFO: Timestamp: 0:10:35.988939363; Bps: 12441600; fps: 60.0; CPU: 3; INFO: Timestamp: 0:10:36.989033989; Bps: 12441600; fps: 60.0; CPU: 2; INFO: Timestamp: 0:10:37.989048013; Bps: 12441600; fps: 60.0; CPU: 2; INFO: Timestamp: 0:10:39.005693367; Bps: 12245669; fps: 60.3; CPU: 1;
Display video stream
gst-launch-1.0 -v videotestsrc is-live=true ! glimagesink async=false enable-last-sample=false qos=false sync=false
gst-launch-1.0 -v v4l2src device=/dev/video0 ! glimagesink async=false enable-last-sample=false qos=false sync=false
OpenGL (ES) stream processing
gst-launch-1.0 -v videotestsrc is-live=true ! glupload ! glcolorbalance contrast=1.5 hue=-1 saturation=1.6 brightness=0.5 ! glcolorconvert ! gldownload ! glimagesink async=false enable-last-sample=false qos=false sync=false
See also