Skip to content

Instantly share code, notes, and snippets.

@lightsongjs
lightsongjs / gist:55241af63761ddfa820e32c7ca0d81de
Created December 3, 2024 09:10
converts all .mkv files in the current directory to .mp4
@echo off
:: This script converts all .mkv files in the current directory to .mp4 format
:: using ffmpeg. Make sure ffmpeg is installed and available in the system PATH.
setlocal enabledelayedexpansion
:: Loop through all .mkv files in the current directory
for %%f in (*.mkv) do (
:: Set the base name by removing the file extension
set "basename=%%~nf"
@lightsongjs
lightsongjs / gist:8e50cf6d1ce55ceef9a24c83d30fe888
Created December 3, 2024 09:09
converts all .wav files in the current directory to .mp3
@echo off
:: Enable delayed expansion for dynamic variable handling
setlocal enabledelayedexpansion
:: Loop through all .wav files in the current directory
for %%f in (*.wav) do (
:: Extract the base name without extension
set "basename=%%~nf"
echo Converting "%%f" to "!basename!.mp3"
@lightsongjs
lightsongjs / movToMp4.sh
Last active September 19, 2024 05:55
Bash script to convert all .MOV files to mp4
# PT linux
for i in *.MOV; do ffmpeg -i "$i" "${i%.*}.mp4"; done
# PT windows - cmd
for %f in (*.mkv) do ffmpeg -i "%f" -vn -acodec libmp3lame -q:a 4 "%~nf.mp3"
@lightsongjs
lightsongjs / Redenumirea_fisierelor_dupa_created_date
Last active July 23, 2022 12:09 — forked from yzhong52/ Dropbox Style Filename
Rename files based on their created date
Redenumirea_fisierelor_dupa_taken_date_sau_modify_date
@lightsongjs
lightsongjs / ffmpeg.md
Created August 22, 2021 04:27 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
import os
import subprocess
def removeSpacesandRenameFileFromFileName (oldFile):
newFileName = oldFile.replace(' ','_')
os.rename(oldFile,newFileName)
return newFileName
fileList = os.listdir(os.getcwd())