Skip to content

Instantly share code, notes, and snippets.

View 1ucasvb's full-sized avatar

LucasVB 1ucasvb

View GitHub Profile
@marcduiker
marcduiker / ffmpeg_video_for_twitter.md
Last active June 1, 2024 04:35
FFmpeg command for creating video for Twitter

Convert pngs to mp4

This FFmpeg command reads images named frame_[4 char digit].png and converts it to an mp4 using the h264 encoding which Twitter accepts. The bitrate is set to 5M to reduce blocking as much as possible while keeping the size small.

ffmpeg -framerate 10 -i frame_%04d.png -c:v h264_qsv -b:v 5M video.mp4

Convert and scale an existing mp4 to 1080:

ffmpeg -i input.mp4 -c:v h264_qsv -vf: scale=1080:-1 -b:v 5M output.mp4

@RavuAlHemio
RavuAlHemio / mds2midi.py
Last active January 30, 2026 22:13
MDS to standard MIDI file converter
#!/usr/bin/env python3
#
# MDS to standard MIDI file converter
#
# see also http://www.vgmpf.com/Wiki/index.php?title=MDS
#
import argparse
import io
import struct
from typing import BinaryIO, List, Optional