tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 7019f0bbdb032523c0dc1d643bdc0289e9121f3d
parent 8e399f20f7ff85c531077592a3e17eabb0bef6a0
Author: rbckman <rob@tarina.org>
Date:   Tue, 10 Jan 2023 14:11:18 +0000

yte

Diffstat:
Minstall.sh | 4++--
Mtarina.py | 37+++++++++++++++++++------------------
2 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/install.sh b/install.sh @@ -58,7 +58,7 @@ apt-get update apt-get upgrade -y if [ "$version" = "buster" ] then - apt-get -y install git python3-pip python-configparser ffmpeg mediainfo gpac omxplayer sox cpufrequtils apache2 libapache2-mod-wsgi-py3 libdbus-glib-1-dev dbus libdbus-1-dev python3-numpy python3-pil python3-smbus python3-shortuuid wiringpi make gcc cmake pmount + apt-get -y install git python3-pip python-configparser ffmpeg mediainfo gpac omxplayer sox cpufrequtils apache2 libapache2-mod-wsgi-py3 libdbus-glib-1-dev dbus libdbus-1-dev usbmount python3-numpy python3-pil python3-smbus python3-shortuuid wiringpi make gcc cmake pmount else apt-get -y install git python3-pip python-configparser libav-tools mediainfo gpac omxplayer sox cpufrequtils apache2 libapache2-mod-wsgi-py3 libdbus-glib-1-dev dbus libdbus-1-dev usbmount python3-numpy python3-pil python3-smbus python3-shortuuid wiringpi make gcc cmake fi @@ -263,7 +263,7 @@ apt-get -y install ntfs-3g exfat-fuse #sed -i '/FS_MOUNTOPTIONS=/c\FS_MOUNTOPTIONS="-fstype=ntfs-3g,nls=utf8,umask=007,gid=46 -fstype=fuseblk,nls=utf8,umask=007,gid=46 -fstype=vfat,gid=1000,uid=1000,umask=007"' /etc/usbmount/usbmount.conf #sed -i '/FILESYSTEMS=/c\FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus ntfs fuseblk vfat"' /etc/usbmount/usbmount.conf -cat <<'EOF' > /etc/usbmount/usbmount.conf +cat <<'EOF' >> /etc/usbmount/usbmount.conf FS_MOUNTOPTIONS="-fstype=ntfs-3g,nls=utf8,umask=007,gid=46 -fstype=fuseblk,nls=utf8,umask=007,gid=46 -fstype=vfat,gid=1000,uid=1000,umask=007" FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus ntfs fuseblk vfat" EOF diff --git a/tarina.py b/tarina.py @@ -1110,23 +1110,23 @@ def main(): camerablue = str(float(camera.awb_gains[1]))[:4] #Check if menu is changed and save settings / sec - if buttonpressed == True or recording == True or rendermenu == True: - lastmenu = menu[selected] - settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(camera.framerate), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), str(flip), str(beeps), str(reclenght), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', lens, diskleft, '', serverstate, wifistate, '', '', '', '', '', '', live - #Rerender menu if picamera settings change - if settings != oldsettings or selected != oldselected: - writemenu(menu,settings,selected,'',showmenu) - rendermenu = True - #save settings if menu has been updated and x seconds passed - if recording == False: - if time.time() - pausetime > savesettingsevery: - settings_to_save = [filmfolder, filmname, camera.brightness, camera.contrast, camera.saturation, camera.shutter_speed, camera.iso, camera.awb_mode, camera.awb_gains, awb_lock, miclevel, headphoneslevel, beeps, flip, comp, between, duration, showmenu_settings, quality,wifistate,serverstate,plughw,channels] - #print('saving settings') - savesettings(settings_to_save, filmname, filmfolder) - pausetime = time.time() - #writemessage(pressed) - oldsettings = settings - oldselected = selected + #if buttonpressed == True or recording == True or rendermenu == True: + lastmenu = menu[selected] + settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(camera.framerate), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), str(flip), str(beeps), str(reclenght), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', lens, diskleft, '', serverstate, wifistate, '', '', '', '', '', '', live + #Rerender menu if picamera settings change + #if settings != oldsettings or selected != oldselected: + writemenu(menu,settings,selected,'',showmenu) + #rendermenu = True + #save settings if menu has been updated and x seconds passed + if recording == False: + if time.time() - pausetime > savesettingsevery: + settings_to_save = [filmfolder, filmname, camera.brightness, camera.contrast, camera.saturation, camera.shutter_speed, camera.iso, camera.awb_mode, camera.awb_gains, awb_lock, miclevel, headphoneslevel, beeps, flip, comp, between, duration, showmenu_settings, quality,wifistate,serverstate,plughw,channels] + #print('saving settings') + savesettings(settings_to_save, filmname, filmfolder) + pausetime = time.time() + #writemessage(pressed) + oldsettings = settings + oldselected = selected time.sleep(keydelay) @@ -1209,6 +1209,7 @@ def listenforclients(host, port, q): #--------------Write the menu layer to dispmanx-------------- def writemenu(menu,settings,selected,header,showmenu): + #global oldmenu menudone = '' menudoneprint = '' menudone += str(selected) + '\n' @@ -1222,7 +1223,7 @@ def writemenu(menu,settings,selected,header,showmenu): else: menudoneprint += i + ' : ' + s + ' | ' n += 1 - #print(term.clear+term.home) + print(term.clear+term.home) print(menudoneprint) spaces = len(menudone) - 500 menudone += spaces * ' '