Flint Weller
Published © GPL3+

Learning GStreamer on the MaaXBoard

Learn the basics of GStreamer with the NXP i. MX 8M CPU

BeginnerFull instructions provided4 hours475
Learning GStreamer on the MaaXBoard

Things used in this project

Hardware components

MaaxBoard
Tria Technologies MaaxBoard
×1

Story

Read more

Custom parts and enclosures

MaaXBoard GStreamer Training Videos

These videos accomodate the PDF

Schematics

MaaXBoard GStreamer Training Document v2

Revision: 2, Date: 20220407

MaaXBoard GStreamer Training Command Line Cheat Sheet v2

Revision: 2, Date: 20220407

MaaXBoard GStreamer Training Multimedia Files

MaaXBoard GStreamer Training Debian SD Card Image

Code

Avnet MaaXBoard GStreamer Training Cheat Sheet

BatchFile
Revision: 2
Date: 20220407
Avnet MaaXBoard GStreamer Training Cheat Sheet

Revision: 2
Date: 20220407


--------------------------------------------
############################################
--------------------------------------------
1 Introduction 
--------------------------------------------


--------------------------------------------
############################################
--------------------------------------------
2 Hardware prerequisites for this training
--------------------------------------------


--------------------------------------------
############################################
--------------------------------------------
3 Prepare your GNU/Linux Workstation
--------------------------------------------


--------------------------------------------
--------------------------------------------
3.1 Operating system
--------------------------------------------


--------------------------------------------
--------------------------------------------
3.2 Software installation
--------------------------------------------


------------------
Update the Ubuntu APT repository

$ sudo apt update

$ sudo apt upgrade


------------------
Install GStreamer

$ sudo apt install libgstreamer1.0-dev \
 libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev \
 gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
 gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools \
 gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl \
 gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio


------------------
Install Wireshark 

$ sudo apt install wireshark


------------------
Install tio

$ sudo apt install tio 


------------------
Install p7zip

$ sudo apt install p7zip-full

$ sudo apt install p7zip-rar

$ sudo snap install p7zip-desktop


------------------
Install wget

$ sudo apt install wget


------------------
Install tmux

$ sudo apt install tmux


------------------
Install balenaEtcher

$ cd ~/Downloads

$ wget https://github.com/balena-io/etcher/releases/download/v1.7.1/balena-etcher-electron-1.7.1-linux-x64.zip

$ unzip balena-etcher-electron-1.7.1-linux-x64.zip 

$ chmod u+x balenaEtcher-1.7.1-x64.AppImage

$ mv balenaEtcher-1.7.1-x64.AppImage ~/bin


--------------------------------------------
--------------------------------------------
3.3 Multimedia installation
--------------------------------------------

$ cd ~/Downloads

$ wget https://hacksterio.s3.amazonaws.com/uploads/attachments/1383534/maaxboard-training-multimedia-20211027_jM1D0OatMX.7z

$ 7za x maaxboard-training-multimedia-20211027_jM1D0OatMX.7z

$ mv multimedia ~/multimedia

$ ls ~/multimedia/



--------------------------------------------
############################################
--------------------------------------------
4 Prepare the MaaXBoard
--------------------------------------------


--------------------------------------------
--------------------------------------------
4.1 MaaXBoard Debian login credentials
--------------------------------------------


--------------------------------------------
--------------------------------------------
4.2 Do not run the Debian apt package manager updater
--------------------------------------------


--------------------------------------------
--------------------------------------------
4.3 MaaXBoard SD card Debian image
--------------------------------------------

$ cd ~/Downloads

$ wget https://hacksterio.s3.amazonaws.com/uploads/attachments/1383538/maaxboard-debian-sdcard-clone-20211027_MWdMfeojGT.7z

$ 7za x maaxboard-debian-sdcard-clone-20211027_MWdMfeojGT.7z

$ balenaEtcher-1.7.1-x64.AppImage

$ ~/Downloads/balenaEtcher-1.7.1-x64.AppImage


--------------------------------------------
--------------------------------------------
4.4 Connecting the Console Adapter
--------------------------------------------

--------------------------------------------
--------------------------------------------
4.5 Connect the Remaining Cables
--------------------------------------------


--------------------------------------------
--------------------------------------------
4.6 Test the system
--------------------------------------------

$ dmesg | grep tty

$ sudo tio /dev/ttyACM0


--------------------------------------------
--------------------------------------------
4.7 SSH to the MaaXBoard
--------------------------------------------

$ ssh login@IpAddress

