Skip to content

Instantly share code, notes, and snippets.

View SergeyKozlov's full-sized avatar

Sergey Kozlov SergeyKozlov

View GitHub Profile
@SergeyKozlov
SergeyKozlov / ffmpeg-minimalist-build-nvenc-static.md
Created February 27, 2018 13:19
This gist will show you how to build a minimalist, statically-linked ffmpeg binary under the ~/bin subdirectory on your home on Ubuntu 16.04LTS. Comes with NPP, CUDA and NVENC capabilities.

Minimalist static FFmpeg build on Ubuntu 16.04 with Nvidia NVENC enabled.

Original guide with a standard build is here.

With this guide, I'm adding more instructions to enable support for NVIDIA CUVID and NVIDIA NPP for enhanced encode and decode performance.

First, prepare for the build and create the work space directory:

cd ~/

@SergeyKozlov
SergeyKozlov / compile_ffmpeg.md
Created February 26, 2018 08:22 — forked from teocci/compile_ffmpeg.md
Compile FFmpeg on Ubuntu 16.04

Compile FFmpeg on Ubuntu

This basic guide supports Ubuntu Xenial Xerus 16.04 and will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide][1].

Note: Copy and paste the whole code box for each step.

Preparation

@SergeyKozlov
SergeyKozlov / README.md
Created February 22, 2018 09:25 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@SergeyKozlov
SergeyKozlov / ubuntu-raid.sh
Created January 23, 2018 10:55 — forked from umpirsky/ubuntu-raid.sh
Install Ubuntu on RAID 0 and UEFI/GPT system
# http://askubuntu.com/questions/505446/how-to-install-ubuntu-14-04-with-raid-1-using-desktop-installer
# http://askubuntu.com/questions/660023/how-to-install-ubuntu-14-04-64-bit-with-a-dual-boot-raid-1-partition-on-an-uefi%5D
sudo -s
apt-get -y install mdadm
apt-get -y install grub-efi-amd64
sgdisk -z /dev/sda
sgdisk -z /dev/sdb
sgdisk -n 1:0:+100M -t 1:ef00 -c 1:"EFI System" /dev/sda
sgdisk -n 2:0:+8G -t 2:fd00 -c 2:"Linux RAID" /dev/sda
@SergeyKozlov
SergeyKozlov / encoding-video.md
Created November 23, 2017 11:06 — forked from Vestride/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@SergeyKozlov
SergeyKozlov / nginx.default.conf
Created October 8, 2017 08:24 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
@SergeyKozlov
SergeyKozlov / rowdeleter.rb
Created September 26, 2017 12:35 — forked from noomerikal/rowdeleter.rb
RowDeleter for HBase Scan with TimeRange
=begin
Usage: /bin/hbase shell rowdeleter.rb
=end
import java.text.SimpleDateFormat
import java.text.ParsePosition
import java.util.Date
import org.apache.hadoop.hbase.client.Delete
import org.apache.hadoop.hbase.client.HTable
@SergeyKozlov
SergeyKozlov / graphicsmagick.sh
Created September 8, 2017 07:15 — forked from witooh/graphicsmagick.sh
Install Graphicsmagick
sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:rwky/graphicsmagick
sudo apt-get update
sudo apt-get install graphicsmagick
@SergeyKozlov
SergeyKozlov / couchbase_export_views.php
Created August 23, 2017 09:29 — forked from lord-otori/couchbase_export_views.php
A script to export all views in a Couchbase server to files.
<?php
/*
* @author: Juan S. Simon
* @copyright: none, just please don't try to sell it, they'll laugh at you...
*
*/
if (php_sapi_name() != 'cli') {
exit("No web access allowed!" . PHP_EOL);
}
<script src="https://apis.google.com/js/client.js?onload=gapiLoad"></script>
<script>
function gapiLoad() {
gapi.client.setApiKey('YOUR_API_KEY'); // app api-wide client api key
getGoogleContactEmails(function(result){
console.log(result);
});
}