tarina

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

commit 4264a70cf08c1b1ae2c2943ddfe12b638ba6a2ea
parent 391f18f4b9402e315e6caf300d5b40d98575e004
Author: rbckman <rob@robinsfirma.com>
Date:   Fri, 10 Aug 2018 00:41:38 +0300

make second last frame thumbnail

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

diff --git a/tarina.py b/tarina.py @@ -1278,8 +1278,11 @@ def main(): except: writemessage('no audio file') time.sleep(0.5) - #render thumbnail - os.system('avconv -i ' + foldername + filename + '.mp4 -frames 1 -vf scale=800:340 ' + foldername + filename + '.png &') + #render thumbnail tenth last frame + #mediainfo --Inform='Video;%FrameCount%' $the_file + pipe = subprocess.Popen('mediainfo --Inform="Video;%FrameCount%" ' + foldername + filename + '.mp4', shell=True, stdout=subprocess.PIPE).stdout + lastframe = int(pipe.read()) - 1 + os.system('avconv -i ' + foldername + filename + '.mp4 -frames ' + str(lastframe) + ' -vf scale=800:340 ' + foldername + filename + '.png &') #TIMELAPSE elif pressed == 'middle' and menu[selected] == 'TIMELAPSE':