mpv complains about file corruption and can't seek
fullmetal1 opened this issue · 3 comments
jftui version
jftui 0.4.0, libmpv 1.109, libcurl 7.75.0 OpenSSL/1.1.1j, yajl 20100
mpv version
mpv 0.33.0-dirty Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
built on UNKNOWN
FFmpeg library versions:
libavutil 56.51.100
libavcodec 58.91.100
libavformat 58.45.100
libswscale 5.7.100
libavfilter 7.85.100
libswresample 3.7.100
FFmpeg version: n4.3.1
Describe the bug
After upgrading to the latest version of jellyfin (10.7.0) my mpv output in jftui started to include messages like:
[ffmpeg] Cannot seek backward in linear streams!
[mkv] Corrupt file detected. Trying to resync starting from position 1511863...
[mkv] Cluster found at 2887326.
When trying to seek through the video, or change audio or subtitle stream, the video skips to a random time (usually between 0:10-3:00), and I can't seek back to the start of the video
I tried playing the stream url directly through mpv to verify that it's not an issue with mpv, and had no issues printed to the terminal, and seeking and audio/subtitle stream switching worked fine.
Yeah, 10.7.0 has not been kind to jftui :(
jftui uses the /items/.../file
endpoints to grab its sources, did you try with that or with /videos/...
like the web client?
When I click Copy Stream URL
in the web client it gives me an items/.../Download?api_key=...
Oh, I'd never noticed that. But then again I did write jftui out of a profound hatred for web interfaces, I don't really poke around where I don't need :P
If you look through the network tab on your browser's devtools, you'll see that's not what the media player ends up using.
Anyways, I just tried that and I get an unseekable playback with
[mkv] Stream is not seekable or unknown size, not reading mkv metadata at end of file.
[mkv] Stream is not seekable or unknown size, not reading mkv metadata at end of file.
My suspicion is that this has to do with 10.7.0's switch to Kestrel as HTTP server and the way it serves chunked content, but I need to dig a lot deeper. Thanks for the feedback, unfortunately it's going to take me a while to address this.