$ ssh root@192.168.1.64

$ ssh-keygen -R OffendingIpAddress

$ ssh-keygen -R 192.168.1.64



--------------------------------------------
############################################
--------------------------------------------
5 GStreamer on the Workstation only
--------------------------------------------


--------------------------------------------
--------------------------------------------
5.1 First GStreamer pipeline
--------------------------------------------

$ gst-inspect-1.0 videotestsrc

$ gst-inspect-1.0 autovideosink

$ gst-launch-1.0 videotestsrc ! autovideosink


--------------------------------------------
--------------------------------------------
5.2 Second GStreamer pipeline - getting verbose
--------------------------------------------

$ gst-launch-1.0 -h

$ gst-launch-1.0 -v videotestsrc ! autovideosink


--------------------------------------------
--------------------------------------------
5.3 Third GStreamer pipeline  getting specific
--------------------------------------------

$ gst-launch-1.0 -v videotestsrc pattern=ball ! video/x-\
raw,width=1280,height=720 ! autovideosink


--------------------------------------------
--------------------------------------------
5.4 Play raw video files
--------------------------------------------

$ ls ~/multimedia/video/*.raw

$ gst-launch-1.0 -v filesrc \
 location=~/multimedia/video/sintel_trailer-vga-640x480_30fps.raw \
 ! rawvideoparse width=640 height=480 framerate=30/1 \
 ! videoconvert ! videoscale ! autovideosink


--------------------------------------------
--------------------------------------------
5.5 Play encoded video files - no audio
--------------------------------------------

$ gst-inspect-1.0 filesrc

$ gst-inspect-1.0 decodebin

$ gst-inspect-1.0 videoconvert

$ gst-inspect-1.0 videoscale

$ ls ~/multimedia/video/*.mp4

// Now type in the complete pipeline for one of the h.264 encoded video files

$ gst-launch-1.0 -v filesrc 
 location=~/multimedia/video/sintel_trailer-fwvga-854x480_h264.mp4 \
 ! decodebin ! videoconvert ! videoscale ! autovideosink


// The decodebin element can decode h.265 as well as h.264, so go ahead and play the 4K h.265 encoded full video

$ gst-launch-1.0 -v filesrc 
 location=~/multimedia/video/sintel-uhd-3840x1744_h265.mp4 \
 ! decodebin ! videoconvert ! videoscale ! autovideosink


--------------------------------------------
--------------------------------------------
5.6 Getting started with audio output
--------------------------------------------

$ gst-launch-1.0 audiotestsrc ! autoaudiosink  

$ pulseaudio --start 

$ gst-launch-1.0 audiotestsrc ! autoaudiosink  

$ gst-device-monitor-1.0 Audio/Sink 

$ gst-launch-1.0 audiotestsrc ! pulsesink device\
=alsa_output.usb-Logitech_G533_Gaming_Headset-00.iec958-stereo


$ export audioout="pulsesink device=alsa_output.usb-Logitech_G533_Gaming_Headset-00.iec958-stereo"

$ echo $audioout

$ gst-launch-1.0 audiotestsrc ! $audioout

$ pactl list sinks

$ pacmd list sinks

$ aplay -l

$ gst-launch-1.0 audiotestsrc ! alsasink device=hw:3

--------------------------------------------
--------------------------------------------
5.7 Play raw audio files
--------------------------------------------

$ ls ~/multimedia/audio/*.wav

$ gst-inspect-1.0 rawaudioparse

$ gst-launch-1.0 -v filesrc \
 location=~/multimedia/audio/WhatABeautifulSunset-Angelwing.wav \
 ! rawaudioparse ! audioconvert ! audioresample ! $audioout


--------------------------------------------
--------------------------------------------
5.8 Play encoded audio files
--------------------------------------------

$ ls ~/multimedia/audio/*.mp3

$ gst-launch-1.0 -v filesrc location=\
~/multimedia/audio/DoubleViolinConcerto1stMovement-JSBach.mp3 \
! mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample \
! autoaudiosink



--------------------------------------------
--------------------------------------------
5.9 Play encoded video files with audio easy method
--------------------------------------------
 
$ gst-launch-1.0 playbin uri=file:~/multimedia/video/sintel-uhd-3840x1744_h265.mp4

$ gst-play-1.0  ~/multimedia/video/sintel-uhd-3840x1744_h265.mp4

$ gst-play-1.0 --help


--------------------------------------------
--------------------------------------------
5.10 Play encoded video files with audio demux method
--------------------------------------------

$ gst-inspect-1.0 qtdemux

$ gst-inspect-1.0 queue

$ gst-inspect-1.0 audioconvert

$ gst-inspect-1.0 audioresample

$ gst-inspect-1.0 autoaudiosink

$ gst-launch-1.0 -v filesrc location=\
~/multimedia/video/sintel-uhd-3840x1744_h265.mp4 \
! qtdemux name=demux demux.audio_0 ! queue ! decodebin \
! audioconvert ! audioresample ! $audioout demux.video_0 ! queue \
! decodebin ! videoconvert ! videoscale ! autovideosink


--------------------------------------------
--------------------------------------------
5.11 Getting started with audio input
--------------------------------------------

$ gst-launch-1.0 autoaudiosrc ! autoaudiosink

$ pulseaudio --start 

$ gst-launch-1.0 audiotestsrc ! autoaudiosink  

$ gst-device-monitor-1.0 Audio/Source 

$ gst-launch-1.0 pulsesrc device=\
alsa_input.usb-Logitech_G533_Gaming_Headset-00.mono-fallback \
! $audioout


$ export audioin="pulsesrc device=alsa_input.usb-Logitech_G533_Gaming_Headset-00.mono-fallback"

$ echo $audioin

$ gst-launch-1.0 $audioin ! $audioout

$ pactl list sources

$ pacmd list sources

$ arecord -l

$ gst-launch-1.0 alsasrc device=hw:3 ! autoaudiosink

$ gst-launch-1.0 alsasrc device=hw:4 ! autoaudiosink


--------------------------------------------
--------------------------------------------
5.12 Investigating the camera
--------------------------------------------

$ dmesg

$ ls -ltrh /dev/video*

$ /usr/bin/ls -ltrh /dev/video*

$ v4l2-ctl --help

$ v4l2-ctl --help-all

$ v4l2-ctl --list-devices

$ v4l2-ctl --device=/dev/video2 --all

$ v4l2-ctl --device=/dev/video3 --all

$ v4l2-ctl --list-formats

$ gst-device-monitor-1.0 Video/Source


--------------------------------------------
--------------------------------------------
5.13 Displaying camera video on screen
--------------------------------------------

$ gst-launch-1.0 -v v4l2src device=/dev/video2 ! autovideosink

$ export videoin="v4l2src device=/dev/video2" ; echo $videoin

$ gst-launch-1.0 -v $videoin \
 ! video/x-raw,width=640,height=480 ! autovideosink

$ gst-launch-1.0 -v $videoin \
 ! video/x-raw,width=640,height=480,framerate=10/1 ! autovideosink



--------------------------------------------
############################################
--------------------------------------------
6 GStreamer on the MaaXBoard only
--------------------------------------------


--------------------------------------------
--------------------------------------------
6.1 First steps with GStreamer
--------------------------------------------

# gst-launch-1.0 -v videotestsrc \
pattern=ball ! video/x-raw,width=640,height=480 ! autovideosink


# htop

# gst-launch-1.0 -v videotestsrc pattern=ball \
 ! video/x-raw,width=1920,height=1080 ! autovideosink


--------------------------------------------
--------------------------------------------
6.2 Play raw video files
--------------------------------------------

# ls ~/multimedia/video/*.raw

-------------------
QVGA raw video

# gst-launch-1.0 -v filesrc \
 location=~/multimedia/video/sintel_trailer-qvga-320x240_30fps.raw \
 ! rawvideoparse width=320 height=240 framerate=30/1 \
 ! videoconvert ! videoscale ! autovideosink


------------------
VGA resolution:

# gst-launch-1.0 -v filesrc \
 location=~/multimedia/video/sintel_trailer-vga-640x480_30fps.raw \
 ! rawvideoparse width=640 height=480 framerate=30/1 \
 ! videoconvert ! videoscale ! autovideosink

------------------
FHD resolution:

# gst-launch-1.0 -v filesrc \
 location=~/multimedia/video/sintel_trailer-fhd-1920x1080_30fps.raw \
 ! rawvideoparse width=1920 height=1080 framerate=30/1 \
 ! videoconvert ! videoscale ! autovideosink


--------------------------------------------
--------------------------------------------
6.3 Play encoded video files - no audio
--------------------------------------------

# ls ~/multimedia/video/*.mp4

# gst-launch-1.0 -v filesrc \
 location=~/multimedia/video/sintel_trailer-fwvga-854x480_h264.mp4 \
 ! decodebin ! videoconvert ! videoscale ! autovideosink

# htop

# gst-launch-1.0 -v filesrc \
 location=~/multimedia/video/sintel-uhd-3840x1744_h265.mp4 \
 ! decodebin ! videoconvert ! videoscale ! autovideosink


--------------------------------------------
--------------------------------------------
6.4 Getting started with audio
--------------------------------------------

# gst-launch-1.0 audiotestsrc ! autoaudiosink  

# pulseaudio --start 

# gst-launch-1.0 audiotestsrc ! autoaudiosink  

# gst-device-monitor-1.0 Audio/Sink

# gst-launch-1.0 audiotestsrc ! pulsesink device=alsa_output.usb-Logitech_G533_Gaming_Headset-00.analog-stereo

# export audioout="pulsesink device=alsa_output.usb-Logitech_G533_Gaming_Headset-00.analog-stereo"

# echo $audioout

# gst-launch-1.0 audiotestsrc ! $audioout


--------------------------------------------
--------------------------------------------
6.5 Play raw audio files
--------------------------------------------

# ls ~/multimedia/audio/*.wav

# gst-launch-1.0 -v filesrc \
 location=~/multimedia/audio/WhatABeautifulSunset-Angelwing.wav \
 ! rawaudioparse ! audioconvert ! audioresample ! autoaudiosink


--------------------------------------------
--------------------------------------------
6.6 Play encoded audio files
--------------------------------------------

# ls ~/multimedia/audio/*.mp3

# gst-launch-1.0 -v filesrc \
location=\
~/multimedia/audio/DoubleViolinConcerto1stMovement-JSBach.mp3 \
! mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample \
! autoaudiosink



--------------------------------------------
--------------------------------------------
6.7 Play encoded video files with audio - easy method
--------------------------------------------

# gst-launch-1.0 playbin uri=file:~/multimedia/video/sintel-uhd-3840x1744_h265.mp4


--------------------------------------------
--------------------------------------------
6.8 Play encoded video files with audio - demux method
--------------------------------------------

# gst-launch-1.0 -v filesrc \
 location= ~/multimedia/video/sintel-uhd-3840x1744_h265.mp4 \
 ! qtdemux name=demux demux.audio_0 ! queue ! decodebin \
 ! audioconvert ! audioresample ! autoaudiosink demux.video_0 \
 ! queue ! decodebin ! videoconvert ! videoscale ! autovideosink


--------------------------------------------
--------------------------------------------
6.9 Investigating the camera
--------------------------------------------

# dmesg

# ls -ltrh /dev/video*

# v4l2-ctl --list-devices

# v4l2-ctl --device=/dev/video1 --all

# v4l2-ctl --list-formats

# gst-device-monitor-1.0 Video/Source

# export videoin="v4l2src device=/dev/video1" ; echo $videoin


--------------------------------------------
--------------------------------------------
6.10 Displaying camera video on screen
--------------------------------------------

# gst-launch-1.0 -v $videoin ! autovideosink

# gst-launch-1.0 -v $videoin io-mode=2 ! autovideosink

# gst-launch-1.0 -v $videoin io-mode=2 \
 ! video/x-raw,width=640,height=480 ! autovideosink

# gst-launch-1.0 -v $videoin io-mode=2 \
 ! video/x-raw,width=640,height=480,framerate=10/1 ! autovideosink





--------------------------------------------
############################################
--------------------------------------------
7 GStreamer with MaaXBoard as source and Workstation as sink
--------------------------------------------


--------------------------------------------
--------------------------------------------
7.1 Connecting the Hardware
--------------------------------------------


--------------------------------------------
--------------------------------------------
7.2 Identifying Multimedia Sources and Sinks
--------------------------------------------


------------------
MaaXBoard  Video source (camera)

# v4l2-ctl --list-devices

# v4l2-ctl --device=/dev/video2 --all

# gst-launch-1.0 $videoin ! autovideosink

# gst-launch-1.0 $videoin io-mode=2 ! autovideosink

# export videoin="v4l2src device=/dev/video1 io-mode=2"; echo $videoin


------------------
MaaXBoard  Audio source (microphone)

# arecord -l

# export audioin="alsasrc device=hw:1"; echo $audioin


------------------
Workstation  Video sink (display)

$ gst-launch-1.0 videotestsrc ! autovideosink


------------------
Workstation  Audio sink (headphones or speaker)

$ aplay -l

$ export audioout="alsasink device=hw:3"; echo $audioout

$ gst-launch-1.0 audiotestsrc ! $audioout


--------------------------------------------
--------------------------------------------
7.3 Identifying IP Addresses
--------------------------------------------

------------------
MaaXBoard

# ifconfig

# ip a


------------------
Workstation

$ ifconfig

$ ip a


------------------
MaaXBoard

# export workstation="192.168.1.61";  echo $workstation

# export maaxboard="192.168.1.80"; echo $maaxboard

# ping $workstation -c 1


------------------
Workstation

$ export maaxboard="192.168.1.80"; echo $maaxboard

$ export workstation="192.168.1.61"; echo $workstation

$ ping $maaxboard -c 1


--------------------------------------------
--------------------------------------------
7.4 Easier Shell Variables
--------------------------------------------

------------------
MaaXBoard

# export videoin="v4l2src device=/dev/video1 io-mode=2"; \
 echo $videoin; \
 export audioin="alsasrc device=hw:1"; echo $audioin; \
 export workstation="192.168.1.61";  echo workstation=$workstation; \
 export maaxboard="192.168.1.80"; echo maaxboard=$maaxboard; \
 ping $workstation -c 1


------------------
Workstation

$ export export audioout="alsasink device=hw:3"; echo $audioout; \
 export maaxboard="192.168.1.80"; echo maaxboard=$maaxboard; \
 export workstation="192.168.1.61"; echo workstation=$workstation; \
 ping $maaxboard -c 1


--------------------------------------------
--------------------------------------------
7.5 Streaming Raw Test Video
--------------------------------------------

------------------
MaaXBoard - htop

# htop


------------------
MaaXBoard 

# export caps="video/x-raw, width=320, height=240"; echo $caps

# gst-launch-1.0 -v videotestsrc ! $caps ! rtpvrawpay ! queue ! udpsink host=$workstation


------------------
Workstation

export caps="application/x-rtp, media=(string)video, \
 clock-rate=(int)90000, encoding-name=(string)RAW, \
sampling=(string)YCbCr-4:2:0, depth=(string)8, width=(string)320, \
height=(string)240, colorimetry=(string)BT601-5, payload=(int)96, \
a-framerate=(string)30"; echo $caps

$ gst-launch-1.0 -v udpsrc caps="$caps" \
 ! rtpjitterbuffer ! queue ! rtpvrawdepay ! autovideosink 


------------------
Workstation  Wireshark

$ wireshark

ip.src==<WORKSTATION> && ip.dst==<MAAXBOARD> && udp.port==<PORT>

ip.src==192.168.1.80 && ip.dst==192.168.1.61 && udp.port==5004


------------------
MaaXBoard

# export caps="video/x-raw, width=1024, height=768"; echo $caps

# gst-launch-1.0 -v videotestsrc ! $caps \
 ! rtpvrawpay ! queue ! udpsink host=$workstation


------------------
Workstation

export caps="application/x-rtp, media=(string)video, \
clock-rate=(int)90000, encoding-name=(string)RAW, \
sampling=(string)YCbCr-4:2:0, depth=(string)8, \
width=(string)1024, height=(string)768, colorimetry=(string)BT709-2, \
payload=(int)96, a-framerate=(string)30"; echo $caps

$ gst-launch-1.0 -v udpsrc caps="$caps" \
 ! rtpjitterbuffer ! queue ! rtpvrawdepay ! autovideosink 


------------------
Maaxboard

# export caps="video/x-raw, width=1024, height=768"

# gst-launch-1.0 -v videotestsrc ! $caps \
 ! rtpvrawpay mtu=6000 ! queue ! udpsink host=$workstation



--------------------------------------------
--------------------------------------------
7.6 Streaming Encoded Test Video
--------------------------------------------


------------------
MaaXBoard

# export caps="video/x-raw, width=320, height=240"; echo $caps

# gst-launch-1.0 -v videotestsrc ! $caps \
 ! videoconvert ! x264enc ! video/x-h264,profile=main \
 ! h264parse ! rtph264pay ! queue ! udpsink host=$workstation


------------------
Workstation

$ export caps="application/x-rtp, encoding-name=H264, payload=96"; echo $caps

$ gst-launch-1.0 -v udpsrc caps="$caps" ! rtpjitterbuffer \
 ! rtph264depay ! h264parse ! decodebin ! videoconvert ! autovideosink


------------------
MaaXBoard  htop


------------------
Workstation  Wireshark


------------------
MaaXBoard

# export caps="video/x-raw, width=1280, height=720"; echo $caps

# gst-launch-1.0 -v videotestsrc ! $caps ! videoconvert \
 ! x264enc ! video/x-h264,profile=main ! h264parse \
 ! rtph264pay ! queue ! udpsink host=$workstation


------------------
Workstation

$ export caps="application/x-rtp, encoding-name=H264, payload=96"; echo $caps

$ gst-launch-1.0 -v udpsrc caps="$caps" \
 ! rtpjitterbuffer ! rtph264depay ! h264parse \
 ! decodebin ! videoconvert ! autovideosink

$ gst-launch-1.0 -v udpsrc caps="$caps" \
 ! rtpjitterbuffer ! rtph264depay ! h264parse \
 ! decodebin ! videoconvert ! fpsdisplaysink


--------------------------------------------
--------------------------------------------
7.7 Streaming Raw Audio
--------------------------------------------


------------------
MaaXBoard

# gst-launch-1.0 -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink host=$workstation 


------------------
Workstation

$ export caps="application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96"; echo $caps

$ gst-launch-1.0 -v udpsrc caps="$caps" ! rtpL16depay \
 ! queue  ! audioconvert ! $audioout sync=false


------------------
MaaXBoard  htop


------------------
MaaXBoard

# gst-launch-1.0 -ve $audioin ! audioconvert ! rtpL16pay ! udpsink host=$workstation 


------------------
Workstation

$ export caps="application/x-rtp, media=(string)audio, clock-rate=(int)32000, encoding-name=(string)L16, encoding-params=(string)2, channels=(int)2, payload=(int)96"; echo $caps

$ gst-launch-1.0 -v udpsrc caps="$caps" ! rtpL16depay \
 ! queue  ! audioconvert ! $audioout sync=false


--------------------------------------------
--------------------------------------------
7.8 Streaming Encoded Audio
--------------------------------------------


------------------
MaaXBoard

# gst-launch-1.0 -ve $audioin ! audioconvert ! avenc_ac3 \
 ! mpegtsmux ! rtpmp2tpay ! udpsink host=$workstation sync=false


------------------
Workstation

$ export caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33"; echo $caps

$ gst-launch-1.0 -v udpsrc caps="$caps" ! rtpjitterbuffer \
 ! rtpmp2tdepay ! tsparse ! decodebin \
 ! audioconvert ! $audioout sync=false


--------------------------------------------
--------------------------------------------
7.9 Streaming Test Multimedia
--------------------------------------------

------------------
MaaXBoard

# gst-launch-1.0 -v mpegtsmux name=mux alignment=7 ! rtpmp2tpay ! udpsink host=$workstation sync=false \
 compositor name=videomix ! x264enc bitrate=10000 tune=zerolatency ! video/x-h264, profile=baseline ! queue ! mux. \
 audiomixer name=audiomix ! audioconvert ! audioresample ! avenc_ac3 ! queue ! mux. \
 videotestsrc is-live=true ! "video/x-raw, width=320, height=240" ! videomix. \
 audiotestsrc is-live=true ! audiomix.


------------------
Workstation

$ export caps="application/x-rtp"; echo $caps

$ gst-launch-1.0 -v udpsrc caps="$caps" ! \
 rtpmp2tdepay ! tsparse ! tsdemux name=demux \
 demux. ! queue ! decodebin ! videoconvert ! autovideosink sync=false \
 demux. ! queue leaky=1 ! decodebin ! audioconvert ! $audioout sync=false


--------------------------------------------
--------------------------------------------
7.10 Streaming Raw Camera Video
--------------------------------------------


------------------
MaaXBoard

# export caps="video/x-raw, width=320, height=240, framerate=30/1"; echo $caps

# gst-launch-1.0 -v $videoin ! $caps ! videoconvert \
 ! $caps ! rtpvrawpay ! queue ! udpsink host=$workstation


------------------
Workstation

$ export caps="application/x-rtp, media=(string)video, \
clock-rate=(int)90000, encoding-name=(string)RAW, \
sampling=(string)YCbCr-4:2:2, depth=(string)8, width=(string)320, \
height=(string)240, colorimetry=(string)BT601-5, payload=(int)96,\
 a-framerate=(string)30"; echo $caps

$ gst-launch-1.0 -v udpsrc caps="$caps" ! rtpjitterbuffer \
 ! queue ! rtpvrawdepay ! videoconvert ! autovideosink


------------------
MaaXBoard
...

This file has been truncated, please download it to see its full contents.

Credits

Flint Weller
24 projects • 21 followers
NXP Dedicated Applications Processor FAE
Contact
Thanks to Ruben Charles.

Comments

Please log in or sign up to comment.