basepaster.blogg.se

Ffmpeg windows 1 click intel
Ffmpeg windows 1 click intel




  1. #Ffmpeg windows 1 click intel how to
  2. #Ffmpeg windows 1 click intel mac os x
  3. #Ffmpeg windows 1 click intel mac os

So I choose not to use VA-API at all and I had to implement the acceleration for an Intel card. I don't know how much harder(or maybe simpler?) is to implement decoding via VA-API since all the examples I've seen were quite intimidating. First of all there is no decoder for VA-API in FFmpeg so avcodec_find_decoder_by_name("h264_vaapi") doesn't make any sense: it is nullptr. Since my original question was regarding VA-API I can't not leave it unanswered. I've spent much time on it myself before I realized that there is no simple, one-line way of implementing HW accelerated decoding on Linux.

ffmpeg windows 1 click intel

And I hope that my answer will aid someone in implementing the HW acceleration on Linux. The problem with all of it is that you can't just get it working from FFmpeg you need to understand at least basics of the VDPAU API. Also I've used BGRA format which was more suitable for my needs maybe you will choose another. While it has some "external" objects used inside you should be able to understand it once you have implemented the "get buffer" part(to which the aforementioned examples are of great help). If(status = VDP_STATUS_OK & av_frame_copy_props(tmframe, frame) = 0) VdpStatus status = vdp_output_surface_get_bits_native(surface, nullptr, If(av_frame_get_buffer(tmframe, 32) >= 0) VdpVideoSurface videoSurface = renderState->surface Īuto status = vdp_video_mixer_render(vdpauDecoder->m_VdpMixer, Vdp_output_surface_create(m_VdpDevice, VDP_RGBA_FORMAT_B8G8R8A8, frame->width, frame->height, &surface) Īuto renderState = reinterpret_cast(frame->data) VdpauDecoder* vdpauDecoder = static_cast(context->opaque) That's why you might want to use the following procedure to extract the data from a GPU: bool VdpauDecoder::fillFrameWithData(AVCodecContext* context, Both examples uses VdpVideoSurfaceGetBitsYCbCr which killed all the performance I gained on my machine.

ffmpeg windows 1 click intel

The only things both aforementioned examples lack is proper copying of the decoded frame to the main memory. In my opinion the libavg implementation is easier to grasp, though. You can also consult ffmpeg_vdpau.c to get another implementation to compare. libavg has VDPAUDecoder class which is perfectly clear and which I've based my implementation on.

#Ffmpeg windows 1 click intel how to

Happily, you don't have to come up with a solution on your own: there are at least 2 good examples of how to achieve that: libavg and FFmpeg itself.

ffmpeg windows 1 click intel

That's because it is only the beginning, you have to write much more code to get the acceleration working. You might be surprised to find out that it doesn't change anything and you have no acceleration at all.

#Ffmpeg windows 1 click intel mac os

And it may seems perfectly reasonable to use vdpau decoder like in the Mac OS example above: avcodec_find_decoder_by_name("h264_vdpau") FFmpeg has 2 HW accelerators on Linux: VDPAU(Nvidia) and VAAPI(Intel) and only one HW decoder: for VDPAU. On Linux things are much more complicated(who is surprised?). To get HW acceleration working on Mac OS you should just use the following: avcodec_find_decoder_by_name("h264_vda") Note, however that you can accelerate h264 videos only on Mac OS with FFmpeg.

#Ffmpeg windows 1 click intel mac os x

So let's start with the easiest: Mac OS X I will update the answer when I get my hands on Windows implementation as well. After some investigation I was able to implement the necessary HW accelerated decoding on OS X (VDA) and Linux (VDPAU).






Ffmpeg windows 1 click intel