Trucrux Inc

Testing Video Playback

Check for the available Gstreamer elements. #

root@imx8mm-trux-q01:~# gst-inspect-1.0

output:

video4linux2: v4l2src: Video (video4linux2) Source
video4linux2: v4l2sink: Video (video4linux2) Sink
video4linux2: v4l2radio: Radio (video4linux2) Tuner
video4linux2: v4l2deviceprovider (GstDeviceProviderFactory)
videoscale: videoscale: Video scaler
mpg123: mpg123audiodec: mpg123 mp3 decoder
matroska: webmmux: WebM muxer
matroska: matroskamux: Matroska muxer
matroska: matroskaparse: Matroska parser
matroska: matroskademux: Matroska demuxer
apetag: apedemux: APE tag demuxer
vulkan: vulkanupload: Vulkan Uploader
vulkan: vulkansink: Vulkan video sink
auparse: auparse: AU audio demuxer
uvch264: uvch264src: UVC H264 Source
uvch264: uvch264mjpgdemux: UVC H264 MJPG Demuxer
monoscope: monoscope: Monoscope
flac: flactag: FLAC tagger
flac: flacdec: FLAC audio decoder
flac: flacenc: FLAC audio encoder
equalizer: equalizer-10bands: 10 Band Equalizer
equalizer: equalizer-3bands: 3 Band Equalizer
equalizer: equalizer-nbands: N Band Equalizer
audiomixmatrix: audiomixmatrix: Matrix audio mix
segmentclip: videosegmentclip: Video buffer segment clipper
segmentclip: audiosegmentclip: Audio buffer segment clipper
.
.
.

The basic elements used for video playback are playbin and filesrc

Testing Video Playback #

We use gst-launch-1.0 to play video from device, following are the commands using playbin and filesrc elements.

1.)

root@imx8mm-trux-q01:~# gst-launch-1.0 playbin uri=file:/home/root/test_video.mp4

output:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

====== AIUR: 4.5.5 build on May 22 2020 09:21:03. ======
Core: MPEG4PARSER_06.16.09 build on May 12 2020 06:02:51
file: /usr/lib/imx-mm/parser/lib_mp4_parser_arm_elinux.so.3.2
------------------------
Track 00 [video_0] Enabled
Duration: 0:01:30.000000000
Language: und
Mime:
video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)avc, width=(int)4096, height=(int)2160, framerate=(fraction)24/1, codec_data=(buffer)014d4033ffe10018674d4033e980200021f60 
------------------------
====== VPUDEC: 4.5.5 build on May 22 2020 09:21:03. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on May 22 2020 09:24:53)
vpulib: 1.1.1
firmware: 1.1.1.0
------------------------
Track 01 [audio_0] Enabled
Duration: 0:01:29.954000000
Language: und
Mime:
audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)44100, bitrate=(int)288952, stream-format=(string)raw, codec_data=(buffer)121056e500 
------------------------

====== BEEP: 4.5.5 build on May 22 2020 09:21:03. ======
Core: AAC decoder Wrapper build on Dec 7 2017 18:13:51
file: /usr/lib/imx-mm/audio-codec/wrap/lib_aacd_wrap_arm_elinux.so.3
CODEC: BLN_MAD-MMCODECS_AACD_ARM_03.09.00_ARMV8 build on Sep 20 2017 15:02:50.
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock

 

2.)

root@imx8mm-trux-q01:~# gst-launch-1.0 filesrc location=/home/root/test_video.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! autovideosink

output:

Setting pipeline to PAUSED ...
====== VPUDEC: 4.5.5 build on May 22 2020 09:21:03. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on May 22 2020 09:24:53)
vpulib: 1.1.1
firmware: 1.1.1.0
Pipeline is PREROLLING ...

====== AIUR: 4.5.5 build on May 22 2020 09:21:03. ======
Core: MPEG4PARSER_06.16.09 build on May 12 2020 06:02:51
file: /usr/lib/imx-mm/parser/lib_mp4_parser_arm_elinux.so.3.2
------------------------
Track 00 [video_0] Enabled
Duration: 0:01:30.000000000
Language: und
Mime:
video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)avc, width=(int)4096, height=(int)2160, framerate=(fraction)24/1, codec_data=(buffer)014d4033ffe10018674d4033e980200021f60 
------------------------
------------------------
Track 01 [audio_0] Enabled
Duration: 0:01:29.954000000
Language: und
Mime:
audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)44100, bitrate=(int)288952, stream-format=(string)raw, codec_data=(buffer)121056e500 
------------------------
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock