Firefly Open Source Community

Title: Ffmpeg from Rockchip [Print This Page]

Author: Asuuga    Time: 6/20/2016 20:46
Title: Ffmpeg from Rockchip
Hi all !

I don't know if this has ever been tested here :
https://github.com/rockchip-linux/ffmpeg
This is a version of Ffmpeg from Jung Zhao and Yakir Yang that seems to achieve hardware decoding on our favourite RK3288. I tried to  test it on the new Lubuntu image from isle http://bbs.t-firefly.com/forum.php?mod=viewthread&tid=1405&extra=page%3D1

But I had no luck in making it work. The problem is that I don't know on which kernel it is supposed to run , and with what kernel drivers (vpu, gpu) it is supposed to work with.

If you want to give it a look, here is what I've tried to do :
- Follow the Readme from the git deposit to build ffmpeg and copy the libraries in libvpu/ folder to /usr/lib
- Install ffmpeg libraries generated in the "out" folder in /usr/local/lib and /usr/lib (by copying everything located in the "out" folder to these paths) - I don't know whether the libraries need to be in /usr/local/lib or /usr/lib, though only one is needed
- Run the Makefile in rk_ffmpeg_2.6.2/ffmpeg-decode-example/. Thad didn't work for me : the compilator complains about some member of a struct that does not exist. I had to checkout an older version of ffmpegexample.c, the version just before the RGA support addition commit :
  1. git checkout 262c19e36c27910cd55efbd81937c3e393cfed06  rk_ffmpeg_2.6.2/ffmpeg-decode-example/ffmpegexample.c
Copy the code

The run the Makefile with "make" command
- Stop ligthdm and try to launch a video with the newly generated executable :
  1. /home/ubuntu/ffmpeg/rk_ffmpeg_2.6.2/ffmpeg-decode-example/ffmpegexample -i <video-file> -d 1
Copy the code
As stated in the Readme of  ffmpegexample :
  1. -t: 0 single thread; 1 enable multithread
  2. -d: 0 no display; 1 display
  3. -c: 0 forever running; n cycle n times
Copy the code
The error I get is :
  1. Input #-1, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ubuntu/Videos/Tractor_500kbps_x265.mp4':
  2.   Metadata:
  3.     major_brand     : iso4
  4.     minor_version   : 1
  5.     compatible_brands: iso4hvc1
  6.     creation_time   : 2014-08-25 20:31:31
  7.   Duration: 00:00:10.00, start: 0.080000, bitrate: 488 kb/s
  8.     Stream #-1:0(und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 485 kb/s, 25 fps, 25 tbr, 25k tbn, 25 tbc (default)
  9.     Metadata:
  10.       creation_time   : 2014-08-25 20:31:31
  11.       handler_name    : hevc:fps=25@GPAC0.5.1-DEV-rev4807
  12. demo parameters setting:
  13.     input filename: /home/ubuntu/Videos/Tractor_500kbps_x265.mp4
  14.     single thread: 1
  15.     max list num: 1
  16.     cycle num: 1
  17.     display: 1
  18.     save output frame: 0
  19. failed to set crtc mode ret=-13
  20. dma_node.dma_fd 0
  21. failed to create fb ret=-22
Copy the code



Author: isle    Time: 6/21/2016 16:43
hi Asuuage
this version of FFMPEG  need a  exclusive kernel version .It definitely not the same as firefly's.
so, You can't get it working on this firefly's firmware!
Author: Asuuga    Time: 6/23/2016 17:07
Hmm ok, too bad...

That would be good to know on which kernel this would work, just to test it !

Thanks for your reply Isle !




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1