Created
April 21, 2025 08:26
-
-
Save AllySummers/7ceb598e321c9232f3d5f12260483d03 to your computer and use it in GitHub Desktop.
Ass to srt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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