Skip to content

Instantly share code, notes, and snippets.

@AllySummers
Created April 21, 2025 08:26
Show Gist options
  • Save AllySummers/7ceb598e321c9232f3d5f12260483d03 to your computer and use it in GitHub Desktop.
Save AllySummers/7ceb598e321c9232f3d5f12260483d03 to your computer and use it in GitHub Desktop.
Ass to srt
# Ensure ffmpeg is accessible via PATH or specify the full path to ffmpeg.exe
$ffmpegPath = "ffmpeg" # Replace with full path if necessary, e.g., "C:\Tools\ffmpeg\bin\ffmpeg.exe"
# Get all .ass files in the current directory
$assFiles = Get-ChildItem -Path "." -Filter "*.ass"
foreach ($assFile in $assFiles) {
$inputFile = $assFile.FullName
$outputFile = [System.IO.Path]::ChangeExtension($inputFile, ".srt")
Write-Host "Converting '$inputFile' to '$outputFile'..."
# Execute ffmpeg command to convert .ass to .srt
& $ffmpegPath -y -i $inputFile $outputFile
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment