[Libav-user] Can't decode more than 5 video streams using libav+hwaccel.

Ахмед Анам ahmedanam at mail.ru
Thu Apr 18 15:36:08 EEST 2019


Do you have any idea about it? I don't know how to fix it


>Среда, 17 апреля 2019, 13:14 +03:00 от Ахмед Анам <ahmedanam at mail.ru>:
>
>>  Are the video streams 4K? My guest is you are running out of memory on the GPU.
>
>No, the streams have HD resolution. I run my programm with debug log level and here is output:
>
>[h264 @ 0000013f85b22440] Failed setup for format cuda: hwaccel initialisation returned error
>[h264 @ 0000013f85b22440] Format cuda not usable, retrying get_format() without it.
>[h264 @ 0000013f85b22440] decode_slice_header error
>[h264 @ 0000013f85b22440] no frame!
>[h264 @ 0000013f85b22440] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
>[h264 @ 0000013f85b22440] Format cuda chosen by get_format().
>[h264 @ 0000013f85b22440] Format cuda requires hwaccel initialisation.
>[h264 @ 0000013f85b22440] Loaded lib: nvcuvid.dll
>[h264 @ 0000013f85b22440] Loaded sym: cuvidGetDecoderCaps
>[h264 @ 0000013f85b22440] Loaded sym: cuvidCreateDecoder
>[h264 @ 0000013f85b22440] Loaded sym: cuvidDestroyDecoder
>[h264 @ 0000013f85b22440] Loaded sym: cuvidDecodePicture
>[h264 @ 0000013f85b22440] Loaded sym: cuvidGetDecodeStatus
>[h264 @ 0000013f85b22440] Loaded sym: cuvidReconfigureDecoder
>[h264 @ 0000013f85b22440] Loaded sym: cuvidMapVideoFrame64
>[h264 @ 0000013f85b22440] Loaded sym: cuvidUnmapVideoFrame64
>[h264 @ 0000013f85b22440] Loaded sym: cuvidCtxLockCreate
>[h264 @ 0000013f85b22440] Loaded sym: cuvidCtxLockDestroy
>[h264 @ 0000013f85b22440] Loaded sym: cuvidCtxLock
>[h264 @ 0000013f85b22440] Loaded sym: cuvidCtxUnlock
>[h264 @ 0000013f85b22440] Loaded sym: cuvidCreateVideoSource
>[h264 @ 0000013f85b22440] Loaded sym: cuvidCreateVideoSourceW
>[h264 @ 0000013f85b22440] Loaded sym: cuvidDestroyVideoSource
>[h264 @ 0000013f85b22440] Loaded sym: cuvidSetVideoSourceState
>[h264 @ 0000013f85b22440] Loaded sym: cuvidGetVideoSourceState
>[h264 @ 0000013f85b22440] Loaded sym: cuvidGetSourceVideoFormat
>[h264 @ 0000013f85b22440] Loaded sym: cuvidGetSourceAudioFormat
>[h264 @ 0000013f85b22440] Loaded sym: cuvidCreateVideoParser
>[h264 @ 0000013f85b22440] Loaded sym: cuvidParseVideoData
>[h264 @ 0000013f85b22440] Loaded sym: cuvidDestroyVideoParser
>[h264 @ 0000013f85b22440] NVDEC capabilities:
>[h264 @ 0000013f85b22440] format supported: yes, max_mb_count: 65536
>[h264 @ 0000013f85b22440] min_width: 48, max_width: 4096
>[h264 @ 0000013f85b22440] min_height: 16, max_height: 4096
>[h264 @ 0000013f85bd04c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
>[h264 @ 0000013f1cec7580] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
>[h264 @ 0000013f6efb0f40] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
>
>I've attached the most important code snippet to this mail. Hope it will help.
>
>
>
>>Среда, 17 апреля 2019, 12:21 +03:00 от Hristo Ivanov < hivanov.ffmailing at gmail.com >:
>>
>>Hi.
>>
>>> Is it because of NVIDIA GPUs have concurrent session limitation?
>>
>>There is a session limitation for encoding for sure, but I think there is no such thing for decoding:
>>https://developer.nvidia.com/video-encode-decode-gpu-support-matrix
>>
>>> By the way, I don't understand where these messages are come from. They are just printed in my console.
>>
>>Those messages are from the ffmpeg log. The ffmpeg code is full with calls to 'av_log(void *avcl, int level, const char *fmt, ....)'.
>>Depending on the loglevel in use the messages are printed or ignored.
>>For the ffmpeg tool the '-loglevel' flag can be used to configure what messages should be printed and what messages should not.
>>With the C-API, the ' av_log_set_level(int level)' function can be used to configure the log level.
>>The different log levels can be seen here:
>>
>>https://ffmpeg.org/doxygen/trunk/group__lavu__log__constants.html  
>>
>>Running your program with log level verbose or maybe even debug could give you some clue to why the creation of the 6th decoder fails.
>>
>>Are the video streams 4K? My guest is you are running out of memory on the GPU.
>>
>>Regards.
>>_______________________________________________
>>Libav-user mailing list
>>Libav-user at ffmpeg.org
>>https://ffmpeg.org/mailman/listinfo/libav-user
>>
>>To unsubscribe, visit link above, or email
>>libav-user-request at ffmpeg.org with subject "unsubscribe".
>
>-- 
>С уважением, Ахмед Анам.
>Best regards, Akhmed Anam.


-- 
С уважением, Ахмед Анам.
Best regards, Akhmed Anam.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190418/2f21f036/attachment.html>


More information about the Libav-user mailing list