Auto-detect system architecture for FFmpeg downloads#11
Auto-detect system architecture for FFmpeg downloads#11
Conversation
Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
|
@copilot Show an error for unsupported architectures instead of defaulting to x64. Delete the unused duplicate TeslaCam folder because everything should be under the SentryReplay folder instead. |
…folder Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Done in commit 9da72af:
|
|
@copilot it doesn't seem to be finding ffmpeg after downloading it. It just keeps saying "FFmpeg is required to play clips" even though it downloaded ".\SentryReplay-0.0.0-arm64\ffmpeg\ffmpeg-master-latest-winarm64-gpl-shared\bin\ffmpeg.exe" |
Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Fixed in commit 1926a68. The BtbN builds have a nested |
Summary: Automatically download the correct architecture for FFMPEG
Changes Made
Core Implementation
System.Runtime.InteropServices.RuntimeInformation.ProcessArchitectureError Handling for Unsupported Architectures
Throws
PlatformNotSupportedExceptionfor any architecture other than x64 or ARM64:Extraction Fix
The BtbN FFmpeg builds have a nested structure with files in a
bindirectory. The extraction now flattens this structure so thatffmpeg.exeand DLLs are extracted directly to theffmpeg/folder instead offfmpeg/ffmpeg-master-latest-winarm64-gpl-shared/bin/. This ensures the application can find FFmpeg after download.Before:
ffmpeg/ffmpeg-master-latest-winarm64-gpl-shared/bin/ffmpeg.exeAfter:
ffmpeg/ffmpeg.exeURL Selection Logic
Testing & Validation
Files Modified
SentryReplay/PackageManager.cs- Added architecture detection, error handling, and flattened extractionSentryReplay.Tests/PackageManagerTests.cs- New test file for PackageManagerTeslaCam/folder (was not part of solution, duplicate code)How It Works
ffmpeg/folderOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.