-
Notifications
You must be signed in to change notification settings - Fork 729
Description
Hi,
first of all, thanks for providing this and implementing OGG passthrough recently!
While using it, I had some problems when playing the same song twice (play a song via Player API /play, wait for it to end, then send the same PUT request again) - the ogg begin of stream marker is missing.
Because of that, ffmpeg says "invalid data found" or "codec missing" on the second play. Weirdly enough, ffplay can still play both. If I redirect the ogg stream to a file and play that with ffplay, there are CRC errors appearing on the second play and there is some stuttering.
VLC plays the first one, then skips the second one.
If I play two different songs, everything works fine.
Output of librespot for the same song twice:
[2021-02-25T19:58:28Z INFO librespot] librespot da0e913 (2021-02-23). Built on 2021-02-24. Build ID: q2qv0LQM
[2021-02-25T19:58:28Z WARN libmdns::fsm] error sending packet Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" }
[2021-02-25T19:58:28Z INFO librespot_core::session] Connecting to AP "gew1-accesspoint-e-fsf3.ap.spotify.com:4070"
[2021-02-25T19:58:29Z INFO librespot_core::session] Authenticated as "<redacted>" !
[2021-02-25T19:58:29Z INFO librespot_core::session] Country: "DE"
[2021-02-25T19:58:32Z INFO librespot_playback::player] Loading <Fertilizer> with Spotify URI <spotify:track:6jypaMkKsoc5npsVzxhksl>
[2021-02-25T19:58:33Z INFO librespot_audio::passthrough_decoder] Starting passthrough track with serial 3670377013
[2021-02-25T19:58:33Z INFO librespot_playback::player] <Fertilizer> (39640 ms) loaded
[2021-02-25T19:58:33Z INFO librespot_audio::passthrough_decoder] end of streaming
[2021-02-25T19:58:33Z INFO librespot_audio::passthrough_decoder] Seeking to 0
[2021-02-25T19:58:39Z INFO librespot_audio::passthrough_decoder] end of streaming
[2021-02-25T19:58:39Z INFO librespot_audio::passthrough_decoder] Seeking to 0
Output of librespot for different songs:
[2021-02-25T19:53:12Z INFO librespot] librespot da0e913 (2021-02-23). Built on 2021-02-24. Build ID: q2qv0LQM
[2021-02-25T19:53:12Z WARN libmdns::fsm] error sending packet Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" }
[2021-02-25T19:53:12Z INFO librespot_core::session] Connecting to AP "gew1-accesspoint-e-wkt5.ap.spotify.com:4070"
[2021-02-25T19:53:12Z INFO librespot_core::session] Authenticated as "<redacted>" !
[2021-02-25T19:53:12Z INFO librespot_core::session] Country: "DE"
[2021-02-25T19:53:17Z INFO librespot_playback::player] Loading <raindrops (an angel cried)> with Spotify URI <spotify:track:0v2LUO8oTHnkjQ8MmKuXyk>
[2021-02-25T19:53:17Z INFO librespot_audio::passthrough_decoder] Starting passthrough track with serial 3670061710
[2021-02-25T19:53:17Z INFO librespot_playback::player] <raindrops (an angel cried)> (37640 ms) loaded
[2021-02-25T19:53:18Z INFO librespot_audio::passthrough_decoder] end of streaming
[2021-02-25T19:53:18Z INFO librespot_audio::passthrough_decoder] Seeking to 0
[2021-02-25T19:53:43Z INFO librespot_playback::player] Loading <Fertilizer> with Spotify URI <spotify:track:6jypaMkKsoc5npsVzxhksl>
[2021-02-25T19:53:43Z INFO librespot_audio::passthrough_decoder] Starting passthrough track with serial 3670087673
[2021-02-25T19:53:43Z INFO librespot_playback::player] <Fertilizer> (39640 ms) loaded
[2021-02-25T19:53:44Z INFO librespot_audio::passthrough_decoder] end of streaming
[2021-02-25T19:53:44Z INFO librespot_audio::passthrough_decoder] Seeking to 0
Proof that the OggS BOS is missing:
bgrep -x 4f6767530002 /tmp/tworunsdifferent.ogg
0000000: 4f67 6753 0002 OggS..
013f73d: 4f67 6753 0002 OggS..
bgrep -x 4f6767530002 /tmp/tworunssame.ogg
0000000: 4f67 6753 0002 OggS..
librespot command line:
/librespot --initial-volume 100 --enable-volume-normalisation --normalisation-gain-type track -n test --disable-audio-cache --bitrate 320 --backend pipe --passthrough
Everything was run on the most recent dev commit.