Transcoding is not working with substreamer (iOS)
Steps to reproduce
- Read any flac file from substreamer (iOS)
What happens?
The file is selected in the player but didn't play
What is expected?
Flac files to be playable with transcoding in the desired bitrate and format.
Context
I am using funkwhale 0.20.1 on a raspberry pi with an all-in-one docker image
I try with MP3 format and maxBitrate to no-limit
and 256kbps
Here are the logs received (first with 256kbps maxBitrate and the second with no-limit) :
2020-01-20 12:41:10,803 django.request ERROR Internal Server Error: /api/subsonic/rest/stream.view
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/usr/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/rest_framework/viewsets.py", line 114, in view
return self.dispatch(request, *args, **kwargs)
File "/app/api/funkwhale_api/subsonic/views.py", line 110, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/usr/lib/python3.7/site-packages/rest_framework/views.py", line 505, in dispatch
response = self.handle_exception(exc)
File "/app/api/funkwhale_api/subsonic/views.py", line 123, in handle_exception
return super().handle_exception(exc)
File "/usr/lib/python3.7/site-packages/rest_framework/views.py", line 465, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/lib/python3.7/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
raise exc
File "/usr/lib/python3.7/site-packages/rest_framework/views.py", line 502, in dispatch
response = handler(request, *args, **kwargs)
File "/app/api/funkwhale_api/subsonic/views.py", line 83, in inner
return func(self, request, *args, **kwargs)
File "/app/api/funkwhale_api/subsonic/views.py", line 281, in stream
proxy_media=True,
File "/app/api/funkwhale_api/music/views.py", line 418, in handle_serve
transcoded_version = f.get_transcoded_version(format, max_bitrate=max_bitrate)
File "/app/api/funkwhale_api/music/models.py", line 861, in get_transcoded_version
return self.create_transcoded_version(mimetype, format, bitrate=max_bitrate)
File "/usr/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/app/api/funkwhale_api/music/models.py", line 876, in create_transcoded_version
audio=self.get_audio_segment(),
File "/app/api/funkwhale_api/music/models.py", line 815, in get_audio_segment
input_format = utils.MIMETYPE_TO_EXTENSION[self.mimetype]
KeyError: None
2020-01-20 12:41:10,806 uvicorn.access INFO 172.17.0.1:0 - "GET /api/subsonic/rest/stream.view?u=olwe&p=enc:623331393131363738316562653265333662666566373132333330626261&v=1.11.0&c=substreamer&f=json&maxBitRate=256&format=mp3&estimateContentLength=true&id=12699 HTTP/1.1" 500
Also if maxBitrate is defined to no-limit
I get a 200 response but it's still not playing.
2020-01-20 12:59:31,577 uvicorn.access INFO 172.17.0.1:0 - "GET /api/subsonic/rest/stream.view?u=olwe&p=enc:623331393131363738316562653265333662666566373132333330626261&v=1.11.0&c=substreamer&f=json&maxBitRate=0&format=mp3&estimateContentLength=true&id=12459 HTTP/1.1" 200
2020-01-20 12:59:31,716 uvicorn.access INFO 172.17.0.1:0 - "GET /api/subsonic/rest/stream.view?u=olwe&p=enc:623331393131363738316562653265333662666566373132333330626261&v=1.11.0&c=substreamer&f=json&maxBitRate=0&format=mp3&estimateContentLength=true&id=12459 HTTP/1.1" 200
2020-01-20 12:59:41,478 uvicorn.access INFO 172.17.0.1:0 - "GET /api/subsonic/rest/stream.view?u=olwe&p=enc:623331393131363738316562653265333662666566373132333330626261&v=1.11.0&c=substreamer&f=json&maxBitRate=0&format=mp3&estimateContentLength=true&id=12460 HTTP/1.1" 200
2020-01-20 12:59:58,307 uvicorn.access INFO 172.17.0.1:0 - "GET /api/subsonic/rest/stream.view?u=olwe&p=enc:623331393131363738316562653265333662666566373132333330626261&v=1.11.0&c=substreamer&f=json&maxBitRate=0&format=mp3&estimateContentLength=true&id=12459 HTTP/1.1" 200