Skip to content

Implement auto-retry with software encoding if GPU encoding fails#702

Open
bharatvansh wants to merge 1 commit into
Tichau:integrationfrom
bharatvansh:feature/auto-retry-software-encoding
Open

Implement auto-retry with software encoding if GPU encoding fails#702
bharatvansh wants to merge 1 commit into
Tichau:integrationfrom
bharatvansh:feature/auto-retry-software-encoding

Conversation

@bharatvansh
Copy link
Copy Markdown
Contributor

This PR adds a new feature that automatically retries file conversion using software encoding (libx264) if the initial GPU-accelerated encoding fails. This improves reliability for users with problematic GPU drivers or unsupported hardware configurations.

Key changes:

  • Added AutoRetrySoftwareEncodingOnGpuFailure setting (enabled by default).
  • Implemented retry logic in ConversionJob_FFMPEG to catch GPU errors and fallback to software.
  • Added localized status messages and error handling for the fallback process.
  • Updated the settings UI with a toggle for this feature.

Testing:

  • Verified that builds succeed.
  • Manually tested the fallback mechanism by simulating GPU encoding failures.

@bharatvansh
Copy link
Copy Markdown
Contributor Author

bharatvansh commented Feb 15, 2026

Screenshots:

Settings page with the new option for auto software retry (default: enabled)

Screenshot 2026-02-16 050747

Case 1 - Auto retry enabled. Forced failure of GPU encoding

Screenshot 2026-02-16 045128 Screenshot 2026-02-16 034635

Case 2 - Auto retry disabled. Forced failure of GPU encoding

Screenshot 2026-02-16 045219

UCHIHAHA103 pushed a commit to UCHIHAHA103/FileConverter that referenced this pull request Apr 26, 2026
…ogging, settings backup, animated webp fix

1. Version bump to 2.2.1 (Application, Installer, version.xml)

2. FFmpeg graceful termination (T-P2):
   - Redirect stdin and send 'q' before killing
   - 3-second timeout before Process.Kill()
   - Prevents zombie ffmpeg processes on cancel

3. GPU encoding auto-fallback (PR Tichau#702 equivalent):
   - When CUDA/AMF encoding fails, automatically retry with libx264
   - Resets state, deletes failed output, rebuilds args for software path
   - Fixes Tichau#713 Tichau#691 Tichau#572

4. FFmpeg stderr logging (T-F1):
   - All ffmpeg stderr output saved to %LocalAppData%/FileConverter/Logs/
   - One log file per conversion job with timestamp
   - Critical for diagnosing conversion failures

5. Settings corruption backup (T-S2):
   - When Settings.user.xml fails to parse, auto-backup as .corrupted.bak
   - User can still choose to reset to defaults
   - Backed-up file available for manual recovery

6. Animated WebP → GIF fix (T-F2):
   - WebP input now goes directly to ffmpeg (skips PNG intermediate)
   - FFmpeg handles animated WebP natively, preserving all frames
   - Fixes Tichau#746 Tichau#513 (animated images losing animation)
UCHIHAHA103 added a commit to UCHIHAHA103/FileConverter that referenced this pull request May 21, 2026
…deadlock, UpgradeService null, GPU auto-retry, zh-CN translation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant