staxrip / staxrip

šŸŽž Video encoding GUI for Windows.
MIT License
2.2k stars 122 forks source link

SVT AV1 Chunk Encoding Seek issue #1404

Closed xx005fs closed 4 months ago

xx005fs commented 4 months ago

Describe the bug I downloaded the most recent version and tried running the same workflow as before using SVT AV1 to encode some videos with chunk encoding (currently set to 2 chunks). SVT AV1 settings are as follows: --rc 0 --crf 38 --progress 3 --pin 1 --preset 3 --tune 0 --keyint 10s --irefresh-type 1 --scd 1 --tile-rows 1 --tile-columns 1 for which all is the same as the old version I was running (2.36) except --pin and --irefresh-type. Once the encode of the video finished, no error messages were produced. However, the first half of the video is able to seek perfectly fine, while seeking the second half would always jump to the half way mark of the video regardless where it's skipped to. The output is configured to use MKV container. This behavior is shown in VLC player with hardware decoding disabled, and didn't appear with ones encoded with SVT AV1 in version 2.36 under the same environment.

Expected behavior Seek should function as normal for the chunk 2 section of the video just like the first chunk.

How to reproduce the issue The issue appears on a variety of different input file types for me, whether the input is mkv or mov or mp4. Just by running through this encoding workflow it will generate a problematic output.

Provide information CPU: Ryzen 9 7950X3D, GPU: RTX 4090, OS: Windows 11 Home, Staxrip Version: 2.41.0 Log File: https://pastebin.com/uakNVvwU

Dendraspis commented 4 months ago

As these are valid parameters that are passed to the encoder, this is more likely a tool issue, either SvtAv1EncApp or mkvmerge. But at least your log file shows, that you have a 9s long video and using --keyint 10s, so that could be a potential culprit in such case. Additionally using --irefresh-type 1 as an Open GOP setting could lead to such issues as it's more likely to have a Closed GOP in that case.

On the other side I had also a short sample file and couldn't reproduce it with 2 chunks.

xx005fs commented 4 months ago

I chose the logfile from the shorter video because it was the most recently ran, but I was also seeing the same issue trying to encode a 25 min video, and every time I seek past the half way mark it still jumps back. I will try it without the irefresh-type option and see what happens.

Dendraspis commented 4 months ago

Interestingly I can't reproduce it with MPC-HC as it seems to be perfectly seekable whereas the other parameters were different. šŸ˜•

xx005fs commented 4 months ago

Hmm yeah, seems like the issue is not there with MPC-HC, maybe it's just a VLC problem then. However, the videos encoded in version 2.36 seeked a lot faster than the most recent version.

Dendraspis commented 4 months ago

At first here is a fix for a wrong default value - which didn't affect you with that command line above: StaxRip v2.41.4 (EXE-only)

Keep in mind that back then SvtAv1EncApp v1.8.0 was used and meanwhile we are at v2.1.0-A with SVT-AV1-PSY, so two major differences. At lot has changed, also some default values compared to SVT-AV1.

I suggest checking that out: https://github.com/gianni-rosato/svt-av1-psy/blob/master/README.md

So I close this now...