PowerShell module for reconstructing RAR archives from SRR files and MKV/AVI samples from SRS files.
Install-Module -Name ReScenePSgit clone https://github.com/tablackburn/ReScenePS.git
cd ReScenePS
./build.ps1 -Bootstrap
./build.ps1 -Task Build
Import-Module ./Output/ReScenePS/ReScenePS.psd1- PowerShell 7.0+
- CRC Module:
Install-Module -Name CRC
# Simple usage - auto-detects SRR and source files in current directory
Invoke-SrrRestore
# Explicit paths
Invoke-SrrRestore -SrrFile "release.srr" -SourcePath "./sources" -OutputPath "./output"
# Keep source files after reconstruction
Invoke-SrrRestore -KeepSrr -KeepSources# MKV sample reconstruction
Restore-SrsVideo -SrsFilePath "sample.srs" -SourcePath "main.mkv" -OutputPath "sample.mkv"
# AVI sample reconstruction (auto-detected from SRS format)
Restore-SrsVideo -SrsFilePath "sample.srs" -SourcePath "main.avi" -OutputPath "sample.avi"# Display SRR structure and metadata
Show-SrrInfo -SrrFile "release.srr"
# Get SRS metadata
ConvertFrom-SrsFileMetadata -FilePath "sample.srs"| Function | Description |
|---|---|
Show-SrrInfo |
Display SRR file metadata and block structure |
Get-SrrBlock |
Parse SRR file and return block objects |
Invoke-SrrReconstruct |
Reconstruct RAR files from SRR and source files |
Invoke-SrrRestore |
Complete end-to-end restoration with validation and cleanup |
| Function | Description |
|---|---|
Restore-SrsVideo |
High-level sample reconstruction (MKV/AVI auto-detected) |
ConvertFrom-SrsFileMetadata |
Parse SRS file and return metadata object |
Build-SampleMkvFromSrs |
Reconstruct MKV sample from SRS and track data |
Build-SampleAviFromSrs |
Reconstruct AVI sample from SRS and source data |
Export-SampleTrackData |
Extract track data from source video |
This project uses PowerShellBuild + psake for builds:
# Install build dependencies
./build.ps1 -Bootstrap
# Run tests
./build.ps1 -Task Test
# Build module
./build.ps1 -Task Build
# Run PSScriptAnalyzer
./build.ps1 -Task Analyze
# List all available tasks
./build.ps1 -HelpOpen the project in VSCode and use:
Ctrl+Shift+B- Build moduleCtrl+Shift+T- Run tests
ReScenePS/
├── ReScenePS/
│ ├── Classes/ # Block type definitions
│ ├── Private/ # Internal helper functions
│ ├── Public/ # Exported cmdlets
│ ├── ReScenePS.psd1 # Module manifest
│ └── ReScenePS.psm1 # Module loader
├── tests/
│ ├── Manifest.tests.ps1
│ ├── Help.tests.ps1
│ └── Meta.tests.ps1
├── .github/workflows/ # CI/CD
├── .vscode/ # VSCode configuration
├── build.ps1 # Build entry point
├── build.psake.ps1 # Build tasks
├── build.depend.psd1 # Build dependencies
└── requirements.psd1 # Runtime dependencies
See ARCHITECTURE.md for detailed documentation on:
- Binary file formats (SRR, SRS, RAR, EBML)
- Module internals and class structure
- Reconstruction algorithms
- Test infrastructure and Plex integration
SRR files contain RAR metadata without the actual file data:
- Parse SRR to extract block structure (headers, file entries)
- Locate source files matching the expected names and sizes
- Reconstruct RAR volumes by combining headers from SRR with data from source files
- Validate CRCs against embedded SFV checksums
SRS files contain MKV structure without frame data:
- Parse SRS to get track metadata and byte offsets where data matches
- Extract matching track data from the full source MKV
- Rebuild sample by injecting extracted data into the SRS structure
This project was developed with assistance from Claude by Anthropic.
MIT