Discussion

[Bananian] Script to install and configure hw-accelerated mplayer on bananian

30 22550
olee  
Post Last Edited by olee at 2014-9-24 20:30

Post Last Edited by olee at 2014-9-24 20:29

Hi there!

I made a little setup script, that fully installs and configures mplayer2 on current bananian for BPi to play hardware acelerated videos.
This work is based on http://forum.lemaker.org/1822-1-1-1.html and http://forum.lemaker.org/viewthread.php?tid=1707

You just need to copy the files onto your pi and run the script.
To get the files on the pi you can just copy them on the boot partition after you copied the bananian image onto your SD card.
Then log into root on the pi and run
  1. mount /dev/mmcblk0p1 /mnt
  2. chmod +x /mnt/setup-hw-video.sh
  3. /mnt/setup-hw-video.sh
  4. umount /dev/mmcblk0p1
Copy the Code
Please be aware that this script is only intended to be run ONCE and only on a fresh copy of bananian.

DOWNLOAD: https://dl.dropboxusercontent.com/u/26603849/setup-hw-video.zip

I'm still working on the script, so feel free to make suggestions.
olee  
Ok, subtitles don't render yet.
It seems nn2 had the same problem, so I hope he can help here or I need to find a solution myself.

so great!

olee  
Post Last Edited by olee at 2014-9-27 05:53

Thanks!
I noticed something strange:
If I don't replace the script.bin with the one supplied by nn2, video playback desktop still work perfectly.
But for some reason the tty screens (Ctrl+Alt+[F1-F6]) do not work any more (blank - no login prompt opens).
But if I replace script.bin, the green led becomes unconfigurable (it always stays "on").
I would really like to have both you know? xD
Also subtitles still need to work and the lxde desktop I installed with the few commands there seems to be lacking some icons.
I wonder which packages are missing so these are displayed....

kevindt  
Post Last Edited by kevindt at 2014-9-25 20:07

Reply 4# olee
  Take the utility bin2fex (see "building script.bin" on http://wiki.lemaker.org/Building_u-boot,_script.bin_and_linux-kernel) and use it to convert the scripts each to a fex file that you can read in a text editor (or better, a program like Kdiff3 that makes comparison easy).You can see the differences easily.  This does not look like a fully configured fex for bananapi.  
As far as the led goes, look at the [leds_para] sections.  The original LeMaker one has the green LED configured on port PH24, while this one has it connected to port PH20.  While much of the fex file is better not tampered with, this section is pretty safe to modify.
When you're done, you can convert it back to a script file with fex2bin and reload it.

olee  
I updated the script a bit and added my own script.bin based on the bananian script.bin instead of the one from nn2 which greatly differs from bananian script.bin.

I downloaded it (not sure if it was v1 or v2), I got an error while copying the .bin file but I checked our .sh script and it didn't seem very important so I rebooted.

Everything worked perfect after a reboot! I downloaded the Sintel trailer and some other trailer and it's a lot better than the shitty VDPAU implementation for radeon cards in Linux.

Really, really impressed by the work of this community.

I'll see if I can build a nice desktop image based on the excellent Bananian with the dual core Mali 400 patch, FB Turbo, HW accelerated Chromium (if possible on ARM Linux?), a ZRAM option, the latest VDPAU and MPV. That would make this little machine an almost full desktop machine replacement in my eyes.

It won't be soon but it's a very interesting challenge

olee  
If you have suggestions to improove this script, please do so!
I am very new to setting up linux environments like that and already had a few problems setting up lxde. I would also like to get rid of the broken icons in the lxde that is set up by my script (on login sceen and some other places)

olee  
Ok this is weird.
I was trying to find out, why tty does not work with the bananian-based script.bin.
I found out, that changing the LED config solved the problem, but for no apparent reason:

Working tty - no working LED (nn2's script.bin):
  1. [leds_para]
  2. leds_used = 1
  3. leds_num = 2
  4. leds_pin_1 = port:PH20<1><default><default><0>
  5. leds_name_1 = "green:ph20:led1"
  6. leds_default_1 = 1
  7. leds_trigger_1 = "mmc0"
  8. leds_pin_2 = port:PH21<1><default><default><0>
  9. leds_name_2 = "blue:ph21:led2"
  10. leds_default_2 = 0
  11. leds_trigger_2 = "heartbeat"
Copy the Code
Working LED - not working tty (bananian):
  1. [leds_para]
  2. leds_used = 1
  3. leds_num = 1
  4. leds_pin_1 = port:PH24<1><default><default><0>
  5. leds_name_1 = "green:ph24:led1"
  6. leds_default_1 = 1
  7. leds_trigger_1 = "cpu0"
Copy the Code
Anyone any idea why this happens?

olee  
Ok I found the problem!
It seems the system does not like the name of the led definition!
if I change it to
  1. [leds_para]
  2. leds_used = 1
  3. leds_num = 1
  4. leds_pin_1 = port:PH24<1><default><default><0>
  5. leds_name_1 = "green_status"
  6. leds_default_1 = 1
  7. leds_trigger_1 = "cpu0"
Copy the Code
LED and tty works without any problems!
This is a weird issue....

You have to log in before you can reply Login | Sign Up

Points Rules