I’m on Linux and trying to render a simple video with hardware acceleration. I’m running KDE and my GPU is an MX150 but it still makes a huge difference in render time. However after the render is done the video ends up being just a black screen. I just chose H.264 Main Profile
and then in Advanced changed the FPS to 30.
Here are my settings - https://imgur.com/a/OcidT7o
And here is the final output log after the render is “finished”
mlt_repository_init: failed to dlopen /usr/lib/mlt/libmltopencv.so
(libopencv_tracking.so.4.1: cannot open shared object file: No such file or directory)
mlt_repository_init: failed to dlopen /usr/lib/mlt/libmltsox.so
(libsox.so.3: cannot open shared object file: No such file or directory)
[h264 @ 0x7f00c000a180] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c001cb00] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264_nvenc @ 0x7f00b8001d00] Loaded Nvenc version 9.0
[h264_nvenc @ 0x7f00b8001d00] Nvenc initialized successfully
[h264 @ 0x7f00c005bec0] Reinit context to 1920x1088, pix_fmt: yuv420p
[producer avformat] audio: total_streams 1 max_stream 1 total_channels 2 max_channels 2
[AVIOContext @ 0x7f00c0011380] Statistics: 81062 bytes read, 2 seeks
[producer avformat-novalidate] /home/kiko/Videos/amy.mp4
checking VFR: pkt.duration 256
[filter swresample] 2(stereo) f32le 44100Hz -> 2(stereo) f32le 48000Hz
[h264_nvenc @ 0x7f00b8001d00] 1 CUDA capable devices found
[h264_nvenc @ 0x7f00b8001d00] [ GPU #0 - < GeForce MX150 > has Compute SM 6.1 ]
[h264_nvenc @ 0x7f00b8001d00] OpenEncodeSessionEx failed: unsupported device (2)
[h264_nvenc @ 0x7f00b8001d00] No NVENC capable devices found
[h264_nvenc @ 0x7f00b8001d00] Nvenc unloaded
[mp4 @ 0x7f00b8000f00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[mp4 @ 0x7f00b8000f00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[h264 @ 0x7f00c064f840] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06f84c0] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c0535540] Reinit context to 1920x1088, pix_fmt: yuv420p
[producer avformat] audio: total_streams 1 max_stream 1 total_channels 2 max_channels 2
[AVIOContext @ 0x7f00c06f7080] Statistics: 616661 bytes read, 2 seeks
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
checking VFR: pkt.duration 1001
[filter swresample] 2(stereo) f32le 44100Hz -> 2(stereo) f32le 48000Hz
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[AVIOContext @ 0x7f00c00461c0] Statistics: 2309286 bytes read, 2 seeks
[AVIOContext @ 0x7f00c00a6d00] Statistics: 146598 bytes read, 2 seeks
[h264 @ 0x7f00c00270c0] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c0017cc0] Reinit context to 1920x1088, pix_fmt: yuv420p
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11794], current_position=[11793], int_position=[0], pts=[-9223372036854775808]
[h264 @ 0x7f00c00daa40] Reinit context to 1920x1088, pix_fmt: yuv420p
[producer avformat] audio: total_streams 1 max_stream 1 total_channels 2 max_channels 2
[AVIOContext @ 0x7f00c003ef00] Statistics: 81062 bytes read, 2 seeks
[producer avformat-novalidate] /home/kiko/Videos/amy.mp4
checking VFR: pkt.duration 256
[filter swresample] 2(stereo) f32le 44100Hz -> 2(stereo) f32le 48000Hz
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11795], current_position=[11794], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11796], current_position=[11795], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11797], current_position=[11796], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11798], current_position=[11797], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11799], current_position=[11798], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11800], current_position=[11799], int_position=[0], pts=[-9223372036854775808]
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f00c06e4b40] Reinit context to 1920x1088, pix_fmt: yuv420p
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11801], current_position=[11799], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11802], current_position=[11801], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11803], current_position=[11802], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11803], current_position=[11802], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11804], current_position=[11802], int_position=[0], pts=[-9223372036854775808]
[producer avformat-novalidate] /home/kiko/Desktop/videos/IO4.mp4
WILD TIMESTAMP: pkt.pts=[-9223372036854775808], pkt.dts=[-9223372036854775808], req_position=[11804], current_position=[11802], int_position=[0], pts=[-9223372036854775808]
Current Frame: 24043, percentage: 99
Current Frame: 24047, percentage: 99
Current Frame: 24053, percentage: 99
Current Frame: 24059, percentage: 99
Current Frame: 24065, percentage: 99
Current Frame: 24070, percentage: 99
Current Frame: 24076, percentage: 99
Current Frame: 24080, percentage: 99
Current Frame: 24084, percentage: 99
Current Frame: 24090, percentage: 99
Current Frame: 24096, percentage: 99
Current Frame: 24101, percentage: 99
Current Frame: 24102, percentage: 99
Current Frame: 24104, percentage: 99
[mp4 @ 0x7f00b8000f00] Starting second pass: moving the moov atom to the beginning of the file
[AVIOContext @ 0x7f00b8752f00] Statistics: 19212919 bytes read, 0 seeks
[aac @ 0x7f00b80392c0] Qavg: 1642,200
[AVIOContext @ 0x7f00b8341180] Statistics: 4 seeks, 151 writeouts
[AVIOContext @ 0x7f00c001b9c0] Statistics: 25246886 bytes read, 27 seeks
[AVIOContext @ 0x7f00c005b680] Statistics: 146598 bytes read, 2 seeks
[AVIOContext @ 0x7f00c073d340] Statistics: 108785992 bytes read, 4 seeks
[AVIOContext @ 0x7f00c041e8c0] Statistics: 302952783 bytes read, 245 seeks
Completed successfully in 00:05:25
And the video size is only 18MB.
Meanwhile another video without the hardware encoder ended up fine, but rendering it took over 20 minutes. Is there any way to get the hardware encoder to work?
Also I tried opening the exported video in Shotcut and it was a white screen instead of a black screen and the video
tab in properties wouldn’t open.
EDIT: I’ve now discovered that hardware acceleration at least works in Windows, but only with h264_qsv and hevc_qsv, other configurations only seemed to produce the same black screen as back in Linux. I’ll report back later to see if different configs in Linux fix it too.
EDIT 2: I’ve tried every possible combination of hardware encoder settings in Linux and noticed that vaapi does not work at all - it fails every time, while nvenc at least renders, but afterwards the video itself is missing.
EDIT 3: I think I’m on to something. Right now I have both h264_nvenc and hevc_nvenc checked for the hardware encoder, but I manually changed the codec to libx264 and this time it worked! I don’t know why, but when Shotcut was automatically selecting the codecs h264_nvenc and hevc_nvenc, the video never worked, but now it seems to do the trick with libx264.