Hi,
I'm trying to play a video using gstreamer but i think there is an issue with the VPU. Here is what i have tried:
as a test, running the following works as expected:
gst-launch-1.0 videotestsrc ! imxipuvideosink
Next i tried running :
gst-launch-1.0 playbin uri=file:///home/root/small.mp4
which gives:
...
[ERR] Error in opening firmware binary file
[ERR] Please put bin file to /lib/firmware/vpu folder or export VPU_FW_PATH env
...
I have an imx-vpu recipe in my build which generates an imx-vpu-5.4.35.bin. As far as I'm aware, this is the firmware gstreamer needs. It isn't copied automatically but manually naming it vpu_fw_imx6q.bin and moving into /lib/firmware/vpu removes the given error. running the playbin command again now gives:
EDIT: the imx-vpu-5.4.35.bin was not the right file and is used for something else. I have since tried multiple firmware files but i still get the same results.
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
====== AIUR: 4.1.4 build on Sep 25 2017 17:00:54. ======
Core: MPEG4PARSER_06.09.36 build on Aug 23 2016 05:18:47
file: /usr/lib/imx-mm/parser/lib_mp4_parser_arm11_elinux.so.3.2
------------------------
Track 00 [video_0] Enabled
Duration: 0:00:05.533333000
Language: und
Mime:
video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)avc, width=(int)560, height=(int)320, framerate=(fraction)30/1, codec_data=(buffer)0142c01effe1001b6742c01e9e218118534d40404050000003001000000303c8f162ee01000568ce06cb20
------------------------
------------------------
Track 01 [audio_0] Enabled
Duration: 0:00:05.568000000
Language: eng
Mime:
audio/mpeg, mpegversion=(int)4, channels=(int)1, rate=(int)48000, bitrate=(int)83051, stream-format=(string)raw, codec_data=(buffer)1188
------------------------
display(/dev/fb0) resolution is (1024x600).
====== OVERLAYSINK: 4.1.4 build on Sep 25 2017 17:01:05. ======
display(/dev/fb0) resolution is (1024x600).
====== BEEP: 4.1.4 build on Sep 25 2017 17:00:57. ======
Core: AAC decoder Wrapper build on May 30 2016 12:33:44
file: /usr/lib/imx-mm/audio-codec/wrap/lib_aacd_wrap_arm12_elinux.so.3
CODEC: BLN_MAD-MMCODECS_AACD_ARM_03.09.00_CORTEX-A8 build on Jul 13 2016 18:15:25.
At this point nothing happens (hangs with no output) and continues to do nothing until interrupted.
I tried running the decode examples from GitHub - Freescale/libimxvpuapi: i.MX VPU API Library and it seems to hang on vpu_init. Using VPU debug output gives:
$ ./mxc_vpu_test.out -D "-i /unit_tests/akiyo.mp4 -f 2 -t 1 -a 60 -y 1"
[INFO] VPU test program built on Sep 26 2017 13:48:22
[DEBUG] vpu_lib.c:274 enter vpu_Init()
[DEBUG] vpu_io.c:99 kernel:4.1.15-gb7c1e35-dirty, 4.1.15
[DEBUG] vpu_io.c:165 soc: i.MX6Q, rev: 0x63012
[DEBUG] vpu_util.c:1352 sema not init
[DEBUG] vpu_util.c:1379 sema inited
[DEBUG] vpu_io.c:811 vpu clock gate setting = 1
[DEBUG] vpu_io.c:537 _IOGetPhyMem: phy addr = 6a100000
[DEBUG] vpu_io.c:538 _IOGetPhyMem: alloc=507904, total=507904
[DEBUG] vpu_io.c:724 IOGetVirtMem: virt addr = 76516000
[DEBUG] vpu_io.c:811 vpu clock gate setting = 0
[DEBUG] vpu_io.c:811 vpu clock gate setting = 1
[DEBUG] vpu_io.c:811 vpu clock gate setting = 1
[DEBUG] vpu_io.c:811 vpu clock gate setting = 0
[DEBUG] vpu_io.c:811 vpu clock gate setting = 1
Then waits indefinitely like before.
Testing this on an imx6q (not a plus) gave similar results.
Any help would be appreciated.
Thanks
what yocto version do you use? I built 4.1.15 on mx6q board, and use mxc_vpu_test and gstreamer successfully, how could I reproduce your issue?