How to listen to a series of lectures on 1.5x speed without losing track of where you left off?

Server Version#: 1.20.1.3252
Player Version#: 8.6.0.20351

I have a series of lectures (MP3 files marked with Track 1, 2, 3, etc and Disk 1, 2, 3, etc) in a music library. I need to listen to them in the sequential order at faster speed (e.g. x1.5) and without losing track of where I left off.

So I synced them to my Android device, fine. I know how to increase the speed when playing a single track, but I would like to set the speed globally. Having to go through the motions every 2-4 minutes (each lecture is very short, but there are lots of them) is very cumbersome, especially when driving (that’s when I do most of my listening).

And once I close Plex (reboot the phone, switch to a different app), I do not know how to resume from the point where I left off. When I restart Plex and switch to the series on synced to the device, it just plays from the start.

Is there something I am missing?

I’m not aware of a persistent speed control in Plex.

If it makes sense for the content, you could glue a bunch of them together. That might really help if your “chapters” are super short.

If you squint, can you pretend they’re audiobooks? I haven’t used this on Android, but Prologue on iOS is pretty sweet. Works great with Plex.

Another option would be to fake a Podcast, if you have a way to run Podcast Generator.

I actually use Overcast on iOS for books this way (not in Plex) because OverCast has amazing vocal boost, speed control, and smart silence removal, and a standalone Watch app. It’s weird to me that Podcast players are more mature than Audiobook apps.

1 Like

Oh!

So Plexamp has speed control, and it persists between tracks. Turn it on in the settings. That might be all you need.

Plus it’s a better music player than the regular Plex app.

It’s also pretty sweet in a bunch of other ways. It has sweet auto-speed and vocal boost for Podcasts. I wonder if there’s any way to get that speed and vocal boost for other spoken word tracks. Hrm.

1 Like

@Volts Oh, sweet. Never heard of Plexamp, so it was a pleasant surprise. I almost gave up trying to figure out how to set up the speed (the global option to enable speed control was easy to find, but it took me like 10 minutes messing with all screens to figure out where the speed is actually controlled). The only thing is is missing is the ability to skip a few seconds in the beginning or at the end of the tracks, but I can live with it. Thanks a lot!!!

1 Like

And good info on other options. Thanks again!!!

1 Like

Yah!

I echo the “poor discoverability” criticism for the speed control UI/UX in Plexamp. It’s a super convenient spot, once you know it’s there …

Why do you want to skip a few seconds? Do you ALWAYS want to skip a few seconds? It would be pretty easy to munch a few seconds off of every file.

1 Like

In this particular case, yes, because every episode starts with an ad, so even thought the ads are not long, it is the same as repeating over an over. Not a showstopper, but it would be nice to skip them.

Losslessly (and quickly) chop the first 30 seconds off of an MP3 with ffmpeg:

ffmpeg -ss 00:00:30 -i inputfile.mp3 -acodec copy outputfile.mp3

Could make a .bat to loop over all the files in a directory, too.

Just in case someone needs it:

Trim 5 seconds at the beginning of each MP3 file in all directories under the the specified path:

FOR /F "tokens=*" %G IN ('dir /s /b "c:\Lectures\*.mp3"') DO (c:\ffmpeg\bin\ffmpeg -ss 00:00:05 -i "%G" -acodec copy "%G.TMP.MP3" && del /F "%G" && copy "%G.TMP.MP3" "%G" && del /F "%G.TMP.MP3")

I wish I could figure out how to trim MP3s at the end of files, but this does not seem possible without calculating the length.

1 Like

Hah! I was proud of remembering this, and then … nope, it’s exactly NOT what you want. Hrm. OK now I’m curious.

-sseof position (input)
Like the -ss option but relative to the "end of file". That is negative values are earlier in the file, 0 is at EOF.

This gives an excellent way to extract the duration of the file.

It also gives an “insane” (their words) example of a one-step ffmpeg command. But that would re-encode.

There’s another reply to that question with a script that does it in two simple steps. :slight_smile:

I was literally reading the same page when I saw a notification for your response. :slight_smile:

1 Like

Nah. I adapted it to Windows, but the crazy command does not work for MP3s. Getting error:

Stream specifier ‘’ in filtergraph description [0]split[s1][s2]; [s1]trim=0.0,setpts=PTS-STARTPTS,fifo[bv]; [s2]trim=10.0,setpts=(PTS-STARTPTS)+10.0/TB,fifo[v]; [bv][v]overlay=shortest=1,trim=10.0,setpts=PTS-STARTPTS[fv]; [0]volume=0[b];[0]adelay=10000|10000[a]; [b][a]amix=duration=first,volume=2,atrim=10.0,asetpts=PTS-STARTPTS[fa] matches no streams.

Trying to trim 10 seconds from end:

FOR /F "tokens=*" %G IN ('dir /s /b "C:\Test\*.mp3"') do (c:\ffmpeg\bin\ffmpeg -i "%G" -filter_complex "[0]split[s1][s2]; [s1]trim=0.0,setpts=PTS-STARTPTS,fifo[bv]; [s2]trim=10.0,setpts=(PTS-STARTPTS)+10.0/TB,fifo[v]; [bv][v]overlay=shortest=1,trim=10.0,setpts=PTS-STARTPTS[fv]; [0]volume=0[b];[0]adelay=10000|10000[a]; [b][a]amix=duration=first,volume=2,atrim=10.0,asetpts=PTS-STARTPTS[fa]" -map "[fv]" -map "[fa]" "%G-trimmed.mp3"; done)

And the one that copies the length into an output file does not explain how you deduct the trimmed portion from the length. Will try to do more research tomorrow.

Okay, wasted a lot of time, but could not make a one-liner, so here is PowerShell script in case anyone needs:

# Input folder holding audio files.
$inputDir = "Z:\Lectures"

# Seconds to trim from beginning of file.
$trimStart = 0.0

# Seconds to trim from the end of file.
$trimEnd = 9.0

# Path to the directory holding FFMPEG tools.
$ffmpegDir = "c:\ffmpeg\bin"

# Extension of the audio files.
$ext = ".mp3"

# Extension for temporary files.
$tmpExt = ".TMP$ext"

# Paths to FFMPEG tools.
$ffmpeg  = Join-Path $ffmpegDir "ffmpeg.exe"
$ffprobe = Join-Path $ffmpegDir "ffprobe.exe"

# Process all audio files in the directory and subdirectories.
Get-ChildItem -LiteralPath $inputDir -Filter "*$ext" -Recurse -File | ForEach-Object {
    # Original file path.
    $oldFile = $_.FullName

    # Original file name.
    $oldName = $_.Name

    # Temp file path will be in the same folder named after the original file.
    $tmpFile = "$oldFile$tmpExt"

    # Get the length of the audio track (it's a sting holding a floating number with possible new line).
    $duration = (& $ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1 $oldFile) | Out-String

    $duration = $duration.Trim()

    # Set new length of the audio by removing the trimmed parts.
    $duration -= ($trimEnd + $trimStart)

    # Trim the file.
    & $ffmpeg -ss 0 -t $duration -i $oldFile -acodec copy $tmpFile

    # Delete the original file.
    Remove-Item -LiteralPath $oldFile -Force

    # Rename the temp file to the original.
    Rename-Item -LiteralPath $tmpFile $oldName -Force
}
1 Like

That’s awesome!

If it doesn’t include “-acodec copy” it might be reencoding the MP3 every time ffmpeg is called, instead of copying the frames directly.

1 Like

Good catch. Fixed (updated code). Thank you.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.