TL;DR:
It doesn’t matter what bitrate I choose on Symfonium, I need to override it server-side - which made me waste a bunch of data in the process.
Wanna try it yourself on my server? I made an account just for you:
[removed
]
Issue description:
Hello. I have recently moved from an iPhone to Android and I’m loving Symfonium’s UX and experience. However, my data usage has significantly gone up since I switched, and this app is the reason why.
For context, I am using Gonic v0.16.0
because it was recommended on Symfonium’s website. The device I am using to run Symfonium is a Google Pixel 8 Pro
.
I got curious about this data issue (in only the past three days I’ve used over 1.5GB of mobile data just on Symfonium), so I’ve been tinkering with the settings. The bitrate I have configured in the Symfonium settings is the lowest, at 64kbit/s. However, it doesn’t seem to matter, because my data usage is still very high - and I can see 1-2MiB go up for every minute of my playback (I’m using android’s native data meter for this metric).
To confirm this further, I made a little test bench. I chose a favorite song of mine from Dream Theater and converted it to Opus. Here you can see the size of the original file && the “mock transcoded” one:
As such, I expect my data usage after playing the whole song to increase by about 12MiB, + any overheads from the pings/scrobbles. However, after listening to half of the track, I found that nearly 30MiB had been consumed.
The Symfonium logs (attached below) confirm that. This is line 168 from the code below:
2023-11-04 12:16:14.359 Verbose/TranscoderManager: FFProbe [996ms]: {"streams":[{"index":0,"codec_name":"mp3","codec_long_name":"unknown","codec_type":"audio","codec_tag_string":"[0][0][0][0]","codec_tag":"0x0000","sample_fmt":"s16p","sample_rate":"44100","channels":2,"channel_layout":"stereo","bits_per_sample":0,"initial_padding":0,"r_frame_rate":"0\/0","avg_frame_rate":"0\/0","time_base":"1\/14112000","start_pts":353600,"start_time":"0.025057","duration_ts":20322385920,"duration":"1440.078367","bit_rate":"320000","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0,"captions":0,"descriptions":0,"metadata":0,"dependent":0,"still_image":0},"tags":{"encoder":"LAME3.97 "}},{"index":1,"codec_name":"mjpeg","codec_long_name":"unknown","profile":"192","codec_type":"video","codec_tag_string":"[0][0][0][0]","codec_tag":"0x0000","width":432,"height":432,"coded_width":432,"coded_height":432,"closed_captions":0,"film_grain":0,"has_b_frames":0,"sample_aspect_ratio":"1:1","display_aspect_ratio":"1:1","pix_fmt":"yuvj420p","level":-99,"color_range":"pc","color_space":"bt470bg","chroma_location":"center","refs":1,"r_frame_rate":"90000\/1","avg_frame_rate":"0\/0","time_base":"1\/90000","start_pts":2255,"start_time":"0.025056","duration_ts":129607053,"duration":"1440.078367","bits_per_raw_sample":"8","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":1,"timed_thumbnails":0,"captions":0,"descriptions":0,"metadata":0,"dependent":0,"still_image":0},"tags":{"comment":"Cover (front)"}}],"format":{"filename":"https:\/\/music.danielstefani.online:443\/gonic\/rest\/stream.view?id=tr-15290&u=REDACTED&t=REDACTED&s=REDACTED&v=1.13.0&c=Symfonium&f=json&maxBitRate=64&format=opus","nb_streams":2,"nb_programs":0,"format_name":"mp3","start_time":"0.025056","duration":"1440.078367","size":"57631505","bit_rate":"320157","probe_score":51,"tags":{"album":"Octavarium","artist":"Dream Theater","genre":"Progressive Metal","title":"Octavarium","track":"8\/8","date":"2005"}}}
From this single log line we can extract a lot of information: The original HTTP call included the query params maxBitRate=64&format=opus
, which were clearly not respected. We can also observe that no transcoding occurred, from the codec_name
and size
, which match with the original mp3 file.
I was gonna end the post with just the information above, but I found out about Gonic’s transcoding override feature. Thus, also repeated the experiment with a Gonic “transcoding device profiles” rule, forcing the transcoder to work at Opus@96kbit/s:
[I had an image here but the forum won’t let me post over 1 screenshot, so just imagine that it’s an image of the Gonic control panel with the configuration for opus].
And this worked! My client is now receiving transcoded data. I can’t see the actual size from this log, but I assume that it’s 96kbit/s:
2023-11-04 13:03:55.059 Verbose/TranscoderManager: FFProbe [27641ms]: {"streams":[{"index":0,"codec_name":"opus","codec_long_name":"unknown","codec_type":"audio","codec_tag_string":"[0][0][0][0]","codec_tag":"0x0000","sample_fmt":"fltp","sample_rate":"48000","channels":2,"channel_layout":"stereo","bits_per_sample":0,"initial_padding":312,"r_frame_rate":"0\/0","avg_frame_rate":"0\/0","time_base":"1\/48000","start_pts":0,"start_time":"0.000000","extradata_size":19,"disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0,"captions":0,"descriptions":0,"metadata":0,"dependent":0,"still_image":0},"tags":{"encoder":"Lavc60.3.100 libopus","album":"Octavarium","artist":"Dream Theater","genre":"Progressive Metal","title":"Octavarium","track":"8\/8","date":"2005"}}],"format":{"filename":"https:\/\/music.danielstefani.online:443\/gonic\/rest\/stream.view?id=tr-15290&u=REDACTED&t=REDACTED&s=REDACTED&v=1.13.0&c=Symfonium&f=json&maxBitRate=64&format=opus","nb_streams":1,"nb_programs":0,"format_name":"ogg","start_time":"0.000000","probe_score":100}}
As such, for this server/client combo, the settings for bitrate selection seem to do nothing. My hunch is that there’s a misunderstanding in the API contract between you guys, or Gonic is just ignoring your settings and an issue has to be opened there. Anyway I thought I’d make this post here first.
Logs:
- debug.log (82.0 KB) → Playback with no transcoding device profile.
- debug-override.log (74.5 KB) → Playback WITH transcoding device profile.