No announcement yet.

LMS on Windows: opus and vorbis transcoded to PCM end prematurely

  • Time
  • Show
Clear All
new posts

  • robho
    There was a problem with tracks not playing out completely discussed in this thread and, if I understand it correctly, it was more frequent on Windows. When I read philippe_44's analysis it seems like this exact problem shouldn't happen for high bitrate streams (such as yours), but maybe it's worth investigating. You could use wireshark to check if the data connection to the client is closed around the time when playback stops. You could try a recent squeezelite version that has a workaround for this problem (not as a fix but rather to check if the problem disappears). Also, do short tracks (shorter than 1 or 2 minutes) also end prematurely?
    Last edited by robho; 2023-05-25, 22:01.

    Leave a comment:

  • LMS on Windows: opus and vorbis transcoded to PCM end prematurely

    I enabled transcoding to PCM for opus and vorbis recently. After applying this hack to convert.conf (thanks to @mw9):
    ogg pcm * *
    # IFT:{START=trim %s}
    [sox] -q -t ogg $FILE$ -t raw -c 2 -2 -s - $START$

    ​so that 48kHz files will play at correct speed (opus is always 48kHz, and quite a few of my vorbis files are too),

    it turns out that practically all opus files will end prematurely, sometimes by a few dozen seconds.
    Vorbis (both 44.1kHz and 48kHz) don't seem as bad, with most ending as expected. But even some of them will end 2-3 seconds prematurely.
    To be clear: I have 48kHz Vorbis that seem to play fine, and a few 44.1kHz Vorbis files that don't.

    I couldn't see a pattern yet, but it is annoying.

    Please don't ask me to explain why I'm trying to use opus and vorbis and then transcoding to PCM - suffice it to say I'm trying to keep my Booms and Transporter alive for as long as I can AND stream my music on 4/5G networks as well. 😉
    (the full explanation is beyond the scope of this post)

    The folks over at github Opus playback ends prematurely when transcoding can't seem to repro this - but they think it's because I run Windows (10) while everyone there runs Linux.

    1. Can any LMS on Windows users confirm this?
    2. Any ideas what could be causing this? (to me as a noob it looks like one of the many layers involved in playback isn't guesstimating the track's true length properly)
    3. I'm more than happy to dig deep and provide logs and traces if you give me guidance. And also happy to try out whatever it takes.