On 10/10/18 23:22, Steven Toth wrote:
Thanks for sharing Mark.
I do have other ffmpeg pipelines that work very nicely - but are a mix
of S/W and GPU for various stages. I neglected to mention these for
the sake of brevity. I'm looking for a solution that completely
constrains the pipeline to GPU only.
> $ ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device
/dev/dri/renderD128 -i in.mp4 -an -vf 'fps=30,scale_vaapi=1280:720' -c:v
h264_vaapi -b:v 2M out.mp4
Does fps=30 in your example demonstrate that something in the GPU
between the decoder and the scaler is in fact dropping decoded frames?
Or are those surfaces actually being returned to ffmpegs internal
graph only to be dropped (or forwarded back to the scaler)?
The fps filter doesn't care about the frame data at all, so it works on any type of
frame. That includes those which are stored in hardware surfaces and opaque to the CPU -
VAAPI, D3D, OpenCL, etc.
If surface handles are being returned to ffmpegs graph, to be
dropped
or forwarded then this is perfect.
Yes, that is what is happening.
- Mark