Well, the short version is: I can extend gormans custom-convert to
apply equalizer settings to remote streams as well, but in doing so Im
losing the ability to seek within individual streams. The long version
follows:
My test case is a Bandcamp URL:
Code:
--------------------
https://t4.bcbits.com/stream/bd49083b058f575632b3f068c7a448d0/mp3-128/2133326474?p=0&ts=1594389689&t=68fef2d2b76656e8683f1e730ff06bff6fd5deb0&token=1594389689_c819955ff7b75464b8a3f285298ec5ec9c95a07a
--------------------
This is the URL that LMS opens when you play back that particular
Bandcamp tune (Fela Kutis Sorrow, tears and blood) via Michaels
Bands Campout plugin. (It seems that these URLs change over time, but
for testing purposes you can use any bc.bits.com URL that you find in
your server log while playing back a Bandcamp tune.)
Ive chosen Bandcamp because Ive been using it since 2010; unlike
others I've tried in the past, e.g. Spotify, Tidal, Deezer, it has the
sort of music I like and havent yet got in my collection. The URL opens
a 128-bit MP3 stream, so sending it through any sort of equalizer or
effect is a bit silly. But for a proof of concept it'll do.
First I wanted to check if playback, transcoding and seek worked outside
LMS, so I tried:
Code:
--------------------
# Playback works
ffplay
"https://t4.bcbits.com/stream/bd49083b058f575632b3f068c7a448d0/mp3-128/2133326474?p=0&ts=1594389689&t=68fef2d2b76656e8683f1e730ff06bff6fd5deb0&token=1594389689_c819955ff7b75464b8a3f285298ec5ec9c95a07a"
# Transcoding and seek work
ffmpeg -ss 2:00 -to 3:00 -i
"https://t4.bcbits.com/stream/bd49083b058f575632b3f068c7a448d0/mp3-128/2133326474?p=0&ts=1594389689&t=68fef2d2b76656e8683f1e730ff06bff6fd5deb0&token=1594389689_c819955ff7b75464b8a3f285298ec5ec9c95a07a"
-f wav output.wav
# Transcoding, seek and piping the results to sox works
ffmpeg -loglevel quiet -ss 2:00 -to 3:00 -i
"https://t4.bcbits.com/stream/bd49083b058f575632b3f068c7a448d0/mp3-128/2133326474?p=0&ts=1594389689&t=68fef2d2b76656e8683f1e730ff06bff6fd5deb0&token=1594389689_c819955ff7b75464b8a3f285298ec5ec9c95a07a"
-f wav - | sox -t wav - -t flac test.flac gain -6 bass -20
# Transcoding, seek, piping through sox and playback on stdout work
ffmpeg -loglevel quiet -ss 2:00 -to 3:00 -i
"https://t4.bcbits.com/stream/bd49083b058f575632b3f068c7a448d0/mp3-128/2133326474?p=0&ts=1594389689&t=68fef2d2b76656e8683f1e730ff06bff6fd5deb0&token=1594389689_c819955ff7b75464b8a3f285298ec5ec9c95a07a"
-f wav - | sox -t wav - -t flac - gain -6 bass -20 | play -
--------------------
But when I try to apply this to LMSs custom-convert, I come unstuck. No
matter what stream mode I choose (I or R) and whether I use $PATH$ or
$FILE$ substitution strings, the results are the same: LMS applies the
SoX effects to the stream but when I try to seek within the track,
playback pauses the log reports a jumpToTime then resumes from the
beginning of the track.
The custom-converts Ive tested:
Code:
--------------------
# version 1
mp3 flc * 00:00:00:00:00:00
# F:{PATH=%f}R:{PATH=%F}T:{START=-ss %t}
[ffmpeg] -loglevel quiet $START$ -i $PATH$ -f wav - | [sox] -D -q -t
wav - -t flac -C 0 -b 24 - bass -20
# version 2, replacing separate F and R variables with FR and $PATH$ with
$FILE$
mp3 flc * 00:00:00:00:00:00
# FRT:{START=-ss %t}
[ffmpeg] -loglevel quiet $START$ -i $FILE$ -f wav - | [sox] -D -q -t
wav - -t flac -C 0 -b 24 - bass -20
# version 3, adding an END variable
mp3 flc * 00:00:00:00:00:00
# FRT:{START=-ss %t}U:{END=-to %v}
[ffmpeg] -loglevel quiet $START$ $END$ -i $FILE$ -f wav - | [sox] -D -q
-t wav - -t flac -C 0 -b 24 - bass -20
--------------------
Searching the forums for "jumpToTime", Google finds only two pages of
results, none of which appear relevant.
I've attached a server log that shows two "jumpToTime" events.
What am I missing? (It wouldnt be the first time Im missing something
obvious.) Or is this simply something that cant (yet) be done?
+-------------------------------------------------------------------+
|Filename: jumpToTime.txt |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=30958|
+-------------------------------------------------------------------+
------------------------------------------------------------------------
MainSqueeze's Profile: http://forums.slimdevices.com/member.php?userid=62220
View this thread: http://forums.slimdevices.com/showthread.php?t=112497
_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter