tarina

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

commit 058ec98653c9e3ec1cc560e9365e606c6557b9c0
parent a0c458e49adcac314fde090010c69d652338a545
Author: rbckman <rob@tarina.org>
Date:   Mon,  9 Mar 2020 17:11:05 +0000

use ffmpeg in debian buster

Diffstat:
Mtarina.py | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tarina.py b/tarina.py @@ -61,7 +61,7 @@ term = Terminal() #------------- The Main Thing -------------- def main(): - global tarinafolder, screen, loadfilmsettings + global tarinafolder, screen, loadfilmsettings, debianversion # Get path of the current dir, then use it as working directory: rundir = os.path.dirname(__file__) @@ -123,6 +123,10 @@ def main(): tarinaversion = f.readline() tarinavername = f.readline() + #DEBIAN VERSION + pipe = subprocess.check_output('lsb_release -c -s', shell=True) + debianversion = pipe.decode() + #Turn off hdmi to save power run_command('tvservice -o') #Kernel page cache optimization for sd card @@ -1859,7 +1863,10 @@ def renderfilm(filmfolder, filmname, comp): #count estimated audio filesize with a bitrate of 320 kb/s audiosize = countsize(renderfilename + '.wav') * 0.453 os.system('mv ' + renderfilename + '.mp4 ' + renderfilename + '_tmp.mp4') - p = Popen(['avconv', '-y', '-i', renderfilename + '.wav', '-acodec', 'libmp3lame', '-b:a', '320k', renderfilename + '.mp3']) + if debianversion == 'stretch': + p = Popen(['avconv', '-y', '-i', renderfilename + '.wav', '-acodec', 'libmp3lame', '-b:a', '320k', renderfilename + '.mp3']) + else: + p = Popen(['ffmpeg', '-y', '-i', renderfilename + '.wav', '-acodec', 'libmp3lame', '-b:a', '320k', renderfilename + '.mp3']) while p.poll() is None: time.sleep(0.2) try: