Skip to content

Instantly share code, notes, and snippets.

# Define the path to FFmpeg executable
$ffmpegPath = "ffmpeg" # Modify this if FFmpeg is not in your PATH
# Function to check if FFmpeg is installed
function Check-FFmpeg {
try {
& $ffmpegPath -version | Out-Null
return $true
} catch {
Write-Host "FFmpeg is not installed or not found in the specified path." -ForegroundColor Red
<#
.SYNOPSIS
Multi-format Audio Track Encoder for MKV files
.DESCRIPTION
Extracts and encodes audio tracks from MKV files to FDK AAC and Opus formats
with intelligent bitrate selection and metadata preservation.
.PARAMETER InputFile
Path to the input MKV file
.PARAMETER OutputDir
Directory to save encoded audio files
# Скрипт переименования видеофайлов по данным TheTV DB
param(
[string]$FolderPath = "C:\Videos",
[string]$ApiKey = "YOUR_THETVDB_API_KEY"
)
# Подключение необходимых библиотек
Add-Type -AssemblyName System.Web.Extensions
function Get-TvShowMetadata {
<#
# Одиночная обработка с удалением исходного файла
Invoke-MKVRemux -InputFile "video.mkv" -FrameRate 25 -CleanTags -RemoveSource
# Пакетная обработка с удалением исходных файлов
Get-ChildItem "C:\Videos\*.mkv" | Start-BatchMKVRemux -FrameRate 25 -CleanTags -RemoveSource
# Пакетная обработка с предпросмотром (без реального выполнения)
Get-ChildItem "C:\Videos\*.mkv" | Start-BatchMKVRemux -FrameRate 25 -CleanTags -RemoveSource -WhatIf