[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recovering playback state of multiple playlists and over multiple se
From: |
Yuchen Pei |
Subject: |
Re: Recovering playback state of multiple playlists and over multiple sessions |
Date: |
Tue, 19 Oct 2021 09:13:31 +1100 |
User-agent: |
mu4e 1.4.13; emacs 27.2 |
Mike Kazantsev <mk.fraggod@gmail.com> writes:
On Thu, 14 Oct 2021 17:12:50 -0400
Yoni Rabkin <yoni@rabkins.net> wrote:
Yuchen Pei <hi@ypei.me> writes:
> Yoni Rabkin <yoni@rabkins.net> writes:
>
>> `emms-bookmarks' has code to support this, but it isn't
>> extensively
>> developed because this is an edge case and doesn't come up
>> very
>> often. I
>> have used `emms-bookmarks' in the (far) past and I remember
>> it
>> working
>> well enough at the time.
>
> Thanks for the pointer.
>
> As I understand it emms-bookmarks's goal is to restore the
> playback
> position in a media file, but not to restore to the item in a
> playlist
> across emacs sessions (my second problem). I tried
> emms-bookmark-add
> on an item, switched to another playlist and played something
> there,
> and came back to the item, and did emms-bookmark-next. It
> didn't
> restore the position. I'll have to look more into it.
The bookmark data is stored natively as part of the track, so
it would
be written to disk in a emms-playlist-save, and equally read
back of
course.
If mpv player is used, I'd also suspect that immediately
restoring
position might not work due to race with async playback start -
e.g.
"seek" command being sent before playback actually starts in mpv
or
something like that.
Don't think I've tested restoring bookmarks myself, but if it
doesn't
look like tagging issue of some kind, maybe try doing this
before
starting playback/bookmark-restore:
(setq emms-player-mpv-debug t)
And then check *Messages* buffer to see whether:
- "seek" command is being sent to mpv at all.
- Whether it precedes {"event": "playback-restart"} there.
It does precede playback-restart. I tried using
emms-bookmark-next when the track is playing or paused. Both
times it sends the seek request and skip to the end of the track.
Here's when I paused the track first:
emms-player-mpv 441.3 json >>
{"command":["set","pause","yes"],"request_id":648}
emms-player-mpv 441.3 json <<
{"data":null,"request_id":648,"error":"success"}
emms-player-mpv 441.3 json << {"event":"pause"} [2 times]
emms-player-mpv 444.5 json >>
{"command":["seek",38214,"absolute"],"request_id":649}
test
emms-player-mpv 444.6 json <<
{"data":null,"request_id":649,"error":"success"}
emms-player-mpv 444.6 json << {"event":"seek"}
emms-player-mpv 444.6 json << {"event":"metadata-update"}
emms-player-mpv 446.3 json << {"event":"playback-restart"}
emms-player-mpv 446.3 json >>
{"command":["get_property","stream-end"],"request_id":650}
emms-player-mpv 446.4 json <<
{"data":104699160,"request_id":650,"error":"success"}
emms-player-mpv 446.4 json >>
{"command":["get_property","duration"],"request_id":651}
emms-player-mpv 446.4 json <<
{"data":2729.433333,"request_id":651,"error":"success"}
Here's when I started playing the track first:
emms-player-mpv 42.4 json << {"event":"playback-restart"}
emms-player-mpv 42.5 json >>
{"command":["get_property","stream-end"],"request_id":635}
emms-player-mpv 42.5 json <<
{"data":104699160,"request_id":635,"error":"success"}
emms-player-mpv 42.5 json >>
{"command":["get_property","duration"],"request_id":636}
emms-player-mpv 42.5 json <<
{"data":2729.433333,"request_id":636,"error":"success"}
emms-player-mpv 51.6 json >>
{"command":["seek",38214,"absolute"],"request_id":637}
test
emms-player-mpv 51.7 json <<
{"data":null,"request_id":637,"error":"success"}
emms-player-mpv 51.7 json << {"event":"seek"}
emms-player-mpv 51.7 json << {"event":"metadata-update"}
emms-player-mpv 53.5 json << {"event":"playback-restart"}
emms-player-mpv 53.5 json >>
{"command":["get_property","stream-end"],"request_id":638}
emms-player-mpv 53.6 json << {"event":"audio-reconfig"}
emms-player-mpv 53.6 json << {"event":"video-reconfig"}
emms-player-mpv 53.7 json << {"request_id":638,"error":"property
unavailable"}
emms-player-mpv 53.8 json << {"event":"tracks-changed"}
emms-player-mpv 53.8 json <<
{"event":"end-file","reason":"eof","playlist_entry_id":70}
--
Best,
Yuchen
PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0
<https://ypei.me/assets/ypei-pubkey.txt>
signature.asc
Description: PGP signature
- Recovering playback state of multiple playlists and over multiple sessions, Yuchen Pei, 2021/10/13
- Re: Recovering playback state of multiple playlists and over multiple sessions, Yoni Rabkin, 2021/10/13
- Re: Recovering playback state of multiple playlists and over multiple sessions, Yuchen Pei, 2021/10/13
- Re: Recovering playback state of multiple playlists and over multiple sessions, Yoni Rabkin, 2021/10/14
- Re: Recovering playback state of multiple playlists and over multiple sessions, Mike Kazantsev, 2021/10/15
- Re: Recovering playback state of multiple playlists and over multiple sessions,
Yuchen Pei <=
- Re: Recovering playback state of multiple playlists and over multiple sessions, Mike Kazantsev, 2021/10/18
- Re: Recovering playback state of multiple playlists and over multiple sessions, , 2021/10/18
- Re: Recovering playback state of multiple playlists and over multiple sessions, Mike Kazantsev, 2021/10/18
- Re: Recovering playback state of multiple playlists and over multiple sessions, Yuchen Pei, 2021/10/18
- Re: Recovering playback state of multiple playlists and over multiple sessions, Yuchen Pei, 2021/10/18
- Re: Recovering playback state of multiple playlists and over multiple sessions, Mike Kazantsev, 2021/10/18
- Re: Recovering playback state of multiple playlists and over multiple sessions, Mike Kazantsev, 2021/10/19
- Re: Recovering playback state of multiple playlists and over multiple sessions, Yuchen Pei, 2021/10/20
- Re: Recovering playback state of multiple playlists and over multiple sessions, Yoni Rabkin, 2021/10/20
- Re: Recovering playback state of multiple playlists and over multiple sessions, Mike Kazantsev, 2021/10/20