-i
- ignore errors
-c
- continue
-t
- use video title as file name
--extract-audio
- extract audio track
#!/bin/sh | |
readonly cluster_topology=$(redis-cli -h redis-cluster cluster nodes) | |
readonly slaves=$(echo "${cluster_topology}" | grep slave | cut -d' ' -f2,4 | tr ' ' ',') | |
readonly backup_dir="/opt/redis-backup" | |
mkdir -p ${backup_dir} | |
for slave in ${slaves}; do | |
master_id=$(echo "${slave}" | cut -d',' -f2) |
# brew install ffmpeg --with-fdk-aac | |
find . -iname "*.mp3" | while read f | |
do | |
ffmpeg -i "$f" -acodec libfdk_aac -f ipod "${f:r}".m4r | |
done |
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a |
#Recommended minimum configuration: | |
acl manager proto cache_object | |
acl localhost src 127.0.0.1/32 | |
acl to_localhost dst 127.0.0.0/8 | |
acl localnet src 0.0.0.0/8 192.168.100.0/24 192.168.101.0/24 | |
acl SSL_ports port 443 | |
acl Safe_ports port 80 # http | |
acl Safe_ports port 21 # ftp | |
acl Safe_ports port 443 # https | |
acl Safe_ports port 70 # gopher |
A running example of the code from:
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
"net/url" | |
"golang.org/x/net/html" | |
"io" | |
) |
FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.
Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:
ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4
Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.