2023-10-10, 06:01 PM
(This post was last modified: 2023-10-10, 06:07 PM by nyanmisaka. Edited 2 times in total.)
This is a limitation of FFmpeg. When seeking, some HW decoders (e.g. all hwaccel and QSV decoder) are unable to take advantage of the
hevc_mp4toannexb means "Convert an HEVC/H.265 bitstream from length prefixed mode to start code prefixed mode"
As a workaround, you can use this command to pre-remux you video to fix the issue. This is not transcoding, so it usually completes quickly.
I don't want to integrate it in Jellyfin because it will be very slow for long videos, basically depending on the speed of your hard drive. This results in long lead times before transcoding.
hevc_mp4toannexb
bitstream filter to handle such unusual bitstream.hevc_mp4toannexb means "Convert an HEVC/H.265 bitstream from length prefixed mode to start code prefixed mode"
As a workaround, you can use this command to pre-remux you video to fix the issue. This is not transcoding, so it usually completes quickly.
Code:
ffmpeg -y -strict -2 -i HEVC_INPUT.mp4 -map 0:v? -map 0:a? -map 0:s? -dn -map_chapters -1 -c:v copy -bsf:v hevc_mp4toannexb -c:a copy -c:s mov_text HEVC_OUTPUT.mp4
I don't want to integrate it in Jellyfin because it will be very slow for long videos, basically depending on the speed of your hard drive. This results in long lead times before transcoding.