Skip to content

Instantly share code, notes, and snippets.

@kiki67100
kiki67100 / ffmpeg_hardware_acceleration_h264_videotoolbox.bash
Created July 25, 2017 08:15
ffmpeg hardware accelaration mac os
#!/bin/bash
#Verify the quality with difference bitrate ( crf no work with h264_videotoolbox use -b:v )
#You can use the same audio codec change -c:a ac3 to -c:a copy i use it because it work my multimedia player
for bitrate in 500k 1000k 1500k 2500k 3000k 3500k;do
ffmpeg -i Movie.mkv -c:v h264_videotoolbox -c:a ac3 -b:a 128k -y -b:v $bitrate -ss 00:01:00 -t 00:00:10 Movie_$bitrate.mp4;
done
#With 2500k bitrate
ffmpeg -i Movie.mkv -c:v h264_videotoolbox -c:a ac3 -b:a 128k -y -b:v $bitrate -b:a 128k Movie_$bitrate.mp4;
@kiki67100
kiki67100 / IPWebcam-Android-LibPuzzle-Detect-Motion.bash
Last active March 30, 2020 17:36
Libpuzzle IP WEBCAM Android detect motion
#!/bin/bash
#Using libpuzzle trough command line tools puzzle-diff to detect difference image from IP WEBCAM Android application
#Keep in mind this not replace the real detection video, because the real detection motion use realtime detection.
#This bash script detection two image first +0s and +60s and detect the difference trough puzzle-diff
#Require "puzzle-diff" run apt-get install libpuzzle-bin
while((1));
do
@kiki67100
kiki67100 / gist:f5b421ddac9d500297b0e6471e5ef737
Created February 23, 2017 08:19
Fix ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY nginx
#Fix ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY on NGINX / SSL / SPD
#Tested on Plesk 17 NGINX / SDPY / LETSENCRYPT
#To reproduce this error you can check on Windows 7 / Chrome 47 https://www.browserling.com/
#Add this in server
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
@kiki67100
kiki67100 / gist:a08485536ca97c7f798fd9f4e041b806
Created February 10, 2017 10:03
Upgrade WordPress from wp-cli
#!/bin/bash
cd /data/www/vhosts || exit;
wp cli update --yes >> /root/cron/log-wp.txt
find . -type f -name 'wp-config.php'|while read line;
do
realpath=$(readlink -f $line);
dirname=$(dirname $realpath)