···11+# Define the path to ffmpeg.exe
22+$ffmpegPath = "C:\Users\jhuet\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-7.0.1-full_build\bin\ffmpeg.exe"
33+44+# Get all .mkv files in the current directory
55+$files = Get-ChildItem -Path . -Filter *.mkv
66+77+foreach ($file in $files) {
88+ # Define the output file name
99+ $outputFile = [System.IO.Path]::ChangeExtension($file.FullName, "h264.mkv")
1010+1111+ # Build the ffmpeg command
1212+ $ffmpegCommand = "$ffmpegPath -i `"$($file.FullName)`" -c:v libx264 -c:a copy `"$outputFile`""
1313+1414+ # Execute the ffmpeg command
1515+ Write-Host "Converting $($file.FullName) to $outputFile"
1616+ Invoke-Expression $ffmpegCommand
1717+}
1818+1919+Write-Host "Conversion complete!"
2020+
+11
scripts/convert_from_hvec_to_h264.sh
···11+#!/bin/bash
22+33+# Iterate through all .mkv files in the current directory
44+for file in *.mkv; do
55+ if [ -e "$file" ]; then
66+ echo "Converting $file..."
77+ ffmpeg -i "$file" -c:v libx264 -crf 23 -preset medium -c:a copy "${file%.*}.mp4"
88+ fi
99+done
1010+1111+echo "Conversion complete."