Skip to content

Instantly share code, notes, and snippets.

View ximeg's full-sized avatar

RKiselev ximeg

View GitHub Profile
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@ximeg
ximeg / README.md
Last active August 29, 2015 14:20 — forked from KonradIT/readme.md

####GoPro Protune correction, timelapse assembling, fisheye removal, slow motion, 4:3 to 16:9 and motion blur in Linux OS - GoPro Studio for Linux - KDEnlive, FFMPEG, ImageMagick, Mencoder and Python!

GoPro Studio has been tremendously useful for GoPro users, but not all GoPro users can enjoy the tool, there is no GoPro Studio for Linux. So some users made their ways to emulate GoPro Studio on Linux.

This guide is more than GoPro Studio, is a must read guide for Linux and GoPro users.

The main features of GoPro Studio are:

  • Convert and edit Protune footage and apply Protune effect.
  • Convert 4:3 footage to 16:9
  • Slow motion
@ximeg
ximeg / ThresholdingAlgo.py
Created April 20, 2017 07:20
Python implementation of smoothed z-score algorithm from http://stackoverflow.com/a/22640362/6029703
#!/usr/bin/env python
# Implementation of algorithm from http://stackoverflow.com/a/22640362/6029703
import numpy as np
import pylab
def thresholding_algo(y, lag, threshold, influence):
signals = np.zeros(len(y))
filteredY = np.array(y)
avgFilter = [0]*len(y)
stdFilter = [0]*len(y)
@ximeg
ximeg / openpgp.txt
Created September 1, 2017 12:22
Verknüpfte OpenKeychain-Identität
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:5eef68f406860ce415623fe9505a5266ffee464d]
@ximeg
ximeg / openpgp.txt
Created September 1, 2017 12:22
Verknüpfte OpenKeychain-Identität
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:5eef68f406860ce415623fe9505a5266ffee464d]
@ximeg
ximeg / knitter
Last active August 17, 2022 10:37
Knitter - command line tool to knit RMarkdown documents
#!/bin/bash
# Adapted from https://stackoverflow.com/a/52543399/6029703
if [ "$#" -gt 2 -o "$#" -lt 1 ]; then
echo "********************************************************************"
echo "* Knitter version 1.1 *"
echo "********************************************************************"
echo -e "This script converts Rmd files into HTML (default) or PDFs. \n"
echo -e "usage: knitter file.Rmd [output_format] \n"
@ximeg
ximeg / ffmpeg_avi2webm
Created April 3, 2020 19:42
FFMPEG convert COMSOL avi to webm for embedding into web pages
ffmpeg -i <input>.avi -c:v vp9 <output>.webm
@ximeg
ximeg / ffmpeg_side_by_side.sh
Created April 20, 2020 17:37
ffmpeg - place two video streams side by side, without audio
ffmpeg -i first.avi -i second.avi -filter_complex "[0:v][1:v]hstack=inputs=2[v]" -map "[v]" side-by-side.webm
@ximeg
ximeg / parallel_avi2webm.sh
Created April 20, 2020 17:38
ffmpeg parallel convert all AVI to VP9 WEBM
ls -1 *.avi | parallel ffmpeg -i {} -c:v vp9 {.}.webm
@ximeg
ximeg / .bashrc-parallel-ffmpeg-video-tools.sh
Last active June 17, 2022 05:04
.bashrc parallel ffmpeg video tools
# Video encoding. Arguments to ffmpeg should be passed in quotes
# Example
# ls *.avi | ff_avi2webm "-filter:v 'crop=in_w-100:in_h/2'"
ff_any2webm(){
parallel ffmpeg -i {} $1 -c:v vp9 {.}.webm
}
ff_whatsapp(){
# Convert specified videos to mp4 that are compatible with whatsapp