tarina

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

commit a0f28d8ca515fa477136a25031086271254a13e7
parent 9f9ea5fe4493490f4847a580694238ee2decf510
Author: rbckman <robinbackman@gmail.com>
Date:   Mon, 20 Aug 2018 20:20:55 +0300

warning message if video dropped frames

Diffstat:
Mtarina.py | 10+++++++---
Avc/src/hello_pi/hello_interface/Andale_Mono.ttf | 0
Mvc/src/hello_pi/hello_interface/camerainterface.bin | 0
Mvc/src/hello_pi/hello_interface/main.c | 4++--
4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/tarina.py b/tarina.py @@ -899,6 +899,9 @@ def audiodelay(foldername, filename): os.system('sox /dev/shm/' + filename + '.wav ' + foldername + filename + '_temp.wav trim 0 -0.' + str(audiosync).zfill(3)) os.system('sox -G ' + foldername + filename + '_temp.wav ' + foldername + filename + '.wav fade 0.01 0 0.01') os.remove(foldername + filename + '_temp.wav') + if int(audiosync) > 200: + writemessage('WARNING!!! VIDEO FRAMES DROPPED!') + time.sleep(10) delayerr = 'A' + str(audiosync) else: #calculate difference @@ -911,7 +914,7 @@ def audiodelay(foldername, filename): print('Videofile is: ' + str(audiosyncs) + 's ' + str(audiosyncms) + 'ms longer') #make the delay file os.system('sox -n -r 44100 -c 1 /dev/shm/silence.wav trim 0.0 ' + str(audiosyncs) + '.' + str(audiosyncms).zfill(3)) - os.system('sox /dev/shm/' + filename + '.wav /dev/shm/silence.wav ' + foldername + filename + '.wav') + os.system('sox /dev/shm/' + filename + '.wav /dev/shm/silence.wav ' + foldername + filename + '_temp.wav') os.system('sox -G ' + foldername + filename + '_temp.wav ' + foldername + filename + '.wav fade 0.01 0 0.01') os.remove(foldername + filename + '_temp.wav') delayerr = 'V' + str(audiosyncs) + 's ' + str(audiosyncms) + 'ms' @@ -1072,6 +1075,7 @@ def startinterface(): curses.noecho() screen.nodelay(1) curses.curs_set(0) + screen.clear() return screen def stopinterface(camera): @@ -1178,7 +1182,7 @@ def main(): screen = startinterface() camera = startcamera() - + time.sleep(1) #LOAD FILM AND SCENE SETTINGS filmname = getfilms(filmfolder)[0][0] @@ -1187,7 +1191,7 @@ def main(): try: camera.brightness, camera.contrast, camera.saturation, camera.shutter_speed, camera.iso, camera.awb_mode, camera.awb_gains, awb_lock, miclevel, headphoneslevel, beeps, flip, renderscene, renderfilm = loadsettings(filmfolder, filmname) except: - print "no" + print "no settings loaded" #FILE & FOLDER NAMES diff --git a/vc/src/hello_pi/hello_interface/Andale_Mono.ttf b/vc/src/hello_pi/hello_interface/Andale_Mono.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/camerainterface.bin b/vc/src/hello_pi/hello_interface/camerainterface.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/main.c b/vc/src/hello_pi/hello_interface/main.c @@ -48,7 +48,7 @@ int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const ui graphics_resource_render_text_ext(img, x_offset, y_offset-height, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(80,80,80,0xff), /* fg */ + GRAPHICS_RGBA32(100,100,100,0xff), /* fg */ GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ text, 74, text_size); } @@ -81,7 +81,7 @@ int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const ui GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, GRAPHICS_RGBA32(255,255,255,0xff), /* fg */ - GRAPHICS_RGBA32(20,0,20,0xff), /* bg */ + GRAPHICS_RGBA32(50,50,50,0xff), /* bg */ text, 74, text_size); } return 0;