jvcleave / ofxOMXPlayer

OpenMax accelerated video player for openFrameworks on the Raspberry Pi 0-3. Does not work with RPI4
GNU General Public License v2.0
180 stars 61 forks source link

CPU used 99% #30

Closed hitman249 closed 10 years ago

hitman249 commented 10 years ago

Raspberry Pi + rasbian

Manual exec "make run" is good, CPU load ~27-36%

But if you use Autostart exec for crontab or use any other method of startup

@reboot /usr/bin/startvideo

cat /usr/bin/startvideo

#!/bin/bash
cd /home/pi/openFrameworks/addons/ofxOMXPlayer/example-playlist/
make run

Result: CPU load ~97-99%

In main.ccp use code:

ofSetFrameRate(60);
ofSetVerticalSync(true);
hitman249 commented 10 years ago

Solved the problem with this method:

Open:

sudo nano /etc/inittab

Commenting on the line terminal tty1 ("1:2345:respawn:/sbin/getty 115200 tty1"), and add line:

1:2345:respawn:/bin/login -f pi tty1 /dev/tty1 2>&1

Now pi user will automatically login.

Goto /home/pi/

Create a file startup.sh

touch startup.sh
chmod a+x startup.sh

Add it to the end .bashrc :

~/startup.sh

And add in the file startup.sh everything should run automatically.

In this method, the CPU load correctly.

jvcleave commented 10 years ago

cool - will close as I don't see anything for me to do to the addon to help this. thanks for the info