Commit 2e0a7227 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

scripts to create preview videos for footage

parent ab168e7e
#!/usr/bin/env python3
import sys
import os
import subprocess
src = sys.argv[1]
except IndexError:
src = "."
dst = sys.argv[2]
except IndexError:
dst = "."
lst = os.listdir(src)
for f in lst:
path = os.path.join(src,f)
if os.path.isfile(path):
print("Annotating "+f)
border = f"-border 15 -bordercolor '#00000080'"
label = f"-pointsize 100 -background none -fill white label:'{f}'"
gravity = f"-gravity southwest -geometry +30+30"
cmd = f"convert {border} {label} miff:- | composite {gravity} - {src}/{f} {dst}/{f}"
#convert 1562389949_821613_0.jpeg -pointsize 100 -fill black -undercolor white -gravity southwest -annotate +10+10 "filename" test.jpeg
cat lwir_jpeg/*.jpeg | ffmpeg -framerate 20 -f image2pipe -i -
#convert 1562389844_064093_0.tiff -crop 160x120+0+0 -auto-level test.jpeg
mogrify -crop 160x120+0+0 -auto-level -format jpeg -path ./lwir_jpeg lwir/*.tiff
cat visible_jpeg_annotated/*.jpeg | ffmpeg -framerate 20 -f image2pipe -i -
python3 visible_jpeg visible_jpeg_annotated
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment