Skip to content

Instantly share code, notes, and snippets.

@ParkWardRR
ParkWardRR / vr180_to_flat_h265_batch_hvc1.py
Last active December 29, 2025 05:30
Python wrapper around FFmpeg to turn VR180/360 half-equirect videos into flat 2D HEVC (H.265), with configurable quality, HW/SW encoder selection, and per-file logging for macOS M2/M3/M4.
#!/usr/bin/env python3
"""
vr180_to_flat_h265_batch_hvc1.py
VR180 SBS (or mono) -> Flat 2D HEVC (H.265) batch encoder for macOS (Apple Silicon).
What this does
- Reads video files from an input folder (optionally recursive).
- If the source is VR180 SBS, it crops the left eye (half-width) then uses FFmpeg `v360` to flatten.
- Encodes to HEVC using:
- Hardware: `hevc_videotoolbox` (fast), with SW fallback to `libx265` if HW fails.
@ParkWardRR
ParkWardRR / vr180_to_flat_prores_batch_enhanced.py
Created December 28, 2025 19:03
This script transforms VR180 (stereo 360-degree, half-equirectangular) video files into standard flat 2D ProRes MOV files suitable for NLE (non-linear editing) systems. It performs batch processing with intelligent resolution selection, optional pitch variants, and comprehensive logging. Tested on MacOS
#!/usr/bin/env python3
"""
VR180 SBS to Flat 2D ProRes Batch Encoder (macOS)
==================================================
README & DOCUMENTATION
======================
OVERVIEW
--------
@ParkWardRR
ParkWardRR / av1-batch-encoder-macos.sh
Created December 27, 2025 21:58
macOS AV1 Batch Encoder (ffmpeg + progress + parallel)
#!/usr/bin/env bash
################################################################################
# macOS AV1 Video Batch Encoder (ffmpeg)
# Version: 2.1.1
#
# What it does:
# - Finds the first video file in ./source (next to this script) and produces
# multiple AV1 resolution variants into ./output (by default).
# - Tracks per-encode progress + ETA by parsing ffmpeg's `-progress` key/value
# file (e.g., out_time_us, speed, progress=end). This is more machine-friendly
#!/bin/bash
# moved jere: https://github.com/ParkWardRR/bmw-bm3-knock-analyzer/tree/main
# BMW BM3 Knock Analyzer v4.0 (macOS, robust 0-knock handling)
# bmw-bootmod3-knock-event-context-extractor.sh
# This script processes BM3 log CSVs for the BMW N20 engine to analyze knock events.
# It collects knock event data, adds context rows, generates checksums for validation,
# and produces a summary report. All output is timestamped and organized for easy review.
// ==UserScript==
// @name Plex Redirect Script
// @namespace https://example.com/
// @version 1.0
// @description Automatically redirects users from the Plex homepage (www.plex.tv) to the Plex web app (app.plex.tv).
// @author Your Name
// @match https://www.plex.tv/*
// @grant none
// ==/UserScript==
/*
* ESP32-H2 GPS Parser
* Description:
* This script reads NMEA sentences from a GPS module connected to an ESP32-H2 board,
* parses the data using the TinyGPS++ library, and outputs clean, human-readable GPS data
* such as latitude, longitude, date, time, altitude, speed, number of satellites, and HDOP.
*
* Features:
* - Real-time GPS data parsing and display.
* - Clear and organized serial output.
@ParkWardRR
ParkWardRR / install_searxng.sh
Last active December 29, 2025 15:16
This script automates the installation and setup of SearXNG using Podman on AlmaLinux. It includes steps to update the system, install Podman, pull the SearXNG Docker image, create necessary configuration files, and run the SearXNG container with the correct port mapping.
#!/bin/bash
# Filename: install_searxng.sh
# Description: This script automates the installation and setup of SearXNG using Podman on AlmaLinux.
# It includes steps to update the system, install Podman, pull the SearXNG Docker image, create necessary
# configuration files, run the SearXNG container with the correct port mapping, and set up a systemd service
# to ensure the container starts automatically on system boot.
# Update system
sudo dnf update -y
#!/bin/bash
# =============================
# Script: YouTubeRelayService.sh
# Description: This script is designed to fetch and serve YouTube live streams,
# especially useful for bypassing YouTube geo-blocks by running on a lightweight VPS.
# It can be particularly effective for continuous streams such as 24-hour live streams.
# This script is intended to bootstrap an Ubuntu host.
# =============================
@ParkWardRR
ParkWardRR / EbookChunkSplitter.py
Created January 30, 2024 01:36
Ebook Chunk Splitter - python
"""
Script: Ebook Chunk Splitter
Description: This script takes an input text file of an ebook and splits it into smaller chunks based on a specified character limit. It ensures that paragraphs are not split and creates an output directory with the split chunks of the ebook.
Input: Replace `<input_file>` with the path to the input text file of the ebook.
Output: Replace `<output_folder>` with the path to the output directory where the split ebook chunks will be stored.
"""
import os
import datetime
@ParkWardRR
ParkWardRR / freq_analysis.sh
Created December 23, 2023 07:56
freq_analysis.sh
#!/bin/bash
: '
File: freq_analysis.sh
This is a Unix shell script designed to provide a frequency analysis based on the output from software-defined radio (SDR) scans. The script reads from specified CSV files that contain the SDR scan data, recognizes the frequencies with the highest signal strength, and presents a list of the top frequencies.
This script serves as a preliminary tool for users looking to explore frequency ranges for the SDRTrunk application. Its primary tasks include sorting the frequencies based on signal strength and outputting potential frequency ranges for further analysis and use in SDRTrunk.
Note: Ensure the SDR scan CSV files are placed in the appropriate directory (default: /tmp/sdrOut); adjust the CSV_DIR variable in the script according to your setup. This script is geared towards educational and research applications. Compliance with all applicable laws pertaining to radio frequency use is strongly advised.