commit ee88a5ef32ac63f8118249d80f9df387c01c44dc
parent 5c91007eac2d0ed2899eae20dc48026839db34c1
Author: rob <rob@tarina.org>
Date: Sat, 8 Apr 2023 21:05:33 +0100
audio sync once again
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tarina.py b/tarina.py
@@ -683,11 +683,11 @@ def main():
beeping = False
if os.path.isdir(foldername) == False:
os.makedirs(foldername)
- sound_start = time.time()
os.system(tarinafolder + '/alsa-utils-1.1.3/aplay/arecord -D plughw:' + str(plughw) + ' -f '+soundformat+' -c ' + str(channels) + ' -r '+soundrate+' -vv '+ foldername + filename + '.wav &')
- starttime = time.time()
+ sound_start = time.time()
if onlysound != True:
camera.start_recording(filmfolder+ '.videos/'+video_origins+'.h264', format='h264', quality=quality, level=profilelevel)
+ starttime = time.time()
recording = True
showmenu = 0
elif beepcountdown > 0 and beeping == True:
@@ -2206,7 +2206,7 @@ def compileshot(filename,filmfolder,filmname):
run_command('MP4Box -fps 25 -add ' + video_origins + '.h264 ' + video_origins + '.mp4')
os.system('ln -s '+video_origins+'.mp4 '+filename+'.mp4')
#add audio/video start delay sync
- run_command('sox -V0 '+filename+'.wav /dev/shm/temp.wav trim 0.08')
+ run_command('sox -V0 '+filename+'.wav /dev/shm/temp.wav trim 0.013')
run_command('mv /dev/shm/temp.wav '+ filename + '.wav')
stretchaudio(filename,fps)
audiosync, videolenght, audiolenght = audiotrim(filename, 'end')