Skip to content

Instantly share code, notes, and snippets.

View slowmove's full-sized avatar

Erik Hoffman slowmove

View GitHub Profile
@JohnCoates
JohnCoates / Readme.md
Last active September 27, 2021 20:24
HEVC HLS Creation
@GnaphronG
GnaphronG / cmaf.sh
Created May 28, 2018 23:57
HLS and DASH Manifest with CMAF files
#! /bin/sh
file="bbb_sunflower_2160p_30fps_normal.mp4"
timestamp=`date +%s`
ffmpeg="docker run --rm -it --workdir /tmp -v $PWD:/tmp kynothon/moviola:4.0-alpine "
bento4="docker run -it --rm -u $(id -u):$(id -g) -v $PWD:/tmp --workdir /tmp ggoussard/bento4docker "
echo "Getting the file"
curl -LO http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_30fps_normal.mp4
@cecilemuller
cecilemuller / launch.json
Last active April 4, 2025 13:08
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@hteumeuleu
hteumeuleu / mp4-to-jpg
Created June 30, 2017 13:30
Commands to generate a background sprite from an MP4 video (using ffmpeg and ImageMagick)
ffmpeg -i video.mp4 -r 1 img/frames_%04d.png
montage -tile 34x1 -geometry 640x960 *.png background.jpg
@wesbos
wesbos / async-await.js
Created February 22, 2017 14:02
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active April 8, 2025 13:32
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4

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

@kewang
kewang / git-merge-test.sh
Last active February 23, 2023 10:04
Git merge dry-run
#!/bin/sh
BRANCH=$1
git merge --no-commit --no-ff $1; git status; git merge --abort
# References: https://stackoverflow.com/questions/501407/is-there-a-git-merge-dry-run-option
@hexblot
hexblot / EventSystem.php
Created October 27, 2016 14:24
A very simple event system for PHP Projects
<?php
/**
* A class to implement a simple event system in any PHP project.
*
* @author Nick Andriopoulos <[email protected]>
* @license https://www.apache.org/licenses/LICENSE-2.0
*/
/**
@peterdalle
peterdalle / swedish-stopwords.txt
Last active October 8, 2021 10:46
Svenska stoppord (Swedish stop words) - se https://github.com/peterdalle/svensktext för uppdaterad version
aderton
adertonde
adjö
aldrig
all
alla
allas
allt
alltid
alltså