This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A script to process a series of movies generated by a RoadHawk DC-2 | |
# or similar dashcam into a timelapse. | |
# | |
# timelapse.sh <movie directory> <date base> <temp image dir> <output movie> | |
# | |
# eg: timelapse.sh tripname 1006 images 20181006.mp4 | |
DIR=$1 # The directory containing the source movie files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
rm -f video.mp4 files.txt | |
for i in *.jpg; do | |
echo "file '$i'" >> files.txt | |
done | |
echo "Processing" `cat files.txt | wc -l` "files..." | |
ffmpeg -r 20 -f concat -i files.txt -vcodec libx264 video.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Extracting 1 second frames..." | |
cd source | |
for i in *.MP4; do | |
BASE=`basename $i .MP4` | |
if [ ! -d "../timelapse/${BASE}" ]; then | |
echo "Converting $BASE..." | |
mkdir "../timelapse/${BASE}" | |
ffmpeg -i $i -vf fps=1 -threads 1 "../timelapse/${BASE}/%03d.jpg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($subscription -> {"id"}) { | |
# Note: herein lies a problem. At this point, we have a pre-existing subscription, that | |
# may or may not be a user's. If it is a user's, it may be active, or have an inactive | |
# alternate email associated with it - potentially sharing an email with an email-only | |
# subscription. Consider the following: | |
# | |
# Anonymous User sets up subscription s0 to f0, f1 using email e0, system sends auth | |
# code to e0, user activates it to prove ownership. | |
# Anonymous user later gets an account, but it is set up to use email e1. User logs in, | |
# and creates subscription s1 to f1 and f2 using alternate email e0, system sends auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use v5.12; | |
use utf8; | |
sub имя_функции { | |
my $параметр = shift; | |
print "переменная: $параметр\n"; | |
} |