commit ad0d919d1899641a275be929ef69cc230cbc70d7
parent d4368d3a9e21aa89d99b0e13a44cc72f29115e00
Author: rob <rob@tarina.org>
Date: Thu, 28 Dec 2023 09:39:21 +0200
Merge branch 'master' of https://git.tarina.org/gonzopi
Diffstat:
8 files changed, 168 insertions(+), 43 deletions(-)
diff --git a/README.md b/README.md
@@ -28,6 +28,9 @@ Software
- stream a film a take or a scene through the network
- control the camera with silent physical buttons or a usb-wireless-keyboard or through a built in apache2 web server or ssh or ports, you choose how to go gonzo just the way you like it
+### GUI
+![GUI](/extras/gonzopi-gui.jpeg)
+
### Buttons
![Buttons](/extras/buttons.png)
diff --git a/VERSION b/VERSION
@@ -1,2 +1,2 @@
-1.44
+1.47
Jackson
diff --git a/gonzopi.py b/gonzopi.py
@@ -89,8 +89,8 @@ def main():
gonzopifolder = os.getcwd()
#MENUS
- standardmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'UPDATE', 'UPLOAD', 'BACKUP', 'LOAD', 'NEW', 'TITLE', 'LIVE:'
- gonzopictrlmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'CAMERA:', 'Add CAMERA', 'New FILM', 'New SCENE', 'Sync SCENE'
+ standardmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'SFX:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'UPDATE', 'UPLOAD', 'BACKUP', 'LOAD', 'NEW', 'TITLE', 'LIVE:'
+ gonzopictrlmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'SFX:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'CAMERA:', 'Add CAMERA', 'New FILM', 'New SCENE', 'Sync SCENE'
#gonzopictrlmenu = "BACK","CAMERA:", "Add CAMERA","New FILM","","New SCENE","Sync SCENE","Snapshot"
emptymenu='','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''
menu = standardmenu
@@ -106,12 +106,14 @@ def main():
awb = 'auto', 'sunlight', 'cloudy', 'shade', 'tungsten', 'fluorescent', 'incandescent', 'flash', 'horizon'
awbx = 0
awb_lock = 'no'
+ effects = 'none', 'negative', 'solarize'
+ effectselected = 0
cammode = 'film'
camera_model=''
fps = 25
fps_selected=8
fps_selection=[]
- quality = 27
+ quality = 25
profilelevel='4.2'
headphoneslevel = 40
miclevel = 50
@@ -191,6 +193,14 @@ def main():
#Make screen shut off work and run full brightness
run_command('gpio -g mode 19 pwm ')
run_command('gpio -g pwm 19 1023')
+
+ #CHECK IF FILMING TO USB STORAGE
+ filmfolderusb=usbfilmfolder()
+ if filmfolderusb:
+ filmfolder=filmfolderusb
+ if os.path.isdir(filmfolder) == False:
+ os.makedirs(filmfolder)
+
#COUNT DISKSPACE
disk = os.statvfs(filmfolder)
diskleft = str(int(disk.f_bavail * disk.f_frsize / 1024 / 1024 / 1024)) + 'Gb'
@@ -209,6 +219,7 @@ def main():
oldscene = scene
oldshot = shot
oldtake = take
+
#TURN ON WIFI AND TARINA SERVER
serverstate = 'on'
wifistate = 'on'
@@ -261,7 +272,6 @@ def main():
serverstate_old='off'
wifistate_old='off'
- camera_model, camera_revision, filmfolder= getconfig(camera)
#--------------MAIN LOOP---------------#
while True:
@@ -432,7 +442,7 @@ def main():
if dubfiles==[]:
print('no dubs, copying original sound to original')
os.system('cp '+saveoriginal+' '+dubfolder+'original.wav')
- time.sleep(2)
+ time.sleep(0.2)
renderfilename, newaudiomix = rendershot(filmfolder, filmname, foldername+filename, scene, shot)
playdub(filmname,renderfilename, 'dub')
#run_command('sox -V0 -G /dev/shm/dub.wav -c 2 ' + newdub)
@@ -743,8 +753,28 @@ def main():
showmenu_settings = True
#DSK
elif pressed == 'middle' and menu[selected] == 'DSK:':
- print("clean up film folder here")
- #cleanupdisk(filmname,filmfolder)
+ print("usb filmfolder")
+ filmfolderusb=usbfilmfolder()
+ if filmfolderusb:
+ filmfolder=filmfolderusb
+ #COUNT DISKSPACE
+ #sudo mkfs -t ext4 /dev/sdb1
+ disk = os.statvfs(filmfolder)
+ diskleft = str(int(disk.f_bavail * disk.f_frsize / 1024 / 1024 / 1024)) + 'Gb'
+ #LOAD FILM AND SCENE SETTINGS
+ try:
+ filmname = getfilms(filmfolder)[0][0]
+ except:
+ filmname = 'onthefloor'
+ try:
+ filmname_back = getfilms(filmfolder)[0][1]
+ except:
+ filmname_back = 'onthefloor'
+ if os.path.isdir(filmfolder) == False:
+ os.makedirs(filmfolder)
+ #loadfilmsettings = True
+ updatethumb = True
+ #cleanupdisk(filmname,filmfolder)
#REMOVE DELETE
#take
elif pressed == 'remove' and menu[selected] == 'TAKE:':
@@ -1181,7 +1211,7 @@ def main():
vumetermessage('Filming was canceled!!')
elif recording == True and float(time.time() - starttime) > 0.2:
#print(term.clear+term.home)
- disk = os.statvfs(gonzopifolder + '/')
+ disk = os.statvfs(filmfolder)
diskleft = str(int(disk.f_bavail * disk.f_frsize / 1024 / 1024 / 1024)) + 'Gb'
recording = False
if showmenu_settings == True:
@@ -1302,6 +1332,10 @@ def main():
camera.contrast = min(camera.contrast + 1, 99)
elif menu[selected] == 'SAT:':
camera.saturation = min(camera.saturation + 1, 99)
+ elif menu[selected] == 'SFX:':
+ if effectselected < len(effects) - 1:
+ effectselected += 1
+ camera.image_effect = effects[effectselected]
elif menu[selected] == 'SHUTTER:':
if camera.shutter_speed == 0:
camera.shutter_speed = camera.exposure_speed
@@ -1399,6 +1433,7 @@ def main():
camera.close()
camera = startcamera(lens,fps)
loadfilmsettings = True
+ flushbutton()
elif menu[selected] == 'LENS:':
s = 0
for a in lenses:
@@ -1428,8 +1463,9 @@ def main():
fps=fps_selection[fps_selected]
camera.framerate = fps
elif menu[selected] == 'Q:':
- if quality < 39:
- quality += 1
+ if scenes == 0:
+ if quality < 39:
+ quality += 1
elif menu[selected] == 'CAMERA:':
if camselected < len(cameras)-1:
newselected = camselected+1
@@ -1462,6 +1498,10 @@ def main():
camera.contrast = max(camera.contrast - 1, -100)
elif menu[selected] == 'SAT:':
camera.saturation = max(camera.saturation - 1, -100)
+ elif menu[selected] == 'SFX:':
+ if effectselected > 0:
+ effectselected -= 1
+ camera.image_effect = effects[effectselected]
elif menu[selected] == 'SHUTTER:':
if camera.shutter_speed == 0:
camera.shutter_speed = camera.exposure_speed
@@ -1562,6 +1602,7 @@ def main():
camera.close()
camera = startcamera(lens,fps)
loadfilmsettings = True
+ flushbutton()
elif menu[selected] == 'LENS:':
s = 0
for a in lenses:
@@ -1596,8 +1637,9 @@ def main():
fps=fps_selection[fps_selected]
camera.framerate = fps
elif menu[selected] == 'Q:':
- if quality > 10:
- quality -= 1
+ if scenes == 0:
+ if quality > 10:
+ quality -= 1
elif menu[selected] == 'CAMERA:':
if camselected > 0:
newselected = camselected-1
@@ -1654,6 +1696,9 @@ def main():
camera.hflip = True
run_command('amixer -c 0 sset Mic ' + str(miclevel) + '% unmute')
run_command('amixer -c 0 sset Speaker ' + str(headphoneslevel) + '%')
+ print('fuckme')
+ print(filmfolder)
+ print(filmname)
origin_videos=organize(filmfolder, filmname)
print('ORIGIN')
print(origin_videos)
@@ -1738,12 +1783,12 @@ def main():
lastmenu = menu[selected]
if showgonzopictrl == False:
menu = standardmenu
- settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(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), '', cammode, diskleft, '', serverstate, searchforcameras, wifistate, '', '', '', '', '', '', live
+ settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), effects[effectselected], str(flip), str(beeps), str(round(reclenght,2)), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, diskleft, '', serverstate, searchforcameras, wifistate, '', '', '', '', '', '', live
else:
#gonzopictrlmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'CAMERA:', 'Add CAMERA', 'New FILM', 'Sync FILM', 'Sync SCENE'
menu = gonzopictrlmenu
#settings = '',str(camselected),'','',rectime,'','','','','','','','','',''
- settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(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), '', cammode, diskleft, '', serverstate, searchforcameras, wifistate, str(camselected), '', '', '', '', '', ''
+ settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), effects[effectselected], str(flip), str(beeps), str(reclenght), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, diskleft, '', serverstate, searchforcameras, wifistate, str(camselected), '', '', '', '', '', ''
#Rerender menu if picamera settings change
#if settings != oldsettings or selected != oldselected:
writemenu(menu,settings,selected,'',showmenu)
@@ -1783,7 +1828,7 @@ def main():
if searchforcameras == 'on':
camerasconnected='searching '+str(pingip)
vumetermessage('filming with '+camera_model +' ip:'+ network + ' '+camerasconnected)
- disk = os.statvfs(gonzopifolder + '/')
+ disk = os.statvfs(filmfolder)
diskleft = str(int(disk.f_bavail * disk.f_frsize / 1024 / 1024 / 1024)) + 'Gb'
#print(term.yellow+'filming with '+camera_model +' ip:'+ network
print(camselected,camera_recording,cameras)
@@ -3093,7 +3138,7 @@ def compileshot(filename,filmfolder,filmname):
run_command('mv /dev/shm/temp.wav '+ filename + '.wav')
stretchaudio(filename,fps)
audiosync, videolenght, audiolenght = audiotrim(filename, 'end','')
- muxing = False
+ muxing = True
if muxing == True:
#muxing mp3 layer to mp4 file
#count estimated audio filesize with a bitrate of 320 kb/s
@@ -4310,6 +4355,42 @@ def audiosilence(foldername,filename):
os.system('cp /dev/shm/silence.wav ' + foldername + filename + '.wav')
os.system('rm /dev/shm/silence.wav')
+#--------------USB filmfolder-------------------
+
+def usbfilmfolder():
+ pressed = ''
+ buttonpressed = ''
+ buttontime = time.time()
+ holdbutton = ''
+ writemessage('Searching for usb storage device, middlebutton to cancel')
+ usbmount = 0
+ while True:
+ pressed, buttonpressed, buttontime, holdbutton, event, keydelay = getbutton(pressed, buttonpressed, buttontime, holdbutton)
+ usbconnected = os.path.ismount('/media/usb'+str(usbmount))
+ if pressed == 'middle':
+ writemessage('canceling..')
+ time.sleep(2)
+ break
+ time.sleep(0.02)
+ if usbconnected == True:
+ try:
+ os.makedirs('/media/usb'+str(usbmount)+'/gonzopifilms/')
+ except:
+ pass
+ try:
+ p = subprocess.check_output('stat -f -c %T /media/usb'+str(usbmount), shell=True)
+ filesystem = p.decode()
+ print('filesystem info: ' + filesystem)
+ except:
+ writemessage('Oh-no! dont know your filesystem')
+ waitforanykey()
+ filmfolder = '/media/usb'+str(usbmount)+'/gonzopifilms/'
+ #run_command('pumount /media/usb'+str(usbmount))
+ writemessage('Filming to USB'+str(usbmount))
+ return filmfolder
+ else:
+ usbmount = usbmount + 1
+
#--------------Copy to USB-------------------
def copytousb(filmfolder):
@@ -4331,7 +4412,7 @@ def copytousb(filmfolder):
if usbconnected == True:
#Copy new files to usb device
try:
- os.makedirs('/media/usb0/gonzopifilms/')
+ os.makedirs('/media/usb'+str(usbmount)+'/gonzopifilms/')
except:
pass
try:
@@ -4345,7 +4426,7 @@ def copytousb(filmfolder):
for filmname in films:
#check filmhash
filmname = filmname[0]
- usbpath = '/media/usb0/gonzopifilms/'+filmname
+ usbpath = '/media/usb'+str(usbmount)+'/gonzopifilms/'+filmname
usbvideopath = '/media/usb0/gonzopifilms/.videos/'
usbfilmhash = ''
filmhash = ''
@@ -4387,7 +4468,7 @@ def copytousb(filmfolder):
run_command('sync')
writemessage('all files copied successfully!')
waitforanykey()
- run_command('pumount /media/usb0')
+ run_command('pumount /media/usb'+str(usbmount))
writemessage('You can safely unplug the usb device now')
time.sleep(2)
return
diff --git a/gui/Makefile.include b/gui/Makefile.include
@@ -1,9 +1,9 @@
CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi
-LDFLAGS+=-L$(SDKSTAGE)/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L$(SDKSTAGE)/home/pi/tarinaretake/gui/libs/ilclient -L$(SDKSTAGE)/home/pi/tarinaretake/gui/libs/vgfont
+LDFLAGS+=-L$(SDKSTAGE)/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L$(SDKSTAGE)/home/pi/gonzopi/gui/libs/ilclient -L$(SDKSTAGE)/home/pi/gonzopi/gui/libs/vgfont
-INCLUDES+=-I$(SDKSTAGE)/opt/vc/include/ -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux -I./ -I$(SDKSTAGE)/home/pi/tarinaretake/gui/libs/ilclient -I$(SDKSTAGE)/home/pi/tarinaretake/gui/libs/vgfont
+INCLUDES+=-I$(SDKSTAGE)/opt/vc/include/ -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux -I./ -I$(SDKSTAGE)/home/pi/gonzopi/gui/libs/ilclient -I$(SDKSTAGE)/home/pi/gonzopi/gui/libs/vgfont
all: $(BIN) $(LIB)
diff --git a/gui/src/main.c b/gui/src/main.c
@@ -260,15 +260,15 @@ int main(void)
render_subtitle(img, line, text_size, text_size_selected, row2, y_offset3, color);
row2 += read * space + morespace;
}
- if (linenr >= 13+menuadd && linenr <= 20+menuadd){
+ if (linenr >= 13+menuadd && linenr <= 19+menuadd){
render_subtitle(img, line, text_size, text_size_selected, row3, y_offset4, color);
row3 += read * space + morespace;
}
- if (linenr >= 21+menuadd && linenr <= 27+menuadd){
+ if (linenr >= 20+menuadd && linenr <= 28+menuadd){
render_subtitle(img, line, text_size, text_size_selected, row4, y_offset5, color);
row4 += read * space + morespace;
}
- if (linenr >= 28+menuadd && linenr <= 40+menuadd){
+ if (linenr >= 29+menuadd && linenr <= 40+menuadd){
render_subtitle(img, line, text_size, text_size_selected, row5, y_offset6, color);
row5 += read * space + morespace;
}
diff --git a/gui/tarinagui.bin b/gui/tarinagui.bin
Binary files differ.
diff --git a/srv/gonzopiserver.py b/srv/gonzopiserver.py
@@ -8,20 +8,61 @@ import sys
import time
import random
import hashlib
+import configparser
# Get path of the current dir, then use it as working directory:
rundir = os.path.dirname(__file__)
if rundir != '':
os.chdir(rundir)
-filmfolder = '/home/pi/Videos/'
+#--------------USB filmfolder-------------------
-basedir = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(basedir)
+def usbfilmfolder():
+ usbmount = 0
+ while True:
+ usbconnected = os.path.ismount('/media/usb'+str(usbmount))
+ time.sleep(0.02)
+ if usbconnected == True:
+ try:
+ os.makedirs('/media/usb'+str(usbmount)+'/gonzopifilms/')
+ except:
+ pass
+ try:
+ p = subprocess.check_output('stat -f -c %T /media/usb'+str(usbmount), shell=True)
+ filesystem = p.decode()
+ print('filesystem info: ' + filesystem)
+ except:
+ print('Oh-no! dont know your filesystem')
+ filmfolder = '/media/usb'+str(usbmount)+'/gonzopifilms/'
+ return filmfolder
+ else:
+ usbmount = usbmount + 1
+ if usbmount > 20:
+ break
+
+home = os.path.expanduser('~')
+configfile = home + '/.gonzopi/config.ini'
+configdir = os.path.dirname(configfile)
+config = configparser.ConfigParser()
+if config.read(configfile):
+ filmfolder = config['USER']['filmfolder']+'/'
-# Link video directory to static dir
-if os.path.isfile('static/Videos') == False:
+
+os.system("unlink static/*")
+#CHECK IF FILMING TO USB STORAGE
+filmfolderusb=usbfilmfolder()
+if filmfolderusb:
+ filmfolder=filmfolderusb
+ # Link video directory to static dir
+ os.system("ln -s -t static/ " + filmfolder)
+ filmfolder='static/gonzopifilms/'
+else:
os.system("ln -s -t static/ " + filmfolder)
+ filmfolder='static/Videos/'
+ #fix filmfolder root to Videos/gonzopifilms
+
+basedir = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(basedir)
films = []
@@ -153,7 +194,7 @@ class index:
renderedfilms = []
unrenderedfilms = []
for f in films:
- if os.path.isfile('static/Videos/' + f[0] + '/' + f[0] + '.mp4') == True:
+ if os.path.isfile(filmfolder + f[0] + '/' + f[0] + '.mp4') == True:
renderedfilms.append(f[0])
else:
unrenderedfilms.append(f[0])
@@ -216,7 +257,7 @@ class index:
take=1
session.reload = 0
if i.func == 'retake':
- print(i.func+'fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuiccccccccccccccccccccccccccccccccccccccccckkkkkkkkkkkkkkkkkkkkkkkkkk')
+ print(i.func)
if recording == False:
sendtocamera(ip,port,'RETAKE:'+shot)
recording = True
@@ -227,12 +268,12 @@ class index:
time.sleep(1)
session.reload = 1
raise web.seeother('/')
- thumb="/static/Videos/"+name+"/scene"+str(scene).zfill(3)+"/shot"+str(shot).zfill(3)+"/picture"+str(take).zfill(3)+".jpeg"
+ thumb=filmfolder+name+"/scene"+str(scene).zfill(3)+"/shot"+str(shot).zfill(3)+"/picture"+str(take).zfill(3)+".jpeg"
print(thumb)
if os.path.isfile(basedir+thumb) == False:
print(basedir+thumb)
thumb=''
- return render.index(renderedfilms, unrenderedfilms, session.cameras, menu, selected,name,scene,shot,take,str,session.randhash,thumb,vumetermessage,i.func)
+ return render.index(renderedfilms, unrenderedfilms, session.cameras, menu, selected,name,scene,shot,take,str,session.randhash,thumb,vumetermessage,i.func,filmfolder)
class films:
def GET(self, film):
diff --git a/srv/templates/index.html b/srv/templates/index.html
@@ -1,4 +1,4 @@
-$def with (renderedfilms, unrenderedfilms, cameras, menu, selected,name,scene,shot,take,str,randhash,thumb,vumetermessage,func)
+$def with (renderedfilms, unrenderedfilms, cameras, menu, selected,name,scene,shot,take,str,randhash,thumb,vumetermessage,func,filmfolder)
$var renderedfilms = renderedfilms
$var unrenderedfilms = unrenderedfilms
<script>
@@ -50,14 +50,14 @@ $for m in menu[3:]:
<br>
</div>
$if thumb != '':
- $ picture="static/Videos/" + name + "/scene" + str(scene).zfill(3) + "/shot" + str(shot).zfill(3) + "/picture" + str(take).zfill(3) + ".jpeg"
+ $ picture=filmfolder + name + "/scene" + str(scene).zfill(3) + "/shot" + str(shot).zfill(3) + "/picture" + str(take).zfill(3) + ".jpeg"
$else:
- $ picture="static/Videos/" + name + "/scene" + str(scene).zfill(3) + "/shot" + str(shot).zfill(3) + "/take" + str(take).zfill(3) + ".jpeg"
+ $ picture=filmfolder + name + "/scene" + str(scene).zfill(3) + "/shot" + str(shot).zfill(3) + "/take" + str(take).zfill(3) + ".jpeg"
-$ take_link="static/Videos/" + name + "/scene" + str(scene).zfill(3) + "/shot" + str(shot).zfill(3) + "/take" + str(take).zfill(3) + ".mp4"
-$ scene_link="static/Videos/" + name + "/scene" + str(scene).zfill(3) + "/scene.mp4"
-$ film_link="static/Videos/" + name + "/" +name+ ".mp4"
+$ take_link=filmfolder + name + "/scene" + str(scene).zfill(3) + "/shot" + str(shot).zfill(3) + "/take" + str(take).zfill(3) + ".mp4"
+$ scene_link=filmfolder + name + "/scene" + str(scene).zfill(3) + "/scene.mp4"
+$ film_link=filmfolder + name + "/" +name+ ".mp4"
$if selected == 0:
<a href='$film_link'><img width="80%" src="$picture?$randhash"/></a><br>
$elif selected == 1:
@@ -71,15 +71,15 @@ $if func=='show_all_films':
$for i in renderedfilms:
<p>--------------------------------------------------------------</p>
<h2>$i</h2>
- <a href="static/Videos/$i/${i}.mp4"><img width="80%" src="static/Videos/$i/scene001/shot001/take001.jpeg?$randhash"/></a><br>
+ <a href="$filmfolder$i/${i}.mp4"><img width="80%" src="$filmfolder$i/scene001/shot001/take001.jpeg?$randhash"/></a><br>
<p>Copy project to your destination:</p>
- <pre>scp -r pi@tarina.local:~/Videos/$i ~/films/$i</pre>
+ <pre>scp -r pi@tarina.local:~$filmfolder$i ~/films/$i</pre>
<h1>Films unrendered</h1>
$for i in unrenderedfilms:
<h2>$i </h2>
<p>Copy project to your destination:</p>
- <pre>scp -r pi@tarina.local:~/Videos/$i ~/films/$i</pre>
+ <pre>scp -r pi@tarina.local:$filmfolder$i ~/films/$i</pre>
<script>
$$('#LEFT').on('click', function () { window.open('?func=left',"_self");return false; });