Skip to content

Instantly share code, notes, and snippets.

View XDuskAshes's full-sized avatar
🧹
Moved to Codeberg!

XDuskAshesReal XDuskAshes

🧹
Moved to Codeberg!
View GitHub Profile
@XDuskAshes
XDuskAshes / ResolveHatesMP4.md
Last active January 13, 2025 05:49
Convert MP4 files to something DaVinci Resolve will like.

DaVinci Resolve hates MP4s

(Or, at least the free version of Resolve does.)

When I edit videos, I typically either use an MP4 or just drop the recorded MKV into Kdenlive without even bothering to remux it in OBS. Although, I have noticed that DaVinci Resolve basically has an aneurysm if given an MP4. "Oh, did you try importing an MP4? Well screw you, I don't know what to do with that so I will give you a blank clip with a blank audio track :D"

Why does it do this instead of just an error message? I don't know. Best guess? Law of conservation of mass or whatever. Anyways, after scouring Resolve's forums, I found this post with my exact issue. The basic fix is simple. Have your input MP4, in this case input.mp4, and run this monstrosity:

ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_sq -c:a pcm_s16le output.mov

I thought this was ugly so I made a BASH script wrapper for it.

@XDuskAshes
XDuskAshes / safecall.lua
Last active November 10, 2024 18:10
Dusk's ComputerCraft Snippets
-- Call a function in an xpcall() wrapper.
local function safeCall(f,args)
if not type(f) == "function" then
return false, "[libcommon]: cannot safeCall "..f..": not a function"
end
local function errorHandle(errormsg)
return false, "[libcommon]: exec error: "..errormsg
end
@XDuskAshes
XDuskAshes / getluz.lua
Created November 10, 2024 01:15
Script to get Luz
-- Simple tool to snatch up JackMacWindows' Luz.
-- Luz: <https://github.com/MCJack123/Luz>
-- Made by XDuskAshes - <https://github.com/XDuskAshes/>
-- Released under CC-0, do what you will.
local luzrepo = "https://raw.githubusercontent.com/MCJack123/Luz/refs/heads/lz77-deflate-identifiers/"
local luzrepotest = "https://raw.githubusercontent.com/MCJack123/Luz/refs/heads/lz77-deflate-identifiers/LICENSE"
local luzrepocontent = {"LibDeflate.lua","compress.lua","decompress.lua","histogram.lua","inspect.lua","lex.lua","luz.lua","lz77.lua","maketree.lua","minify.lua","token_decode_tree.lua","token_encode_map.lua"}
-- Using lz77-deflate-identifiers because that's the default. I made this a variable for your own
-- per-use-case cases. Dammit, english sucks.