Multimedia
GStreamer
Section titled “GStreamer”GStreamer is a powerful pipeline-based multimedia framework. It allows programmers to create a variety of media-handling components, including simple audio playback, audio and video playback, recording, streaming and editing. This is not a GStreamer reference manual but an overview for using it on NeuralPlex. This release uses the gstreamer-imx set of GStreamer 1.0 plugins for NXP’s i.MX platform, which make use of the i.MX multimedia capabilities.
There are two major commands:
gst-inspect
- allows you to to get documentation on available elements and detailed information on a specific element.
gst-launch
- allows you to create and execute GStreamer pipelines.
root@neuralplex:~# gst-inspect-1.0 | grep sinkpulseaudio: pulsesink: PulseAudio Audio Sinkhls: hlssink2: HTTP Live Streaming sinkhls: hlssink: HTTP Live Streaming sinkbluez: avdtpsink: Bluetooth AVDTP sinkbluez: a2dpsink: Bluetooth A2DP sinkcoreelements: filesink: File Sinkcoreelements: fdsink: Filedescriptor Sinkcoreelements: fakesink: Fake Sinkalsa: alsasink: Audio sink (ALSA)gdkpixbuf: gdkpixbufsink: GdkPixbuf sink...
Detailed hlep on specific element:
root@neuralplex:~# gst-inspect-1.0 <name of the element>
Here are a couple examples of playing video and audio files:
# Play Videogst-launch-1.0 filesrc location=big_buck_bunny_1080p_h264.mov ! decodebin \ ! imxvideoconvert_g2d ! waylandsink
# Play Audiogst-launch-1.0 filesrc location=Sultans_Of_Swing.mp3 ! decodebin ! alsasink
# Speaker Test (Play 440Hz sin wave)speaker-test -c8 -t sin -f440 -P9 -s7
# Speaker Test (Play wav file on specific speaker output)speaker-test -c8 -t wav -w ~/Welcome_to_the_Jungle.wav -P9 -s7
# Speaker Mapping:s1 = OUT1s2 = OUT5s3 = OUT2s4 = AMP_Ls5 = OUT4s6 = OUT3s7 = AMP_Rs8 = OUT6
# Record Audioarecord -D plughw:0,1 -r 48000 -f S32_LE sample.wav -c4
# Play Audioaplay Sultans_Of_Swing.wav