[Libav-user] How to use the h264_nvenc encoder instead of libx264?
Joel Ng
blood_elves88 at yahoo.com.sg
Fri Feb 10 11:38:22 EET 2017
> Just follow the muxing or encoding example, find the codec by:
>
> avcodec_find_encoder_by_name("nvenc_h264"); // replace
> `avcodec_find_encoder(codec_id)`
>
>
>
> On Fri, Feb 10, 2017 at 2:10 PM, Joel Ng
> <blood_elves88-at-yahoo.com.sg at ffmpeg.org
> <mailto:blood_elves88-at-yahoo.com.sg at ffmpeg.org>> wrote:
>
> I have written an application that takes in raw yuv420 frames and
> produces h264 video using libx264. It works great. However, I want
> to do the encoding on the GPU instead, and I know that FFmpeg
> supports this via h264_nvenc. I tried this using the FFmpeg
> application and it also works great.
>
> I don't want to call an external application to do this though. How
> do I get the C code to use h264_nvenc instead of libx264? I've not
> seen any code option where I can set the encoder.
>
> Thanks,
> Joel
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org <mailto:Libav-user at ffmpeg.org>
> http://ffmpeg.org/mailman/listinfo/libav-user
> <http://ffmpeg.org/mailman/listinfo/libav-user>
>
>
>
>
> --
> Shu. Wang @ Bestminr
> http://halfelf.me
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
Awesome thanks, that works.
Joel
More information about the Libav-user
mailing list