Closed rzumer closed 5 years ago
This sounds very similar to https://github.com/xiph/rav1e/issues/1649 which should be fixed by https://github.com/xiph/rav1e/pull/1694
You're right, I'll pull that branch and see if it solves it.
That branch alone does not solve the issue, instead for the clip I am testing playback just freezes at the point where it was previously corrupted. The encoder behavior from what I saw seems to be that dozens of frames are encoded "at once" (the frame counter jumps to the end from several dozens behind).
I updated my original comment with the input command line. Clearly min-quantizer
is also relevant as even with @tdaede's branch the corruption only seems to occur when the quantizer is set very low. Changing the minimum to 40 with the same bitrate seems to fix it for the clip I tested, so it does seem related to #1649.
Interesting. The latest version of my patch has an assert for the qidx = 0 case, so if you don't see it asserting then it's probably a different issue (or I screwed up).
Sample: sample.tar.gz
Will be corrupted after a few frames when encoded with the command line above.
First bad commit: 6f86711f197f2e54c8a1101054d4afda43ad1532
This sounds very similar to #1649 which should be fixed by #1694
Indeed, it looks to me coming from the same origin of #1649 in its nature.
With @tdaede's branch and large LRU disabled, first bad commit is cc7c5f39aa7291ebe55cf039536ed2959bae22d6.
Note that, if speed 4 is used as reported, this issue should not be related because quant_rdo is only enabled at speed 0 and 1 since https://github.com/xiph/rav1e/pull/1709, which is committed on Sep 27, 45d7358c1953c05693f6a52f2487f384540fce80
So, as @rzumer stated, min-quantizer or others are related.
Fixed by tdaede#1 (#1694).
Oh... " /// When disabled, the segment ID is chosen heuristically. pub quantizer_rdo: bool," I missed whole this. So, seg_id still works even if quantizer_rdo is disabled. Based on block importance?
Tested with a 720p clip setting
--bitrate 24000
(i.e. 24 Mbps).I have been able to reproduce this with several different clips, and it seems (under investigation) that even setting a lower bitrate has a chance of generating a corrupt bitstream (presumably from spikes), though it is not as consistent.
command line:
mpv/ffmpeg output:
With bitrate set to a reasonable 2400 instead (on my clip) I get corruption a few dozen frames in. The lower the bitrate, the longer it tends to take for corruption to occur, presumably because the quantizer is usually higher.