#8442 closed defect (fixed)
CUDA mpeg2-decode issue (hwaccel)
Reported by: | barhom | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | cuda |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
The new CUDA HW mpeg2 decoder is producing bad and pixelated decoding on some video.
The legacy CUVID mpeg2_cuvid decoder is producing expected output.
The testing has been made with a NVIDIA GTX 1050 Ti GPU with Driver version 440.31 and Cuda 10.2.
FFmpeg version used: git-2019-11-13-a7245ad
How to reproduce:
Bad output:
ffmpeg -y -hwaccel cuda -i "/tmp/original_cut.ts" -c:v h264_nvenc -c:a aac -b:a:0 64k -f mpegts /tmp/mpeg2_cuda_decode.ts
Good output:
ffmpeg -y -hwaccel cuvid -c:v mpeg2_cuvid -i "/tmp/original_cut.ts" -c:v h264_nvenc -c:a aac -b:a:0 64k -f mpegts /tmp/mpeg2_cuvid_legacy_decode.ts
I have attached "original_cut.ts" for you to be able to reproduce this issue.
Also attached the output when running the commands on my system.
Attachments (4)
Change History (9)
by , 4 years ago
Attachment: | original_cut.ts added |
---|
by , 4 years ago
Attachment: | mpeg2_cuvid_legacy_decode.ts added |
---|
follow-up: 2 comment:1 by , 4 years ago
Which commit introduced the regression?
Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.
comment:2 by , 4 years ago
Replying to cehoyos:
Which commit introduced the regression?
Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.
I cannot say which commit introduced this. Maybe this bug has been here all along.
I attached the uncut console output when using the "bad" CUDA output.
I also tried to use this on todays git commit git-2019-12-26-b0d0d7e.
comment:3 by , 4 years ago
Additional information in case it was not understood:
The encoder makes no difference. You can encode using libx264,h264_nvenc or any other encoder.
The problem arises only from the choice of decoder (before the -i)
comment:4 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Commit d4996a600ca0334235a4b66beae5b5c3474535c4 and 12c4d00c10cb73f1976c8de5b23b1405803bd454 fix this issue.
The patch was posted way back in 2017,
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20170921032609.26242-1-zhong.li@intel.com/
I guess as discussed in #ffmpeg-devel nobody cared enough about mpeg2-hw decoding.
comment:5 by , 4 years ago
Component: | undetermined → avcodec |
---|---|
Keywords: | cuda added |
Version: | unspecified → git-master |
The good output