Open ParetoOptimalDev opened 1 year ago
@ParetoOptimalDev I've pushed a lazy fix in 3842d564. By default the mpv window opens immediately. Let me know if this makes the feedback issue better or worse.
This seems to be the best one can do to get some feedback asap:
mpv --osd-level=3 --force-window=immediate https://youtu.be/DYeh7_FdmDg
Alternatively... maybe blocking until the video is ready to play, using a sentinel, and having a rotating progress bar in message area would be better?
Like:
(defun circular-progress-bar ()
"Show a circular progress bar animation."
(interactive)
(let ((bar-sequence "-\\|/"))
(cl-loop while t do
(dolist (char (string-to-list bar-sequence))
(message (format "[%c]" char))
(sleep-for 0.1)))))
(circular-progress-bar)
https://github.com/torque/mpv-progressbar apparently also does this behavior and guesses at progress and gives some sort of feedback based on bitrate.
Another thing I tried but forgot to post:
mpv --cache=yes --osd-level=3 --osd-msg3='waiting for cache: ${seeking} cache %: ${cache-buffering-state}' --force-window=immediate https://youtu.be/DYeh7_FdmDgmpv --load-stats-overlay=yes
The docs for cache-buffering-state
say:
cache-buffering-state The percentage (0-100) of the cache fill status until the player will unpause (related to paused-for-cache).
So my hope was that it would immediately print number representing % of cache buffer filled. Sadly what happens is:
cache-buffering-state
is unavailable
cache-buffering-state
value becomes 100 immediatelyAlso, thanks very much for the quick response. Wanted to make sure I mentioned that in case my commentary came across as anything as less than grateful :heart:
This seems to be the best one can do to get some feedback asap:
mpv --osd-level=3 --force-window=immediate https://youtu.be/DYeh7_FdmDg
From reading the man page, it looks like --force-window=immediate
(as opposed to "yes") can cause other issues. Any idea what those issues are?
Alternatively... maybe blocking until the video is ready to play, using a sentinel, and having a rotating progress bar in message area would be better?
How would Emacs know when the video is ready to play?
I think if it reported progress as it downloads the video or even just said
Starting mpv: Downloading XXMB video ✓
afterStarting mpv: Connected to Elfeed ✓
it would fix things? Maybe it's more accurate to say "starting stream for video" if mplayer is just filling some buffer. And perhaps I can modify the buffer size on a stable internet connection to improve this a bit as well.Or perhaps there are ways to improve things not starting so fast?
It looks like
mpv https://youtu.be/DYeh7_FdmDg
takes about 4 seconds for me and I see mpv doesn't output progress by default.Skimming through the mpv manual I can't see a good way to do this. I suppose it's not that big of an issue, but in those 4 seconds I frequently think "is it working".