start new:
tmux
start new with session name:
tmux new -s myname
# Configure colors, if available. | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset='\[\e[0m\]' | |
c_user='\[\e[0;32m\]' | |
c_path='\[\e[1;34m\]' | |
c_git_clean='\[\e[0;37m\]' | |
c_git_staged='\[\e[0;32m\]' | |
c_git_unstaged='\[\e[0;31m\]' | |
else | |
c_reset= |
Herewith is an example of encoding to and from base64 using OpenSSL's C library. Code presented here is both binary safe, and portable (i.e. it should work on any Posix compliant system e.g. FreeBSD and Linux).
The MIT License (MIT)
Copyright (c) 2013 Barry Steyn
[Configuration] | |
FontName=DejaVu Sans Mono 10 | |
MiscAlwaysShowTabs=FALSE | |
MiscBell=FALSE | |
MiscBordersDefault=FALSE | |
MiscCursorBlinks=FALSE | |
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK | |
MiscDefaultGeometry=80x24 | |
MiscInheritGeometry=FALSE | |
MiscMenubarDefault=FALSE |
ffmpeg -f lavfi -i color=color=black:s=1920x1080 -vf "drawtext=fontfile=/Library/Fonts/Arial.ttf:fontsize=80:fontcolor=white:x=(w-text_w)/2:y=(h-text_h-line_h)/2:text='Lossless codecs vs corruption',drawtext=fontfile=/Library/Fonts/Arial.ttf:fontsize=30:fontcolor=white:x=(w-text_w)/2:y=(h-text_h-line_h)/2+80:text='by Dave Rice',fade=in:0:20,fade=out:55:20" -c:v rawvideo -pix_fmt uyvy422 -t 3 -vtag 2vuy intro_title.mov | |
ffmpeg -f lavfi -i color=color=black:s=1920x1080 -vf "drawtext=fontfile=/Library/Fonts/Arial.ttf:fontsize=100:fontcolor=white:x=(w-text_w)/2:y=(h-text_h-line_h)/2:text='JPEG-LS',fade=in:0:20,fade=out:55:20" -c:v rawvideo -pix_fmt uyvy422 -t 3 -vtag 2vuy jpegls_title.mov | |
ffmpeg -f lavfi -i mandelbrot=s=1920x1080 -c:v jpegls -bsf noise -t 10 jpegls.mov | |
ffmpeg -f lavfi -i color=color=black:s=1920x1080 -vf "drawtext=fontfile=/Library/Fonts/Arial.ttf:fontsize=100:fontcolor=white:x=(w-text_w)/2:y=(h-text_h-line_h)/2:text='Lossless JPEG',fade=in:0:20,fade=out:55:20" -c:v rawvideo -pix_fmt uyvy422 -t 3 |
See my DASH-IF presentation from October, 2014: | |
https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/ | |
1. encode multiple bitrates with keyframe alignment: | |
ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \ | |
-g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4 | |
My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment | |
size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012. |
#!/bin/sh | |
startswith() { case $1 in $2*) true;; *) false;; esac; } | |
tmpfile=$(mktemp) | |
ffprobe -show_frames "$1" 2> /dev/null > "$tmpfile" | |
GOP=1 | |
maxGOP=1 | |
Bframes=0 |
Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
Here's an example video I made
brew install ffmpeg --with-libvidstab