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
try:
src = sys.argv[1]
except IndexError:
src = "."
try:
dst = sys.argv[2]
except IndexError:
dst = "."
lst = os.listdir(src)
lst.sort()
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}"
subprocess.check_output(cmd,shell=True)
#convert 1562389949_821613_0.jpeg -pointsize 100 -fill black -undercolor white -gravity southwest -annotate +10+10 "filename" test.jpeg
#!/bin/sh
rm lwir.mov
cat lwir_jpeg/*.jpeg | ffmpeg -framerate 20 -f image2pipe -i - lwir.mov
#!/usr/bin/sh
#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
#!/bin/sh
rm visible.mov
cat visible_jpeg_annotated/*.jpeg | ffmpeg -framerate 20 -f image2pipe -i - visible.mov
#!/bin/sh
python3 batch_timestamp_annotate_jpegs.py 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