Difference between revisions of "IMX8/Multimedia/Gstreamer Support/Pipeline Examples"

From RidgeRun Developer Connection
Jump to: navigation, search
m
m
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{IMX8/Head|previous=Multimedia/Gstreamer Support/Package Installation|next=Multimedia/RidgeRun Products|keywords=multimedia,Gstreamer,Gstreamer support,Gstreamer pipelines,Audio decoding pipeline, H.264 encoding pipeline,H.264 decoding pipeline,H.265 decoding pipeline,VP8 decoding pipeline,VP9 decoding,video stream display pipeline,OpenGL stream processing pipeline}}</noinclude>
+
<noinclude>{{IMX8/Head|previous=Multimedia/Gstreamer Support/Package Installation|next=Multimedia/Gstreamer_Support/Hardware-accelerated_plugins|metakeywords=multimedia,Gstreamer,Gstreamer support,Gstreamer pipelines,Audio decoding pipeline, H.264 encoding pipeline,H.264 decoding pipeline,H.265 decoding pipeline,VP8 decoding pipeline,VP9 decoding,video stream display pipeline,OpenGL stream processing pipeline}}</noinclude>
  
IMPORTANT NOTES:
+
'''IMPORTANT NOTES:'''
  
*NO SUPPORT FOR PLUGINS USING HW ENCODER ACCELERATORS YET.
+
{{Ambox
 +
|type=notice
 +
|small=left
 +
|issue=<pre style="background:#d6e4f1">NO SUPPORT FOR PLUGINS USING HW ENCODER ACCELERATORS YET.</pre>
 +
|style=width:unset;
 +
}}
  
<pre style="background:#ffad42">
+
{{Ambox
 +
|type=notice
 +
|small=left
 +
|issue=<pre style="background:#ffad42">
 
Pipelines in this frame color aren't HW accelerated
 
Pipelines in this frame color aren't HW accelerated
 
</pre>
 
</pre>
 +
|style=width:unset;
 +
}}
  
<pre style="background:#d6e4f1">
+
{{Ambox
 +
|type=notice
 +
|small=left
 +
|issue=<pre style="background:#d6e4f1">
 
Pipelines in this frame color are HW accelerated
 
Pipelines in this frame color are HW accelerated
 
</pre>
 
</pre>
 +
|style=width:unset;
 +
}}
 +
 +
<table>
 +
<tr>
 +
<td><div class="clear; float:right">__TOC__</div></td>
 +
<td>
 +
{{GStreamer debug}}
 +
<td>
 +
<center>
 +
{{ContactUs Button}}
 +
</center>
 +
</tr>
 +
</table>
  
=Pipelines=
+
==Pipelines==
  
==Audio decoding==
+
===Audio decoding===
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 21: Line 48:
 
</pre>
 
</pre>
  
==H.264 encoding==
+
===H.264 encoding===
  
 
<pre style="background:#ffad42">
 
<pre style="background:#ffad42">
Line 35: Line 62:
 
</pre>
 
</pre>
  
==H.264 decoding==
+
===H.264 decoding===
  
 
<pre style="background:#ffad42">
 
<pre style="background:#ffad42">
Line 75: Line 102:
 
</pre>
 
</pre>
  
==H.265 decoding==
+
===H.265 decoding===
  
 
<pre style="background:#ffad42">
 
<pre style="background:#ffad42">
Line 112: Line 139:
 
</pre>
 
</pre>
  
==VP8 decoding==
+
===VP8 decoding===
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 146: Line 173:
 
</pre>
 
</pre>
  
==VP9 decoding==
+
===VP9 decoding===
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 180: Line 207:
 
</pre>
 
</pre>
  
==Display video stream==
+
===Display video stream===
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 190: Line 217:
 
</pre>
 
</pre>
  
=OpenGL (ES) stream processing=
+
==OpenGL (ES) stream processing==
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 196: Line 223:
 
</pre>
 
</pre>
  
=Useful links=
+
==See also==
  
 
[https://github.com/Freescale/gstreamer-imx Gstreamer-IMX]
 
[https://github.com/Freescale/gstreamer-imx Gstreamer-IMX]
  
<noinclude>{{IMX8/Foot|Multimedia/Gstreamer Support/Package Installation|Multimedia/RidgeRun Products}}</noinclude>
+
<noinclude>{{IMX8/Foot|Multimedia/Gstreamer Support/Package Installation|Multimedia/Gstreamer_Support/Hardware-accelerated_plugins}}</noinclude>

Latest revision as of 12:24, 9 March 2023


NXP Partner Program Registered Vertical.jpg NXP Partner Program Horizontal.jpg
Previous: Multimedia/Gstreamer Support/Package Installation Index Next: Multimedia/Gstreamer_Support/Hardware-accelerated_plugins





IMPORTANT NOTES:

Error something wrong.jpg Problems running the pipelines shown on this page?
Please see our GStreamer Debugging guide for help.

RR Contact Us.png

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

Gstreamer-IMX


Previous: Multimedia/Gstreamer Support/Package Installation Index Next: Multimedia/Gstreamer_Support/Hardware-accelerated_plugins