#2394·moviepy

Feature Request: Expose FFmpeg Hardware Acceleration via User-Friendly API

Author: zeeshanghazanfar97Created Mar 9, 2025Updated Mar 23, 2026
Labelsfeature-request

Description

I’d like to propose adding a user-friendly API to expose FFmpeg’s hardware acceleration options (e.g., NVENC, VAAPI, AMF) for video encoding. Currently, the FFMPEG_VideoWriter class internally allows passing extra FFmpeg parameters via ffmpeg_params, but this is not easily accessible to users.

Proposed Changes

  • Expose hardware acceleration options in a user-friendly way, rather than requiring users to manually pass ffmpeg_params.
  • Add a use_gpu flag in write_videofile(), which automatically configures hardware acceleration if supported.
clip.write_videofile("output.mp4", use_gpu=True, gpu_backend="cuda", codec="h264_nvenc")
  • Improve documentation to guide users on available GPU-accelerated codecs.

Implementation Plan

I’ve found that FFMPEG_VideoWriter already supports passing extra FFmpeg parameters:

if ffmpeg_params is not None:
    cmd.extend(ffmpeg_params)

However, this is not well-documented or easy to use. I’d be happy to work on exposing this feature properly if the maintainers are open to it. Let me know if this aligns with MoviePy’s roadmap!

References

Would love to hear your thoughts!