Folgende Warnungen sind aufgetreten:
Warning [2] Undefined variable $unreadreports - Line: 34 - File: global.php(961) : eval()'d code PHP 8.2.2 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/global.php(961) : eval()'d code 34 errorHandler->error_callback
/global.php 961 eval
/showthread.php 28 require_once
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 43 - File: showthread.php(1621) : eval()'d code PHP 8.2.2 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1621) : eval()'d code 43 errorHandler->error_callback
/showthread.php 1621 eval




Themabewertung:
  • 1 Bewertung(en) - 5 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Start Video Fix (jede Auflösung)
#1
Ich habe das initd Script "asplashscreen" angepasst damit das Start Video mit jeder Auflösung passend dargestellt wird.
Getestet habe ich das mit dem Offiziellen 7" Touch bei 800x480 und mit einem Dell TFT bei 1920x1080.

Das initd Script liegt hier: /etc/init.d/asplashscreen

Hinzugekommen ist folgender Code vor der Zeile "do_start":
Code:
DIMENSIONS=$(fbset -s)
DIMENSIONS=$(echo $DIMENSIONS | cut -d" " -f2)
DIMENSIONS=$(echo $DIMENSIONS | cut -d"\"" -f2)
WIDTH=$(echo $DIMENSIONS | cut -d"x" -f1)
let "WIDTH = $WIDTH - 1"
HEIGHT=$(echo $DIMENSIONS | cut -d"x" -f2)
let "HEIGHT = $HEIGHT - 1"

Und beim omxplayer Aufruf wird die Bildschirmauflösung bei dem 3. und 4. Wert durch $WIDTH $HEIGHT ersetzt.

Das ganze Script sieht dann wie folgt aus:
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides:          asplashscreen
# Required-Start: $local_fs
# Required-Stop:
# Should-Start:      
# Default-Start:     S
# Default-Stop:
# Short-Description: Show custom splashscreen
# Description:       Show custom splashscreen
### END INIT INFO

DIMENSIONS=$(fbset -s)
DIMENSIONS=$(echo $DIMENSIONS | cut -d" " -f2)
DIMENSIONS=$(echo $DIMENSIONS | cut -d"\"" -f2)
WIDTH=$(echo $DIMENSIONS | cut -d"x" -f1)
let "WIDTH = $WIDTH - 1"
HEIGHT=$(echo $DIMENSIONS | cut -d"x" -f2)
let "HEIGHT = $HEIGHT - 1"

do_start () {

    omxplayer --win 0,0,$WIDTH,$HEIGHT /opt/carpc/startup/loading_video.mp4 &
    # uncomment the following line to show static boot picture and comment out the line above
    #/usr/bin/fbi -T 1 -noverbose -a /etc/splash.png    
    exit 0
}

case "$1" in
  start|"")
    do_start
    ;;
  restart|reload|force-reload)
    echo "Error: argument '$1' not supported" >&2
    exit 3
    ;;
  stop)
    # No-op
    ;;
  status)
    exit 0
    ;;
  *)
    echo "Usage: asplashscreen [start|stop]" >&2
    exit 3
    ;;
esac

:
CarPi: RPi 3 mit 7" RPi Touchscreen & PiUSV+, Jessie, Kodi 15.2
Testing: Raspbian Jessie mit Kodi 15.2 - Step by Step
Projekte: SmartHome, Ambilight
Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
RasPiCarProjekt