Skip to content

Instantly share code, notes, and snippets.

View adoussot's full-sized avatar

alexis doussot adoussot

View GitHub Profile

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
@askmike
askmike / custom.js
Created November 19, 2016 15:37
gekko/issue#502
// helpers
var _ = require('lodash');
var log = require('../core/log.js');
// configuration
var config = require('../core/util.js').getConfig();
// let's create our own method
var method = {};
// prepare everything our method needs
@christiangenco
christiangenco / download_egghead_videos.md
Last active January 29, 2024 03:16 — forked from ldong/download_egghead_videos.md
download egghead videos
@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
@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
@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.
@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
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
@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

[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