2

Can anyone explain how hwaccel decode, filter and encode work in FFMpeg libavcodec ? What is the big picture ? What are the major functions and structures ?
Is there any difference in how VAAPI and CUDA GPUs are handled ? Any example code for decode, filter and encode for both VAAPI and CUDA will be great.

whadhack
  • 51
  • 6
  • 1
    Check the codebase - see https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c, https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/vaapi_encode.c and https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/vaapi_transcode.c – Gyan Dec 03 '18 at 05:55
  • Thanks, that is good for starting out. However both liavcodec and ffmpeg uses different and (probably more complex) calls than that. For example ffmpeg does not use av_hwframe_transfer_data and av_image_copy_to_buffer for transcoding, scaling and saving an RTSP stream into a file. WIll be good to have some pointers for that level of details. Please feel free point in the right direction or add the content here if you can . – whadhack Dec 05 '18 at 17:26

0 Answers0