hwaccel_windows.go 1018 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //go:build windows
  2. // +build windows
  3. package transcoder
  4. /*
  5. hwaccel_windows.go
  6. On Windows, ffmpeg's h264_nvenc (NVIDIA), h264_qsv (Intel Quick Sync) and
  7. h264_amf (AMD AMF) encoders all accept plain system-memory frames
  8. directly, so no explicit hardware device/frames-context setup is needed
  9. (unlike VAAPI on Linux). NVIDIA is tried first as the most broadly capable
  10. path, then Intel Quick Sync, then AMD as the fallback for machines with
  11. neither.
  12. */
  13. func candidateHWProfiles() []*hwEncoderProfile {
  14. return []*hwEncoderProfile{
  15. {
  16. Name: "NVIDIA NVENC",
  17. Codec: "h264_nvenc",
  18. ScaleFilter: nv12ScaleFilter,
  19. EncodeArgs: []string{"-preset", "fast"},
  20. },
  21. {
  22. Name: "Intel Quick Sync (QSV)",
  23. Codec: "h264_qsv",
  24. ScaleFilter: nv12ScaleFilter,
  25. EncodeArgs: []string{"-preset", "fast"},
  26. },
  27. {
  28. Name: "AMD AMF",
  29. Codec: "h264_amf",
  30. ScaleFilter: nv12ScaleFilter,
  31. EncodeArgs: []string{"-quality", "speed", "-usage", "transcoding"},
  32. },
  33. }
  34. }