Firefly Open Source Community

   Login   |   Register   |
New_Topic
12345
New Topic
Print Previous Topic Next Topic

Hardware decoder on linux for firefly-rk3288(source opened)

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821

Hardware decoder on linux for firefly-rk3288(source opened)

Posted at 12/30/2015 10:37:25      View:57066 | Replies:38        Print      Only Author   [Copy Link] 1#
Last edited by isle In 12/30/2015 10:40 Editor

This is how to add hardware decoder to ffmpeg on linux for firefly-rk3288.

First, choose the vpu driver librarys.
We use the hybris library made by mac_l1,also you can choose rockchip's vpu driver library ,which they has put it on a websites.
For convenience ,I put a mac_l1's hybris lib's copy to "baidu pan". here is the link:
http://pan.baidu.com/s/1pKdqUQR


Install the driver library:
  1. sudo dpkg  -i machybris-0.1.0_armhf.deb
Copy the code
if you get a mistake. please run this:
  1. sudo apt-get -f install
Copy the code

and try again.

After install done ,reboot your board .

Install dependencies library :
  1. sudo apt-get install libsdl-dev
Copy the code

this source code need compiled on the development board. if you want to compiled on PC ,you need modify the source code.

Install compile environment:
  1. sudo apt-get install build-essential
Copy the code
Get the source code:
  1. git clone https://github.com/isle0118/firefly-vpu-linux.git
Copy the code
Compile and Install:
  1. ./configure  --enable-shared --prefix=/usr --disable-ffmpeg --disable-ffprobe --disable-ffserver  --disable-static
Copy the code
  1. make && sudo make install
Copy the code

Now, you can test the hardware decoder with ffplay .

the source file is here :
  1. libavcodec/rkdec_decoder.c
Copy the code

if you want use other driver library or compiled on PC ,just need to modify this file.


Have fun !



Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 12/30/2015 13:11:48        Only Author  2#
Wow! I am impressed!

This opens up the way to get hw decoding in chromium, mplayer and vlc, as they all use ffmpeg/ avcodec as base.
Maybe we can even play netflix on chromium!

Also a new version of machybris (0.1.1) can be downloaded here: http://www.mac-l1.com/v0.1.1/mac ... 4.2-0.1.1_armhf.deb

Great work, isle!
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 12/31/2015 09:43:03        Only Author  3#
your machybris is Amazing。we can do many things on it.

we really appreciate all your work!
Reply

Use props Report

24

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
24
Posted at 1/3/2016 11:05:47        Only Author  4#
Hi mac_l1:
can you share the method that how to use GPU for encoding?
Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 1/3/2016 14:11:33        Only Author  5#
346409941 Posted at 1/3/2016 11:05
Hi mac_l1:
can you share the method that how to use GPU for encoding?

Hi,
See: https://github.com/mac-l1/machyb ... 64recorder.cpp#L158.
I used this code to capture the screen into a h264-movie using vpu.
This can probably quite easily be added into the shared ffmpeg / avcodec code above from isle.
Reply

Use props Report

106

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
106
Posted at 1/5/2016 22:40:31        Only Author  6#
Hi,

I get an error : librk_on2.so and libvpu.so are missing !

I think a package is missing....
Reply

Use props Report

106

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
106
Posted at 1/5/2016 23:11:45        Only Author  7#
OK it's solved with just a reboot .....
Do you know why it's not working with 4K video ?
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 1/6/2016 09:34:41        Only Author  8#
the vpu can decode 4K video smoothly. But the display was terrible.
so we didn't add 4k support here.
Reply

Use props Report

106

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
106
Posted at 1/6/2016 16:09:00        Only Author  9#
Oh bad news.....
It's not possible to add 4K support (maybe with display improvement) ?

I think that the main advantage of this chip is 4K support.

Reply

Use props Report

24

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
24
Posted at 1/6/2016 19:16:42        Only Author  10#
Hi mac_l1:
can you give me screenrecoderh264 for testing HW encoder
Reply

Use props Report

Return to List
12345
You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list