Skip to content

Instantly share code, notes, and snippets.

Avatar

Ismaïl Baaj ibaaj

  • Paris, France
View GitHub Profile
View fader.sh
#!/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"
View 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
A71 "surfing the clouds"
View mirror.sh
#!/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
fix-scoping.sh
View 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
oldmovie avec MLT framework
View oldmov.sh
#!/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
central-symmetry.sh
View 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;
View 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;
View 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
TextBuilding.sh
View textbuild.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 Jun 3, 2016
artistic vid with ami-b36981d8
View artvid.sh
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;
You can’t perform that action at this time.