Skip to content

Instantly share code, notes, and snippets.

@mandymozart
mandymozart / gist:e92aace7fabd095a1b3cb63031f5f0b4
Created January 7, 2025 13:41
Barre Exam Playlist Paula Dominici
Believe - Cher
Rhythm is a dancer - SNAP!
Material Girl - Madonna
Flashdance, What a Feeling - Irene Cara
Strong enough - Cher
Sweet dreams - La Bouche
Crying at the discothek - Alcazar
What is love - Haddaway
The Shoop Song - Cher
Waiting for tonight - Jennifer Lopez
@mandymozart
mandymozart / gist:6691e5d8430f0d6dd979b2fd437f8fad
Created December 29, 2024 09:32
stream directly from capture card to youtube with ffmpeg
ffmpeg -f decklink -format_code 'Hi50' -i 'UltraStudio Express'
-deinterlace -b:v 1M -vcodec h264 -pix_fmt yuv420p -color_range 1 -acodec aac -f flv rtmp://a.rtmp.youtube.com/live2/*******
@mandymozart
mandymozart / grad-frames-for-photogramertry.sh
Last active August 27, 2023 10:57
Using ffmpeg to extract one frame per second as a still image from video file for photogrametry
#!/bin/bash
input_file="DJI_0155.MP4" # Replace with the path to your input MP4 file
output_folder="frames" # Replace with the name of the folder where you want to save frames
# Create the output folder if it doesn't exist
mkdir -p "$output_folder"
# Use FFmpeg to extract frames
ffmpeg -i "$input_file" -vf "fps=1" "$output_folder/frame_%04d.jpg"
mkdir wav; for i in *.ogg; do ffmpeg -i "$i" "wav/${i%.*}.wav"; done
@mandymozart
mandymozart / batch-to-mp4.sh
Last active July 28, 2023 10:26
Batch convert all files in ${directory} from MPG Sony AVCHD and copy to ${out}.
#!/usr/bin/bash
# input files directory
directory=$1
# converted files directory
out=$2
echo "Batch convert all files in ${directory} from MPG Sony AVCHD and copy to ${out}"
echo "------------------------------------------------------------------------------"
[[ -z "$directory" ]] && { echo "Error: directory required"; exit 1; }
@mandymozart
mandymozart / metashape-dji-video.md
Last active June 4, 2019 13:23
MetaShape 3D Photometry from DJI drone video footage

Download your video file from the drone.

Get a frame every 3 seconds of the video

ffmpeg -i DJI_0012.MOV -vf fps=1/3 frame%03d.jpg

Parameters

fps (change to how many frames you want to grab each second)

<div id="influencer_shop_widget"></div>
<!-- INFLUENCER MADNESS -->
<script>
var scriptTag = document.createElement('script');
scriptTag.src = 'http://influen.ca/tool.js?api_key=KEY';
var r = false;
scriptTag.onload = scriptTag.onreadystatechange = function () {
if (!r && (!this.readyState || this.readyState == 'complete')) {
// defensive check
r = true;
@mandymozart
mandymozart / api-search.js
Created July 5, 2018 13:31
Docsify Plugin : Api Search
(function () {
"use strict";
let INDEX = {};
let criteria = {};
const bindDropdown = (type) => {
const $fieldFilterByType = Docsify.dom.find("aio-select.aio-" + type);
if ($fieldFilterByType) {
@mandymozart
mandymozart / parentCuid.ts
Created November 8, 2017 15:00
Extend controller for parent event bubbling
/**
* Attache publish bindings for event manager
* TODO requires EventManager to be injected into each controller on factory
* [data-publish] {string} message
* [data-payload]? {string} payload (TODO maybe json or object)
* [data-event]? {ZeptoEventHandlers} @default click
* focusin focusout focus blur load resize scroll unload click dblclick
* mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave
* change select keydown keypress keyup error
*/
@mandymozart
mandymozart / git-filter-branch-prune-large-files.sh
Created August 9, 2017 12:05
Remove large file from repository - prune files with filter
git filter-branch --prune-empty -d /dev/shm/scratch \
--index-filter "git rm --cached -f --ignore-unmatch oops.iso" \
--tag-name-filter cat -- --all