Sample Header Ad - 728x90

In mpv, how can I start playback at a random moment of a playlist?

2 votes
3 answers
4834 views
In mpv, there's the --start switch, which allows me to provide a number of seconds to skip. This way I can start playback at a random moment in a single file. And there's --shuffle which allows me to start playback at a random file within a given playlist. I combine both to: 1. choose a random file and 2. start playback at a random moment in that file with this command line:
mpv --shuffle --start $POSITION --playlist=/tmp/list.m3u
### Issue However, the --start parameter will be considered for each and every file that follows later on in the list as well and those will also have their first X seconds skipped. I don't want that. ### What I tried Currently I invoke mpv twice, in sequence, but that's ugly. ### Questions Is there a way to have --start only affect the very first file played? Or, even better, get mpv at a completely random moment in the random playlist. So, if the list is 123 minutes, it would start at 31 minutes 13 seconds, regardless of how far or not that would be into the file.
Asked by user569825 (537 rep)
Jul 10, 2019, 04:34 PM
Last activity: Oct 6, 2024, 04:10 PM