Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

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

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 12/30/2015 13:11:48      1#
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

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 1/3/2016 14:11:33      2#
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

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 1/6/2016 23:24:28      3#
Attached zip file with two files in it (one binary, one shell script).
Use the script to capture the screen, the recording is stopped by pressing a key:
  1. ./screenrecord_h264.sh test.mp4
Copy the code
You should have installed machybris before, and also avconv (sudo apt-get install libav-tools).

Every frame is captured from framebuffer device /dev/fb0. Using shared memory this RGB frame is converted to YUV420SP / NV21 format using the RGA hardware module. This YUV frame is then given to the encoder using the raw vpu api that generates an h264 bitstream. After key-press this h264 bitstream file is then encapsulated into a movie-container (mp4 in this case) by avconv utility.

You can see some android logging by:
  1. sudo /system/bin/logcat
Copy the code
You can see some kernel logging by:
  1. sudo tail -f /var/log/syslog
Copy the code
Hope this helps.


Cheers -- mac_l1


h264recorder.zip

45.93 KB, Down times: 26

Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 1/7/2016 15:59:02      4#
346409941 Posted at 1/7/2016 15:54
thank you for your help!
screenrecord_h264.sh called bin file h264recorder, Where can I get the s ...

Here is the source code:
  1. git clone https://github.com/mac-l1/machybris_examples.git
Copy the code

Look in the recorder folder for the screenrecorder.
Cheers! mac_l1
Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 1/15/2016 17:13:49      5#
fd101283 Posted at 1/14/2016 20:52
i can't find why this PPS id is bad. I try to download last ffmpeg sources... and same problem.
...
just to check: does kodi (installed by mackodi) play the movie correctly?
about the colors: i guess it has to do with some special alignment for rockchip hevc vpu frames (stride and slice height). see my post on freaktab: http://freaktab.com/forum/tv-player-support/rk3288-devices/530835-how-to-realize-rk3288-hevc-h265-hw-decoder-under-linux?p=536311#post536311



Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 1/19/2016 05:16:42      6#
Ok... Have you installed dual boot  so you can also check with android kodi or other player how the output is?
Or maybe you can send me a link to the movie file so i can check for myself whats  wrong?
Reply

Use props Report

844

Credits

42

Prestige

48

Contribution

advanced

Rank: 4

Credits
844
Posted at 1/19/2016 17:07:34      7#
fd101283 Posted at 1/19/2016 16:39
I have single boot with Linux on  eMMC. But when i try with Android (on SD card), it's working perfe ...

When playing on Android: is that on lollipop or kitkat (as they have different video libs)? and is that using kodi? what kodi version?
Reply

Use props Report

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

This forum Credits Rules

Quick Reply Back to top Back to list