Skip to content

Instantly share code, notes, and snippets.

View Cdaprod's full-sized avatar
🫠
Learn something new everyday!

David Cdaprod

🫠
Learn something new everyday!
View GitHub Profile
@Cdaprod
Cdaprod / obs-scripts_move_recording_to_unc.py
Created July 17, 2025 18:09
β€’ Every time the Stream Deck (or any other trigger) stops a recording, the finished file is moved to your UNC share \\cda-desktop\b\Video\_INCOMING\sources\OBS-NDI-GARAGE. β€’ If the share isn’t currently mapped, the script attempts a one-shot net use so it works even when OBS is running elevated. β€’ All status / errors are written to the normal O…
"""
Move each finished recording to a UNC share.
OBS β–Ά Tools β–Έ Scripts β–Έ + β–Έ select this file
---------------------------------------------------------
β€’ Works with Simple or Advanced output mode.
β€’ No change to your regular Recording Path is required;
in fact, keeping it on a local SSD makes the initial write faster.
---------------------------------------------------------
Tested with Python 3.11 + OBS 30.
@Cdaprod
Cdaprod / .md
Created July 4, 2025 16:59
Raspberry Pi 5 - VideoCoreVII GPU - Configuration Support

Updating Drivers for Ubuntu on Raspberryβ€―Piβ€―5 to support the VideoCoreβ€―VII GPU

βœ… GPU Support Overview

  1. Mesa / V3D (OpenGL ES & Vulkan) drivers included, thanks to upstream support merged since Mesaβ€―23.3 οΏΌ.
  2. Initial desktop installs (e.g., Ubuntuβ€―24.04/24.10) sometimes exhibit slow graphics, GNOME animation lag, even green-screen artifactsβ€”likely due to incomplete or mismatched Mesa stacks οΏΌ.
  3. Community feedback highlights that while OpenGL ES/Vulkan are available, you may need to install or update Mesa packages manually (mesa-vulkan-drivers, etc.) οΏΌ.

To Update Drivers:

@Cdaprod
Cdaprod / docker-blender-all-in-one.sh
Created June 30, 2025 22:00
Blender-in-Docker β€œFactory-Startup” one-liner that procedurally creates a scene (plane textured with a phone-screen video, sun light, animated camera with BΓ©zier easing), then headlessly renders the result to an H.264 MP4β€”no pre-existing .blend required. Ideal as a reproducible, copy-paste gist for anyone needing quick 3-D perspective moves on v…
docker run --rm -i -v "$PWD":/w linuxserver/blender:4.4.3 \
blender --factory-startup -b --python - <<'PY'
import bpy, math, os
vid = "/w/phone_screen.mp4" # <<< your vertical video
assert os.path.exists(vid), "Video missing"
# ------------------------------------------------------ build objects
bpy.ops.mesh.primitive_plane_add(size=2)
plane = bpy.context.object
@Cdaprod
Cdaprod / two_cam_auto_vfx.py
Created June 30, 2025 18:04
Dual camera (hero+witness) tracking system for VFX with BPY in blender Python scripting.
# /scripts/two_cam_auto_vfx.py
"""
Two-Camera VFX Auto-Rig -- Audio-Sync, Insta360-aware Edition
─────────────────────────────────────────────────────────────────────────────
β€’ Imports hero + witness plates
β€’ Automatically aligns them via audio-waveform cross-correlation
β€’ Auto-detects FPS, resolution & 360⇆rectilinear
β€’ Injects missing XMP β†’ always pano-aware
β€’ Tracks witness plate on a seeded grid, iteratively cleans & re-solves
β€’ Builds RigRoot β–Ά WitnessCam β–Ά HeroCam hierarchy
@Cdaprod
Cdaprod / Ndi-Moviepy.md
Created June 16, 2025 16:22
NDI+Moviepy Notebook

NDI Stream to MoviePy Professional Video Processing

A comprehensive system for capturing NDI streams, recording them, and processing with MoviePy for professional video production workflows.

πŸ“¦ Cell 1: Install Dependencies

# Install required packages
!pip install ndi-python opencv-python ipywidgets moviepy numpy pillow
# Note: Ensure NDI SDK/Runtime is installed on your system
@Cdaprod
Cdaprod / run-llama-cuda-server.ps1
Created June 15, 2025 19:38
Running dockerized `ghcr.io/ggml-org/llama.cpp` CUDA Server
docker run --gpus all --restart unless-stopped -d `
-v "B:\Models:/models" `
-p 8000:8000 `
ghcr.io/ggml-org/llama.cpp:server-cuda `
-m /models/llama-2-7b-chat.Q4_K_M.gguf `
--port 8000 --host 0.0.0.0 -n 512 --n-gpu-layers 35

🎬 CDAProd β€” NodeVideo Expressions Guide

βš™οΈ Built by David Cannan β€” DevOps Engineer & AI Solutions Architect
πŸ’‘ Self-made | #devopsdad | #tripletdad | #hacktheplanet

GitHub - Cdaprod Blog LinkedIn

@Cdaprod
Cdaprod / Cinematic_Text_Expression.md
Last active June 11, 2025 17:36
Mini script - Motion Expression Fx for NodeVideo

Simple Cinematic Example for Text

fadeInDuration = 1.5
delay = (index - 1) * 0.2
t = time - (thisLayer.startTime + delay)

progress = clamp(t / fadeInDuration, 0, 1)
easeT = ease(progress, 0, 1)
@Cdaprod
Cdaprod / my_autometadata.py
Last active June 4, 2025 17:12
Goes with my xqd smb gist and this one is attempting to automate all metadata
import os
import cv2
import xml.etree.ElementTree as ET
def get_video_technical_info(path):
cap = cv2.VideoCapture(path)
fps = cap.get(cv2.CAP_PROP_FPS)
frame_count = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
@Cdaprod
Cdaprod / my_xqd_smb_share.md
Last active June 4, 2025 15:15
Automating XQD Via Network Share Using SMB

TL;DR β€’ It’s fine that both XQD cards individually mount as D:. β€’ Differentiate them by VolumeLabel, not by drive letter. β€’ Modify your script so the SMB share name = VolumeLabel (e.g. XQD_Card1, XQD_Card2). β€’ Register your task once via PowerShellβ€”after that, β€œhot-plug” automatically shares whichever card you inserted under the correct name.

Feel free to reach out if you want help auto-removing the share on eject, adding logging to see exactly when each card fires, or any other fine-tuning!

Explanation of Key Changes