Closed rugubara closed 7 years ago
This is only for tracking defects; not feature requests.
FYI, as a workaround, can output mlt video as "vcodec=rawvideo", which will produce a huge file (without wasting cpu on compression), and then can run the ffmpeg vaapi command with that raw video as input.
see also #621
This works now with caveats. To use, specify the file name like fs:///full/path/to/video.mp4?hwaccel=vaapi
hwaccel
accepts one the following values:
vaapi
(Linux)cuda
(Linux and Windows)videotoolbox
(macOS)d3d11va
(Windows)dxva2
(Windows)fs://
is needed because MLT currently accepts '?' as a file name character without escape. We hope to change that for next major version currently in development and require '?' in a filename to be escaped with a '\' and subsequently drop the fs://
protocol.
There is currently no plan to make hwaccel
work more automatically and with software fallback. Apps adopting this will have to fully manage all aspects of its usage. That also includes resource limitations (codec profiles, resolution, number of active decoders, etc.) In the context of melt, that management falls back to the user.
very nice - thanks to those who made it happen!
Hello, Although you have https://www.mltframework.org/faq/#is-va-api-supported in your FAQ, I would like to challenge the pre-requisites of this decision.
ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i input.MTS -an -vf 'format=nv12|vaapi,hwupload,scale_vaapi=w=1280:h=720:format=yuv420p,hwdownload,format=nv12' -f null -
at 18x speed and it runs CPU-basedffmpeg -i input.MTS -f null -
at 7x speed. The input file is FullHD x264 high profile footage from a prosumer sony camcorder.When I try to do 2 track edits from 2 cameras in kdenlive (all decoding is CPU based, track compositing, GLSL based wipes), I never get above 7 fps when there are 2 video tracks active at the same time. When there are 3 tracks active - it is 1 fps slide show. 1 track plays at 30 fps fine. kdenlive is configured for xgl consumer.
When I decode and encode back, scaling in VAAPI in between, I can do it at 14x.
ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_forma t vaapi -i input.MTS -an -vf "format=nv12|vaapi,hwupload,scale_vaapi=w=1280:h=720" -c:v h264_vaapi -f mp4 /dev/null
Taking the huge performace impact of using VAAPI, even when I download the processed surfaces to the main memory, I believe enabling VAAPI is worth doing now.