commit a1d9c05592c153d3f0f928aa8ffab6dddf92a2ac
parent 2dc45d017d24c05030b4bb17e7739d0f90334437
Author: rob <rob@tarina.org>
Date: Tue, 14 Nov 2023 14:44:59 +0000
Merge branch 'master' of https://git.tarina.org/tarina
Diffstat:
4 files changed, 67 insertions(+), 45 deletions(-)
diff --git a/3d/tarina-picamera-clipgrip.stl b/3d/tarina-picamera-clipgrip.stl
Binary files differ.
diff --git a/docs/wiring.svg b/docs/wiring.svg
@@ -901,25 +901,25 @@
transform="scale(-1)" />
<path
style="fill:none;fill-rule:evenodd;stroke:#c40000;stroke-width:0.978723;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 17.709959,257.56988 0,19.20596 H 83.13183 v -14.93707 h 17.18567"
+ d="m 26.671785,257.56988 v 19.20596 l 56.460045,0 v -14.93707 h 17.18567"
id="path5069"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.978723;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 20.908522,257.37415 0,22.53366 H 85.1395 v -14.85677 h 14.696161"
+ d="m 23.646892,257.37415 v 22.53366 l 61.492608,0 v -14.85677 h 14.696161"
id="path5071"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#00bb00;stroke-width:0.978723;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 23.278565,257.45035 0,25.42883 H 87.4684 v -15.178 h 12.367261"
+ d="m 20.908522,257.37415 v 24.89966 l 66.559878,0.60537 v -15.178 h 12.367261"
id="path5073"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#bb00ff;stroke-width:0.978723;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 26.486587,257.4504 0.115041,28.36288 63.356292,-0.0431 v -15.57955 h 10.038351"
+ d="m 17.787728,257.4504 0.115041,28.36288 72.055151,-0.0431 v -15.57955 h 10.038351"
id="path5075"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
diff --git a/install.sh b/install.sh
@@ -83,13 +83,30 @@ echo "Tarina configuration seems to be in order in /boot/config.txt"
echo "Adding to /boot/config.txt"
cat <<'EOF' >> /boot/config.txt
#-----Tarina configuration starts here-------
-#tarina-rpi-configuration-1.1
-#hyperpixel
+#tarina-rpi-configuration-ugeek-1.0
+#Rpi-hd-tft
+dtoverlay=dpi18
+overscan_left=0
+overscan_right=0
+overscan_top=0
+overscan_bottom=0
+framebuffer_width=800
+framebuffer_height=480
+enable_dpi_lcd=1
+display_default_lcd=1
+dpi_group=2
+dpi_mode=87
+dpi_output_format=0x6f015
+hdmi_timings=480 0 16 16 24 800 0 4 2 2 0 0 0 60 0 32000000 6
+dtoverlay=pi3-disable-bt-overlay
+dtoverlay=i2c-gpio,i2c_gpio_scl=24,i2c_gpio_sda=23framebuffer_height=480
+display_rotate=3
start_x=1
gpu_mem=256
disable_splash=1
force_turbo=1
boot_delay=1
+dtparam=i2c_arm=on
# dtparam=sd_overclock=90
# Disable the ACT LED.
dtparam=act_led_trigger=none
@@ -97,26 +114,6 @@ dtparam=act_led_activelow=off
# Disable the PWR LED.
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off
-framebuffer_width=800
-framebuffer_height=480
-#hdmi_force_hotplug=1
-hdmi_group=1
-hdmi_mode=3
-[EDID=N/A-] ##Hyperpixel HD CONFIG
-
-dtoverlay=hyperpixel4
-overscan_left=0
-overscan_right=0
-overscan_top=0
-overscan_bottom=0
-enable_dpi_lcd=1
-display_default_lcd=1
-display_rotate=1
-dpi_group=2
-hdmi_group=2
-dpi_mode=87
-dpi_output_format=0x7f216
-hdmi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6
#--------Tarina configuration end here---------
EOF
@@ -132,7 +129,7 @@ echo "Tarina configuration seems to be in order in /boot/config.txt"
echo "Adding to /boot/config.txt"
cat <<'EOF' >> /boot/config.txt
#-----Tarina configuration starts here-------
-#tarina-rpi-configuration-1.0
+#tarina-rpi-configuration-hyperpixel-1.0
#hyperpixel
start_x=1
gpu_mem=256
@@ -146,6 +143,12 @@ dtparam=act_led_activelow=off
# Disable the PWR LED.
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off
+framebuffer_width=800
+framebuffer_height=480
+#hdmi_force_hotplug=1
+hdmi_group=1
+hdmi_mode=3
+[EDID=N/A-] ##Hyperpixel HD CONFIG
dtoverlay=hyperpixel4
overscan_left=0
@@ -156,9 +159,11 @@ enable_dpi_lcd=1
display_default_lcd=1
display_rotate=1
dpi_group=2
+hdmi_group=2
dpi_mode=87
dpi_output_format=0x7f216
hdmi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6
+
#--------Tarina configuration end here---------
EOF
else
diff --git a/tarina.py b/tarina.py
@@ -932,17 +932,19 @@ def main():
if a == camselected:
if camera_recording == a:
if a==0:
- pressed="retake_now"
- retake = True
- camera_recording=None
+ if recording == True:
+ pressed="retake_now"
+ retake = True
+ camera_recording=None
else:
sendtocamera(i,port,'STOPRETAKE')
camera_recording=None
else:
if a==0:
- pressed="retake_now"
- retake = True
- camera_recording=0
+ if recording == False:
+ pressed="retake_now"
+ retake = True
+ camera_recording=0
else:
sendtocamera(i,port,'RETAKE:'+str(shot))
camera_recording=camselected
@@ -969,7 +971,8 @@ def main():
a=a+1
elif pressed == "record" and camera_recording != None:
if camera_recording == 0:
- pressed='record_now'
+ if recording == True:
+ pressed='record_now'
else:
sendtocamera(cameras[camera_recording],port,'STOP')
camera_recording=None
@@ -1084,7 +1087,8 @@ def main():
delayedstop=c
elif a == newselected:
if a == 0:
- pressed='record_now'
+ if recording == False:
+ pressed='record_now'
else:
sendtocamera(c,port,'REC')
camera_recording=newselected
@@ -1098,7 +1102,8 @@ def main():
if delayedstop:
time.sleep(0.05)
if delayedstop==cameras[0]:
- pressed='record_now'
+ if recording == True:
+ pressed='record_now'
pressagain='insert_shot'
else:
sendtocamera(delayedstop,port,'STOP')
@@ -2080,6 +2085,7 @@ def countshots(filmname, filmfolder, scene):
def counttakes(filmname, filmfolder, scene, shot):
takes = 0
+ doubles = ''
try:
allfiles = os.listdir(filmfolder + filmname + '/scene' + str(scene).zfill(3) + '/shot' + str(shot).zfill(3))
except:
@@ -2087,7 +2093,9 @@ def counttakes(filmname, filmfolder, scene, shot):
return takes
for a in allfiles:
if '.mp4' in a or '.h264' in a:
- takes = takes + 1
+ if not doubles.replace('.h264', '.mp4') == a:
+ takes = takes + 1
+ doubles = a
return takes
#-----------Count videos on floor-----
@@ -2915,6 +2923,8 @@ def organize(filmfolder, filmname):
print('appending: '+origin)
origin_files.append(origin)
origin_scene_files.append(origin)
+ if os.path.isfile(takename+'.h264'):
+ print('oh no boubles found!')
if '.h264' in s:
origin=os.path.realpath(takename+'.h264')
if origin != os.path.abspath(takename+'.h264'):
@@ -2940,7 +2950,7 @@ def organize(filmfolder, filmname):
logger.info(s)
#time.sleep(5)
compileshot(takename,filmfolder,filmname)
- #organized_nr -= 1
+ organized_nr -= 1
organized_nr += 1
origin_files.extend(origin_scene_files)
with open(filmfolder+filmname+'/'+i+'/.origin_videos', 'w') as outfile:
@@ -3197,7 +3207,7 @@ def renderaudio(audiofiles, filename, dubfiles, dubmix):
audiomerge = ['sox']
#if render > 2:
# audiomerge.append(filename + '.wav')
- if len(audiofiles) > 1:
+ if isinstance(audiofiles, list):
for f in audiofiles:
audiomerge.append(f + '.wav')
audiomerge.append(filename + '.wav')
@@ -3276,12 +3286,14 @@ def rendershot(filmfolder, filmname, renderfilename, scene, shot):
#take = counttakes(filmname, filmfolder, scene, shot)
#renderfilename = filmfolder + filmname + '/scene' + str(scene).zfill(3) + '/shot' + str(shot).zfill(3) + '/take' + str(take).zfill(3)
# Video Hash
- compileshot(renderfilename,filmfolder,filmname)
- videohash = videohash + str(int(countsize(renderfilename + '.mp4')))
- print('Videohash of shot is: ' + videohash)
#if something shutdown in middle of process
if os.path.isfile(renderfilename + '_tmp.mp4') == True:
os.system('cp ' + renderfilename + '_tmp.mp4 ' + renderfilename + '.mp4')
+ compileshot(renderfilename,filmfolder,filmname)
+ videohash = videohash + str(int(countsize(renderfilename + '.mp4')))
+ print('Videohash of shot is: ' + videohash)
+ #if os.path.isfile(renderfilename + '.h264') and os.path.isfile(renderfilename + '.mp4'):
+ # os.system('rm ' + renderfilename + '.h264 ')
scenedir = filmfolder + filmname + '/scene' + str(scene).zfill(3) + '/shot' + str(shot).zfill(3) + '/'
# Check if video corrupt
renderfix = False
@@ -3391,11 +3403,11 @@ def renderscene(filmfolder, filmname, scene):
renderfixscene = True
print('Scene lenght ' + videolenght)
if videolenght == '':
- print('Okey, scene file not found or is corrupted')
+ print('Okey, hold your horses, rendering!')
# For backwards compatibility remove old rendered scene files
#run_command('rm ' + renderfilename + '.mp4')
#run_command('rm ' + renderfilename + '.wav')
- vumetermessage('corrupted scene file! removing, please render again')
+ #vumetermessage('corrupted scene file! removing, please render again')
renderfixscene = True
#return '', ''
# Video Hash
@@ -3406,8 +3418,13 @@ def renderscene(filmfolder, filmname, scene):
scene = int(p.rsplit('scene',1)[1][:3])
shot = int(p.rsplit('shot',1)[1][:3])
rendershotname, renderfix = rendershot(filmfolder, filmname, p, scene, shot)
+ if renderfix == True:
+ renderfixscene = True
if rendershotname:
- videohash = videohash + str(int(countsize(p + '.mp4')))
+ try:
+ videohash = videohash + str(int(countsize(p + '.mp4')))
+ except:
+ print('no file? ')
print('Videohash of scene is: ' + videohash)
try:
with open(scenedir + '.videohash', 'r') as f: