Opened 17 months ago
Last modified 16 months ago
#10517 new defect
NVDEC "No decoder surfaces left" with bad (corrupted) video stream.
Reported by: | ua0lnj | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | nvdec |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Difficult to reproduce.
In case of poor receive from a satellite or the air, a broken stream arrives, there is no problem with vaapi, vdpau and cuvid hwdecs. With nvdec after a while, the decoder stops working.
How I tested.
Application used: softhdcevice plugin for vdr, test branch.
https://github.com/ua0lnj/vdr-plugin-softhddevice/tree/test
NVDEC code was added:
https://github.com/ua0lnj/vdr-plugin-softhddevice/commit/27a305336999553e24e680f823c417f45d64ae00
Attachments (1)
Change History (10)
by , 17 months ago
Attachment: | ffmpeg.log added |
---|
comment:1 by , 17 months ago
Description: | modified (diff) |
---|
comment:2 by , 17 months ago
comment:3 by , 17 months ago
This is a realtime dvb receive, I don't know if I can record a broken stream and what size it will be.
comment:4 by , 17 months ago
Please try to record. We have bugs like that but they are usually very complex. Does it happen with -threads 1 or -threads 2?
comment:6 by , 16 months ago
I uploded ts file, ~10 min h.264.
https://streams.videolan.org/ffmpeg/incoming/10517/
The main error occurs at 7-8 minutes. I solved the problem by reopening the codec, when it starts giving errors.
https://github.com/ua0lnj/vdr-plugin-softhddevice/commit/926992a8e8e32d1068537af547cab921e9f0861c
Maybe MPV does the same, after a short delay, playback continues.
Terrible recording, MPV can not cope with sound synchronization, VLC copes, VDR with softhddevice is best :)
comment:7 by , 16 months ago
Strange. I cannot see any "No decoder surfaces left" I am using Turing.
ffmpeg.exe -hwaccel nvdec -i 00001.ts -f null -
I can see a lot of "Application provided invalid, non monotonically increasing dts to muxer in stream" though.
Also both cuvid and nvdec give "Error submitting packet to decoder: Invalid data found when processing input"
Also ffplay.exe -vcodec h264_cuvid 00001.ts
appears to have no such warnings but incorrectly reorders the frames. Sigh, ffplay.exe 00001.ts has no such problem.
comment:8 by , 16 months ago
Try mpv with nvdec.
I can't reproduce the error with ffmpeg, but with mpv it is reproduced
[ffmpeg/video] h264: No decoder surfaces left
Error while decoding frame (hardware decoding)!
[ffmpeg/video] h264: reference picture missing during reorder
[ffmpeg/video] h264: reference picture missing during reorder
[ffmpeg/video] h264: reference picture missing during reorder
[ffmpeg/video] h264: Missing reference picture, default is 65537
[ffmpeg/video] h264: Missing reference picture, default is 65537
[ffmpeg/video] h264: Missing reference picture, default is 65537
[ffmpeg/video] h264: No decoder surfaces left
Error while decoding frame (hardware decoding)!
You need to play the entire file, if only a segment, then no error occurs, perhaps this is a cumulative error.
comment:9 by , 16 months ago
Just tried mpv.com --target-colorspace-hint=yes -hwdec=nvdec --gpu-api=vulkan -vo=gpu-next 00001.ts
[ffmpeg/video] h264: No decoder surfaces left
Error while decoding frame (hardware decoding)!
is there, yep.
where is the sample?