Only audio in mp4 after export on linux with hw encoding

Hi guys!

I have linux mint 19.1 cinnamon with nvidia gt 1030 and latest 19.07.15 Shortcut.
Then I export video without hardware acceleration - everything ok, I have video and audio stream on result file. But if I try to select nvenc or vaapi, output file doesn’t have video stream, only audio.

Proprietary NVidia driver with cuda is installed:

root@denis-desktop:~# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG4Simple : VAEntrypointVLD
VAProfileMPEG4AdvancedSimple : VAEntrypointVLD
: VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD

root@denis-desktop:~# nvidia-smi
Mon Jul 29 19:23:44 2019
±----------------------------------------------------------------------------+
| NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GT 1030 Off | 00000000:01:00.0 On | N/A |
| 0% 37C P0 N/A / 30W | 253MiB / 1994MiB | 1% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1344 G /usr/lib/xorg/Xorg 123MiB |
| 0 1768 G cinnamon 39MiB |
| 0 1982 G …-token=28E735870610B3C2C88675CFB35B10F1 4MiB |
| 0 2312 G bin/shotcut 50MiB |
| 0 3393 G …quest-channel-token=9463233308634352503 32MiB |
| 0 4761 G /usr/bin/nvidia-settings 1MiB |
±----------------------------------------------------------------------------+

Related to this:

On Linux, when using NVIDIA, I highly recommend using NVENC over VAAPI.
Like in the other thread, look at the export job log.

Hi Dan, thanks for fast reply.
I have 2 runs with different codecs, and in both get error:

h264_nvenc:

QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/run/user/1000/snap.shotcut', 
please create it with 0700 permissions.
[h264_nvenc @ 0x7f7a20001e80] Loaded Nvenc version 9.0
[h264_nvenc @ 0x7f7a20001e80] Nvenc initialized successfully
[h264_nvenc @ 0x7f7a20001e80] 1 CUDA capable devices found
[h264_nvenc @ 0x7f7a20001e80] [ GPU #0 - < GeForce GT 1030 > has Compute SM 6.1 ]
[h264_nvenc @ 0x7f7a20001e80] OpenEncodeSessionEx failed: unsupported device (2)
[h264_nvenc @ 0x7f7a20001e80] No NVENC capable devices found
[h264_nvenc @ 0x7f7a20001e80] Nvenc unloaded
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f7a2023b280] unsupported color_parameter_type aclc
[h264 @ 0x7f7a2003dc40] Reinit context to 1920x1088, pix_fmt: yuvj420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f7a20432f00] unsupported color_parameter_type aclc
[h264 @ 0x7f7a20199a40] Reinit context to 1920x1088, pix_fmt: yuvj420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f7a204c61c0] unsupported color_parameter_type aclc
[h264 @ 0x7f7a204cfd00] Reinit context to 1920x1088, pix_fmt: yuvj420p
[producer avformat] audio: total_streams 1 max_stream 1 total_channels 2 max_channels 2
[AVIOContext @ 0x7f7a2023aa00] Statistics: 585584 bytes read, 1 seeks
[producer avformat-novalidate] /media/denis/929ECE219ECDFDAB/_from_d/!dvideo!/org/2018/Kipr/YDXJ0310.mp4
    checking VFR: pkt.duration 8008
[h264 @ 0x7f7a2023ad00] Reinit context to 1920x1088, pix_fmt: yuvj420p
[filter vidstab] Load results from /home/denis/Videos/kipr2018/4.stab
[filter vidstab] Successfully loaded 266 motions
[vidstab] Final zoom: 4,196788
[mp4 @ 0x7f7a20000f00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[mp4 @ 0x7f7a20000f00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.

And h264vaapi:

QStandardPaths: XDG_RUNTIME_DIR points to non-existing path ‘/run/user/1000/snap.shotcut’, please create it with 0700 permissions.

[AVHWDeviceContext @ 0x7ff8c8019440] Opened VA display via X11 display :0.

libva info: VA-API version 0.39.0

libva info: va_getDriverName() returns 0

libva info: Trying to open /snap/shotcut/49/Shotcut.app/lib/va/nvidia_drv_video.so

libva info: va_openDriver() returns -1

[AVHWDeviceContext @ 0x7ff8c8019440] Failed to initialise VAAPI connection: -1 (unknown libva error).

Failed to create VAAPI device.

[consumer avformat] Failed to initialize VA-API: -5

[h264_vaapi @ 0x7ff8c8001e80] A hardware frames reference is required to associate the encoding device.

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff8c8029000] unsupported color_parameter_type aclc

[h264 @ 0x7ff8c802aa80] Reinit context to 1920x1088, pix_fmt: yuvj420p

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff8c805b900] unsupported color_parameter_type aclc

[h264 @ 0x7ff8c8058180] Reinit context to 1920x1088, pix_fmt: yuvj420p

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff8c8064a00] unsupported color_parameter_type aclc

[h264 @ 0x7ff8c80605c0] Reinit context to 1920x1088, pix_fmt: yuvj420p

[producer avformat] audio: total_streams 1 max_stream 1 total_channels 2 max_channels 2

[AVIOContext @ 0x7ff8c8031c80] Statistics: 585584 bytes read, 1 seeks

[producer avformat-novalidate] /media/denis/929ECE219ECDFDAB/_from_d/!dvideo!/org/2018/Kipr/YDXJ0310.mp4

checking VFR: pkt.duration 8008

[h264 @ 0x7ff8c805f880] Reinit context to 1920x1088, pix_fmt: yuvj420p

[filter vidstab] Load results from /home/denis/Videos/kipr2018/4.stab

[filter vidstab] Successfully loaded 266 motions

[vidstab] Final zoom: 4,196788

[mp4 @ 0x7ff8c8000f00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.

[mp4 @ 0x7ff8c8000f00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.

[h264_nvenc @ 0x7f7a20001e80] OpenEncodeSessionEx failed: unsupported device (2)
[h264_nvenc @ 0x7f7a20001e80] No NVENC capable devices found

This says it all. Your card does not support NVENC.

NO all across the board. If you leave everything unchecked in the configure dialog and then click to enable hardware encoder checkbox, it probes your system to see what it supports. Status messages are displayed in the middle of the Shotcut window below the player controls.

Hello.

Just a heads up, if your card suppose to support NVENC, you might need to disable Instant Replay for the encoding. It seems to block NVENC device while Instant Replay is on. My personal expirience says that it didn’t block before, but does now for some reason.

Check my linked thread for the more info.

Thanks guys, Dan was right, 1030 only one card in Pascal generation not supporting hvenc, only hvdec. Sad, but you save me one or two days.

This topic was automatically closed after 90 days. New replies are no longer allowed.