Skip to content

Instantly share code, notes, and snippets.

View Kianda's full-sized avatar

Kianda Kianda

  • Veneto, Italy
  • 06:33 (UTC +02:00)
View GitHub Profile
@Kianda
Kianda / fix_motion_photo.txt
Created July 20, 2025 20:27
Fix corrupted motion photos (remove the video)
Add-Type -AssemblyName System.Drawing
$inputFile = "C:\Users\myuser\Desktop\test\IMG_20220910_100157.jpg"
$outputFile = "C:\Users\myuser\Desktop\test\output.jpg"
try {
# Load the image - this automatically ignores motion data
$img = [System.Drawing.Image]::FromFile((Resolve-Path $inputFile))
# Save as new JPEG
@Kianda
Kianda / season_renamer.ps1
Last active July 11, 2025 20:02
PowerShell script to rename files by adding SxxExx to the beginning
# Create a shortcut to this file with 'Target'
# C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File "X:\Yourpath\season_renamer.ps1"
param(
[int]$seasonNumber = 0, # Default to 0 to indicate that no parameter was passed
[int]$episodeNumber = 0 # Default to 0 to indicate that no parameter was passed
)
# Prompt the user if no parameters are passed
if ($seasonNumber -eq 0) {
@Kianda
Kianda / split_video.ps1
Last active May 1, 2025 12:33
Windows Powershell FFMPEG ps1 script to split video into chunks
# Usage: .\split_video.ps1 -inputFile "input.mp4" -numSplits 4
param (
[string]$inputFile, # Input MP4 file
[int]$numSplits # Number of parts
)
# Check if ffprobe and ffmpeg are installed
$ffprobe = Get-Command ffprobe -ErrorAction SilentlyContinue
$ffmpeg = Get-Command ffmpeg -ErrorAction SilentlyContinue