2023-10-05, 07:49 AM
(2023-10-04, 10:35 PM)manu98 Wrote: I have an issue with my ffmpeg command.
When using preset 5, I am unable to seek through the movie in jellyfin. It only shows 5 seconds in length, which extends while playing.
But when using preset 6 or higher, the movie plays perfectly fine.
Here is the command:
Code:ffmpeg -i in.mkv -map 0 -c:s copy -c:v libsvtav1 -pix_fmt yuv420p10le -svtav1-params tune=0:irefresh-type=2:enable-overlays=1:scd=1 -g 240 -movflags +faststart -preset 5 -ac 6 -c:a libopus -b:a 256k -crf 30 out.mkv
I tried both jellyfin-ffmpeg and the latest build from github.
Does anyone have suggestions? I would be very thankful.
Okay, so a few things (and I do the same thing since I don't trust a lot of software to do what it says).
- irefresh-type=2 is unnecessary as that's the default
- there's no reason to turn on enable overlays if you're not inserting images as an overlay on top of the video
- my guess is that this has to do with your keyframe setting, which looks like it's set at ~10 seconds for standard film frame rate (~24 FPS)
Now in my experience, libsvtav1 actually does a pretty good job at figuring out where to put keyframes and you don't really get any compression advantage by moving them further apart. So I might honestly try without the manual keyframe setting and re-encode. It may be that more keyframes are helpful with a larger amount of data between the two -- I know my encodes at 5 and 4 were a few hundred MB difference in size at 1080p and 1+ GB difference in size at 4K depending on bitrate/CRF. Revised?
Code:
ffmpeg -i in.mkv -map 0 -c:v libsvtav1 -preset 5 -crf 30 -pix_fmt yuv420p10le -svtav1-params tune=0:scd=1 -movflags +faststart -c:a libopus -ac 6 -b:a 256k -c:s copy out.mkv
I moved things around because uh...I'm a little OCD about grouping like with like as far as flags go...makes for easier debugging.
Jellyfin 10.10.0 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage