Webclient not streaming whole song

Need help? Post your questions here.

Moderator: moderators

Webclient not streaming whole song

Postby cdetroye » Fri Jan 08, 2021 2:55 pm

Hi all,

Whenever I stream a FLAC song in Subsonics webinterface, it doesn't completely stream the entire song. It works fine for mp3s.

Edit: It doesn't work for any song that is being transcoded. .m4a songs for example fail as well.

Assuming a FLAC song of 8:33 minutes.

When I press play in the webinterface I can see the player flashes 8:33 as the duration (on the player), and then when the transcoding starts it shows 2:05 (or so). When 2 minutes or so have played, a new chunk of the song is loaded and the player shows 3:37 (or so). And this goes on.
The problem is that usually around 3 minutes of song loaded, the player stops fetching the rest and goes to the next song as soon as 2:55 minutes have passed.

Image

I have transcoding enabled for the webplayer with the following command:
Code: Select all
ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 -



Subsonic 6.1.6 (build 0cfa60) – November 10, 2019
Ffmpeg version 3.2.15-0+deb9u1
Firefox 84.0.1

Update:

I noticed that when I disable transcoding for the web player (which works apparently for FLAC files) it works as expected, and immediately loads the entire song.
Last edited by cdetroye on Thu Mar 04, 2021 9:21 am, edited 1 time in total.
cdetroye
 
Posts: 6
Joined: Wed May 27, 2020 5:38 pm

Re: Webclient not streaming whole song

Postby cdetroye » Mon Feb 01, 2021 1:43 pm

Doesn't anyone have this problem?
cdetroye
 
Posts: 6
Joined: Wed May 27, 2020 5:38 pm

Re: Webclient not streaming whole song

Postby J_T_W » Tue Feb 02, 2021 7:56 pm

Have you considered returning the transcoding back to the default, similar to:

Code: Select all
ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 -
J_T_W
 
Posts: 30
Joined: Fri May 03, 2013 2:13 pm

Re: Webclient not streaming whole song

Postby cdetroye » Thu Mar 04, 2021 9:20 am

Yes, that's what it was set to before as well. I just copied over an example from the logs instead of the template.
cdetroye
 
Posts: 6
Joined: Wed May 27, 2020 5:38 pm

Re: Webclient not streaming whole song

Postby cdetroye » Fri Mar 05, 2021 1:39 pm

I think I have solved the problem. It was with the proxy that did not properly keep connections open. For other people with this issue, the following config should work as expected.

Code: Select all
server {
    server_name subsonic.example.com;

    location / {
        sendfile off;
        proxy_pass https://localhost:4041/;
        proxy_redirect off;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_max_temp_file_size 0;

        #this is the maximum upload size
        client_max_body_size 10m;
        client_body_buffer_size 128k;

        proxy_connect_timeout 90;
        proxy_send_timeout 90;
        #proxy_read_timeout         90;

        proxy_buffer_size 4k;
        proxy_buffers 4 32k;
        proxy_busy_buffers_size 64k;
        proxy_temp_file_write_size 64k;

        ## Required for Websockets
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 36000s;
    }

    listen 443 ssl; # managed by Certbot

    ssl_certificate /etc/letsencrypt/live/subsonic.example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/subsonic.example.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
    if ($host = subsonic.example.com) {
        return 301 https://$host$request_uri;
        } # managed by Certbot

        server_name subsonic.example.com;
        listen 80;
        return 404; # managed by Certbot
}
cdetroye
 
Posts: 6
Joined: Wed May 27, 2020 5:38 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 26 guests