Files
encoderPro/AV1-FIX-SUMMARY.md
2026-01-24 17:43:28 -05:00

3.7 KiB

AV1 Encoder Support - Fix Summary

Problem

When using the av1_quality profile, encoding was falling back to CPU instead of using Intel QSV GPU acceleration.

Root Cause

The EncoderType enum didn't include AV1 variants, so when the config specified encoder: intel_qsv_av1, it failed to map and silently fell back to CPU_X265.

Fix Applied

Added complete AV1 support to reencode.py:

  1. New Encoder Types: INTEL_QSV_AV1, NVIDIA_NVENC_AV1, AMD_VAAPI_AV1, CPU_AV1
  2. Detection: Now checks for av1_qsv, av1_nvenc, av1_vaapi, libsvtav1 encoders
  3. FFmpeg Commands: Proper AV1 encoding commands for each hardware type
  4. Container Format: AV1 automatically uses .mp4 (not .m4v)

Next Steps - Testing in Docker

1. Copy the test script to your Docker container

docker cp test-av1-support.sh encoderpro:/app/

2. Run the test inside the container

docker exec encoderpro bash /app/test-av1-support.sh

3. Check the output

Expected Results:

If Intel QSV AV1 is supported (Arc A-Series GPUs):

Intel QSV AV1:
V..... av1_qsv              AV1 (Intel Quick Sync Video acceleration)
  [FOUND]

If Intel QSV AV1 is NOT supported (older GPUs or FFmpeg build):

Intel QSV AV1:
  [NOT FOUND]

Scenarios

Scenario A: Intel QSV AV1 is Available

Your GPU supports AV1!

  • The av1_quality profile will now use GPU acceleration
  • You should see fast encoding speeds (80-150 fps)
  • Use profiles: av1_quality, av1_qsv, sweetspot_av1

Scenario B: Intel QSV AV1 is NOT Available

⚠️ Your GPU doesn't support AV1 (integrated graphics or older Arc GPU)

Options:

  1. Use H.265 instead (recommended):

    • Change to sweetspot_qsv or quality_qsv profiles
    • Still uses GPU, excellent quality
  2. Use CPU AV1 (very slow):

    • Keep using av1_quality - will fallback to CPU
    • Much slower but will work
  3. Update FFmpeg build:

    • Docker image might need newer FFmpeg with AV1 support

How to Switch Profiles

If AV1 isn't supported, update your config.yaml:

profiles:
  # Change from:
  # default: av1_quality

  # To:
  default: sweetspot_qsv  # H.265 GPU encoding - fast & excellent quality

Or select a different profile in the dashboard dropdown.

Testing the Fix

  1. Run the test script in Docker (above)

  2. Check encoder capabilities when running reencode.py:

    docker exec encoderpro python3 /app/reencode.py -c /config/config.yaml --stats
    

    Look for:

    ENCODER CAPABILITIES
    ============================================================
    Intel QSV:        [YES]
      AV1:            [YES]  ← This line shows if QSV AV1 is available
    
  3. Try encoding a file with the dashboard

    • Select a file
    • Choose av1_quality or sweetspot_qsv profile
    • Click "Encode Selected"
    • Check the logs to see which encoder is used

Relevant Config Profiles

From your config.yaml:

# AV1 Profiles (require Arc A-Series or newer)
sweetspot_av1:
  encoder: intel_qsv_av1   # Now properly recognized!
  preset: medium
  quality: 27

av1_quality:
  encoder: intel_qsv_av1   # This was failing before, fixed now
  preset: slow
  quality: 24

# H.265 Profiles (work on all Intel GPUs with QSV)
sweetspot_qsv:
  encoder: intel_qsv_h265  # Safe fallback, excellent quality
  preset: slow
  quality: 21

Files Modified

  • reencode.py - Added AV1 support (lines 56-69, 88-103, 230-245, 715-803, 1024-1046)

Questions to Answer

After running the test script in Docker:

  1. Does your FFmpeg build have av1_qsv encoder?
  2. What GPU do you have? (Arc A380/A750/A770 support AV1, integrated graphics may not)
  3. Do you want to use H.265 instead if AV1 isn't available?