on-internet
← Community

Encode video from C++ using libavcodec and VAAPI

Stack Overflow ·

I am trying to encode a video in H.264 with libavcodec (version 3.4.6). It works when I use the software encoder "libx264", however it does not when I try to use the hardware encoder of my Intel cpu with VAAPI. Hardware encoding with ffmpeg via VAAPI works from the command line (using commands from here). Apparently, there is no example or tutorial how to encode with VAAPI and libav*. I read through those of ffmpeg's examples that cover a related use case (hardware decoding, software encoding, muxing) and tried to adapt them accordingly. When I setup the VAAPI encoder, avcodec_open2() returns

Comments

Sign in or sign up to comment and upvote.

No comments yet.