Skip to content

Instantly share code, notes, and snippets.

@manero6
manero6 / ffmpeg-list4concat.sh
Last active September 28, 2023 15:53
Bash script to create a formatted list to be used when concatenating with FFmpeg
#!/bin/bash
if [ $# = 1 ]
then
LIST=`ls | grep -i "$1" | sed -e "s/^/file '/" -e "s/$/'/"`
if [[ -f list ]]
then
read -p "Do you want to overwrite the already existing 'list' file? (y/N) " yn
case $yn in
[yY]* ) echo -e "\nOverwriting already existing 'list' file with the following content:\n"
@manero6
manero6 / ffmpeg-bestcrop.py
Last active October 9, 2023 10:49
Run cropdetect and print 10 most detected crops
#!/usr/bin/env python3
import re
import sys
import subprocess
try:
file_to_crop = sys.argv[1]
except:
print("Please provide a video file.")
@apolopena
apolopena / capture-lolcat-raw-colors.md
Last active July 11, 2025 15:07
Capture a raw dump of lolcat colorized output (for a script or a command) that includes the ANSI escape sequences for the colors.

The Need

  • You need a raw dump of lolcat colorized output that includes the ANSI escape sequences for the colors.
  • You need this dump saved to a file.

The Solution

Pipe your output through lolcat, use the --force flag and then redirect the output to a file.

Examples

  1. Capture a raw dump of the output of a bash script piped through lolcat to the file colors.txt
  • bash my-script.sh | lolcat --force > colors.txt
@ichisadashioko
ichisadashioko / qemu_usb.txt
Created April 22, 2021 12:29
QEMU USB passthrough user guide
USB Quick Start
===============
XHCI controller support
-----------------------
QEMU has XHCI host adapter support. The XHCI hardware design is much
more virtualization-friendly when compared to EHCI and UHCI, thus XHCI
emulation uses less resources (especially cpu). So if your guest
@gdamjan
gdamjan / README.md
Last active October 23, 2025 17:41
libvirt with ipvtap over wifi

ipvtap over wifi for libvirt

ipvtap is similar to macvtap, but works over wifi too, since it uses the same mac address as the wifi interface.

libvirt doesn't support ipvtap, so we have to configure everything manually. Important data we need before we start:

  • the name of the wifi interface, wlan0 in my case (it's already connected - use NM or networkd+iwd).
  • the mac address of the wifi interface (it must be the same in the guest too)

On the host:

@alshell7
alshell7 / Vagrantfile_Multi_Agent
Last active May 10, 2021 08:49
Array of hashes with settings for each virtual machine in Vagrant
# PS D:\vagrant_test> cat .\Vagrantfile
# Prefix for LAN
BRIDGE_NET="192.168.1."
# Prefix for Internal LAN
INTERNAL_NET="192.168.15."
# The domain that we will use for the entire site
DOMAIN="sample.com"
# An array of hashes with settings for each virtual machine
servers=[
{
@RebelLion420
RebelLion420 / TermuxArchSetup2024.md
Last active March 11, 2026 15:03
How to set up Arch Linux in Termux on Android

NOTICE: This will take up about 3 GB of space on your device, before syncing any repos or projects.

Install Termux from the Play Store and launch it

Once it finishes unpacking:

pkg update

pkg upgrade -y

I do know that it’s really easy to convert them into an ISO file, and then mount the ISO in debian based linux.

sudo apt-get install bchunk

The syntax from bchunk is as follows:

bchunk [-v] [-p] [-r] [-w] [-s]
@hsab
hsab / ffmpeg_tut_.md
Last active November 24, 2025 11:37
FFMPEG Tutorial: 2-Pass & CRF in x264 & x265

Google FFMPEG H264

Two-Pass: Requires a bitrate. This defines the quality of the video. Youtube and Vimeo usually reduce your bitrate to 25mbs. So if it is higher, it will be compressed by these websites.

Lower bitrate means lower files size.

Calculating Bitrate:

@braian87b
braian87b / dumb-ap-wired-link.sh
Last active January 23, 2026 06:42
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE