Skip to content

Instantly share code, notes, and snippets.

View adoussot's full-sized avatar

alexis doussot adoussot

View GitHub Profile
# 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=
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 29, 2024 08:12
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@barrysteyn
barrysteyn / Base64.md
Last active April 9, 2024 08:29
OpenSSL Base64 En/Decode: Portable and binary safe.

OpenSSL Base64 Encoding: Binary Safe and Portable

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).

License

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
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active June 22, 2024 03:44
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

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
@tpitale
tpitale / README.md
Last active June 19, 2024 19:34
Sublime Text plugin to create a simple timestamp
  1. Go to Tools > New Plugin
  2. Paste timestamp.py contents and save in User as timestamp.py
  3. Open Preferences > Key Bindings - User (or Default, your call)
  4. Paste keybindings.json, or add a line to your keybindings
  5. Customize the keyboard shortcut to your liking and save
@ddennedy
ddennedy / dash-avc264 command lines
Last active July 27, 2022 03:44
Use ffmpeg and mp4box to prepare DASH-AVC/264 v1.0 VoD
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.
@ddennedy
ddennedy / getgop.sh
Last active March 29, 2018 22:21
display the GOP structure of a video file (requires ffprobe)
#!/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
@max-mapper
max-mapper / readme.md
Last active March 16, 2023 15:18
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab