Skip to content

Instantly share code, notes, and snippets.

View tapscodes's full-sized avatar
🎯
Focusing

Tristan tapscodes

🎯
Focusing
View GitHub Profile
@tapscodes
tapscodes / ffmpeg_commands.md
Created July 14, 2025 11:36
Useful FFMPEG Commands

1080p to 4k Video NVidia Accelerated

Change input.mp4 to your input file (can be different extension) and output to the whatever output name you want. Won't increase video quality, just useful to upscale 1080p to 4k quickly so YouTube encodes your video better.

ffmpeg -hwaccel cuda -i input.mp4 -vf "scale=3840:2160" -c:v h264_nvenc -preset p3 -rc vbr -cq 19 -b:v 0 -c:a aac -b:a 192k -movflags +faststart output.mp4

Phone MP4 To Resolve Mov Converter

Phones often record audio in a way that Davinci Resolve disagrees with. This conversion command fixes that for you. It's a for loop that converts all .mp4 files in your folder to a PCM_s16 .mov that Resolve reads properly while maintaining data integrity.

for f in *.mp4; do ffmpeg -i "$f" -c:v copy -c:a pcm_s16le "${f%.mp4}_resolve.mov"; done

@tapscodes
tapscodes / Resolve.md
Last active December 11, 2025 06:31
How To Install Davinci Resolve In Fedora 42

This is how I got things working with my NVidia GPU and Fedora 42. I can't guarantee this will work for you but I figured I'd write down what worked for me.

  1. Install libraries you'll need to run it with sudo dnf install libxcrypt-compat libcurl libcurl-devel mesa-libGLU --allowerasing
  2. Download Davinci Resolve Linux from the official website: https://www.blackmagicdesign.com/products/davinciresolve
  3. Mark the .run file as 'executable' either through chmod or right clicking and checking it off in properties
  4. Run the installer with SKIP_PACKAGE_CHECK=1 ./DaVinci_Resolve_20.0_Linux.run subsituting the .run file name with your own and being CD'd into where the file is
  5. Make a folder in the resolve folder for the old libraries Resolve ships with that you will disable. You can do this with
sudo mkdir /opt/resolve/libs/disabled
cd /opt/resolve/libs
@tapscodes
tapscodes / collection.md
Last active July 3, 2025 04:23
Music File/Folder name guidlines for music collectors

Writing this down for my own music collection as I often find myself renaming files well after the fact when I realize they didn't load into a playlist or something right.

For folder names include just characters abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ even the ' symbol can trip up specific music players/playlists.

For file names, generally include the characters above and the special characters []()-_~@=+ other fun characters like ?!/\|.,&%*":;'>< can and will mess up music players.

@tapscodes
tapscodes / git_rewrite.txt
Created February 7, 2023 09:50
Replace old email in old commits made by yourself [works on repos with other users committing] (run this in git bash for best results, removes "verified status" on commits as side effect)
git clone --bare https://github.com/[REPLACE WITH GITHUB USERNAME]/[REPLACE WITH REPO NAME].git
cd [REPLACE WITH REPO NAME].git
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="[REPLACE WITH OLD EMAIL]"