spl0k / supysonic

Supysonic is a Python implementation of the Subsonic server API.
https://supysonic.readthedocs.io
GNU Affero General Public License v3.0
259 stars 57 forks source link

Song play doesn't start until end of download (Dsub) #224

Open Fabiosilvero opened 2 years ago

Fabiosilvero commented 2 years ago

Hello,

I've migrated from Airsonic 10.6.2 to Supysonic, because I'd like to avoid Java as much as possible ^^.

I noticed a comportment change with my Dsub app (latest from Google Play) : with Airsonic, the song start to play around 10% of downloading. With Supysonic, the song needs to be fully downloaded before playing.

Did I miss a setting somewhere ? In Airsonic, I didn't needed to configure anything to have this behaviour.

The supyserver.log didn't catch the direct play like I do with Airsonic, only transcoding tests that I've done earlier.

Here's my configuration :

[base]
; A database URI. Default: sqlite:////tmp/supysonic/supysonic.db
database_uri = sqlite:////var/supysonic/supysonic.db
;database_uri = mysql://supysonic:supysonic@localhost/supysonic
;database_uri = postgres://supysonic:supysonic@localhost/supysonic

####################################################
[webapp]
; Optional cache directory. Default: /tmp/supysonic
cache_dir = /var/supysonic/cache

; Main cache max size in MB. Default: 512
cache_size = 512

; Transcode cache max size in MB. Default: 1024 (1GB)
transcode_cache_size = 1024

; Optional rotating log file. Default: none
log_file = /var/supysonic/supysonic.log

; Log level. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL.
; Default: WARNING
log_level = DEBUG

; Enable the Subsonic REST API. You'll most likely want to keep this on.
; Here for testing purposes. Default: on
;mount_api = on

; Enable the administrative web interface. Default: on
;mount_webui = on

; Space separated list of prefixes that should be ignored on index endpoints
; Default: El La Le Las Les Los The
index_ignored_prefixes = El La Le Las Les Los The

####################################################
[daemon]
; Default: /tmp/supysonic/supysonic.sock
socket = /var/supysonic/supysonic.sock

; Defines if the file watcher should be started. Default: yes
run_watcher = yes

; Delay in seconds before triggering scanning operation after a change have been
; detected.
; This prevents running too many scans when multiple changes are detected for a
; single file over a short time span. Default: 5
wait_delay = 5

; Command used by the jukebox
jukebox_command = mplayer -ss %offset %path

; Optional rotating log file for the scanner daemon. Logs to stderr if empty
log_file = /var/supysonic/supysonic-daemon.log
log_level = INFO

####################################################
[transcoding]
transcoder_mp3_mp3 = lame --quiet --mp3input -b %outrate --tt %title --tl %album --ta %artist --tn %tracknumber/%totaltracks --tv TPOS=%discnumber --tg %genre --ty %year --add-id3v2 %srcpath -
transcoder = ffmpeg -i %srcpath -ab %outratek -v 0 -metadata title=%title -metadata album=%album -metadata author=%artist -metadata track=%tracknumber/%totaltracks -metadata disc=%discnumber -metadata genre=%genre -metadata date=%year -f %outfmt -
decoder_mp3 = mpg123 --quiet -w - %srcpath
decoder_ogg = oggdec -o %srcpath
decoder_flac = flac -d -c -s %srcpath
encoder_mp3 = lame --quiet -b %outrate --tt %title --tl %album --ta %artist --tn %tracknumber/%totaltracks --tv TPOS=%discnumber --tg %genre --ty %year --add-id3v2 - -
encoder_ogg = oggenc2 -Q -M %outrate -t %title -l %album -a %artist -N %tracknumber -c TOTALTRACKS=%totaltracks -c DISCNUMBER=%discnumber -G %genre -d %year -
default_transcode_target = mp3

Thanks !

spl0k commented 2 years ago

Hello.

How do you run Supysonic? Is it with with supysonic-server (and if so, using which WSGI server?) or are you using Apache's _modwsgi or any other solution? Also I'm not sure I understand your last sentence. Are you saying that you don't notice the issue if the song is transcoded?

Fabiosilvero commented 2 years ago

I run Supysonic with supysonic-server using gunicorn (the default mode from tutorial I guess ?). Sorry, non-native speaker ! I meant that in the logs, there's nothing in DEBUG mode, when I play a song. Only entries about transcoding, which aren't related to this issue (because I tested with transconding). The issue is present whether I set up transcoding or not for Dsub.

If the following can help :