Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videotoolbox failing: The hardware encoder may be busy, or not supported. #851

Open
skorphil opened this issue Aug 26, 2024 · 0 comments
Open

Comments

@skorphil
Copy link

Hi, i'm trying to run this code on Apple m1:

process = (
            ffmpeg
            .input(config.get("src_file"))
            .output(
                config.get("out_file"), 
                **{"c:v": "hevc_videotoolbox", 
                "b:v": 2000000,
                "s": "1280x720",
                "tag:v":"hcv1"}, 
                map_metadata='0'
            )
            .overwrite_output()
            .run(capture_stdout=False, capture_stderr=True)
        )

and ffmpeg returning error:

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_videotoolbox))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[hevc_videotoolbox @ 0x7fa5bf815000] Error: cannot create compression session: -12908
[hevc_videotoolbox @ 0x7fa5bf815000] Try -allow_sw 1. The hardware encoder may be busy, or not supported.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Any way to fix this? Do i need to install additional packages or what can i do?
It works only if i not specify c:v

@skorphil skorphil changed the title ffmpeg-python. Videotoolbox failing: The hardware encoder may be busy, or not supported. Videotoolbox failing: The hardware encoder may be busy, or not supported. Aug 26, 2024
@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
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

No branches or pull requests

6 participants
@skorphil and others