Skip to content

Instantly share code, notes, and snippets.

View ibaaj's full-sized avatar

Ismaïl Baaj ibaaj

  • Paris, France
View GitHub Profile
@ibaaj
ibaaj / fader.sh
Last active April 25, 2016 23:44
#!/bin/zsh
len=30
x=""
for i in *.mp4
do
x="$x $i -mix $len -mixer luma "
done
x="melt$x -filter greyscale -filter oldfilm -consumer avformat:fade_$(date +%s).mp4 vcodec=libx264 b=5000k acodec=aac ab=70k"
@ibaaj
ibaaj / diffimg.cpp
Created April 26, 2016 08:45
diffimg.cpp
#include <opencv/cv.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( int argc, char** argv )
{
@ibaaj
ibaaj / mirror.sh
Created May 9, 2016 12:15
A71 "surfing the clouds"
#!/bin/zsh
mkdir -p {frames,ftop,fbottom,final};
ffmpeg -i IMG_7197.mov -r 25 -qscale:v 2 frames/%05d.jpg ;
framesNumber=$(ls ./frames/*.jpg |wc -l|tr -d ' ');
C_H=540
H=1280
@ibaaj
ibaaj / fix-scoping.sh
Last active May 10, 2016 05:46
fix-scoping.sh
#!/bin/zsh
mkdir -p {frames,final};
ffmpeg -i 03.mp4 -r 25 -qscale:v 2 frames/%05d.jpg ;
framesNumber=$(ls ./frames/*.jpg |wc -l|tr -d ' ');
W=720
@ibaaj
ibaaj / oldmov.sh
Created May 11, 2016 16:13
oldmovie avec MLT framework
#!/bin/zsh
len=30
x=""
for i in *.mp4
do
x="$x $i -mix $len -mixer luma "
done
x="melt$x -filter greyscale -filter oldfilm -consumer avformat:fade_$(date +%s).mp4 vcodec=libx264 b=5000k acodec=aac ab=70k"
@ibaaj
ibaaj / central-symmetry.sh
Last active May 14, 2016 02:02
central-symmetry.sh
#!/bin/bash
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height
if [[ $W > $H ]]; then
NW=$H;
else
NW=$W;
@ibaaj
ibaaj / hall.sh
Created May 14, 2016 03:55
hall.sh
#!/bin/bash
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height
if [[ $W > $H ]]; then
NW=$H;
else
NW=$W;
@ibaaj
ibaaj / double-down.sh
Created May 14, 2016 05:16
double-down.sh
#!/bin/bash
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height
if [[ $W > $H ]]; then
NW=$H;
else
NW=$W;
@ibaaj
ibaaj / textbuild.sh
Created May 16, 2016 21:17
TextBuilding.sh
#!/bin/bash
W=`identify ./img.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./img.jpg | cut -f 3 -d " " | sed s/.*x//` #height
convert -size ${W}x${H} xc:black -fill white -stroke black -draw "path 'M +780+1000 +2075+1054 +2431+3115 +80+2865" mask.png
convert img.jpg mask.png -alpha off -compose CopyOpacity -composite final.png
@ibaaj
ibaaj / artvid.sh
Last active June 3, 2016 12:58
artistic vid with ami-b36981d8
sudo add-apt-repository ppa:mc3man/trusty-media;
sudo apt-get update;
sudo apt-get install -y software-properties-common curl wget git libprotobuf-dev protobuf-compiler man;
sudo apt-get install ffmpeg;
luarocks install loadcaffe && luarocks install image && luarocks install nn;
luarocks install torch && \
luarocks install cutorch && \
luarocks install cunn && \
luarocks install sys;