jmshrv / finamp

A Jellyfin music client for mobile
Mozilla Public License 2.0
2k stars 130 forks source link

Select transcoding segment container, default to fmp4 #915

Closed Chaphasilor closed 2 weeks ago

Chaphasilor commented 1 month ago

This should hopefully fix #600, and maybe some other issues too.

Seems to work on Android (14), but it would be good if someone could give this a try on iOS and test with a Vorbis file to make sure this is indeed a fix.

Either way, it probably doesn't hurt to include this setting, even if it doesn't fix the issue.

felix920506 commented 1 month ago

If I remember correctly there should be extra checks to prevent selecting MP3 codec with fMP4 container because that won't work on most devices.

Opus can also be streamed on newer iOS versions using fMP4 containers

Chaphasilor commented 1 month ago

@felix920506 thanks for the heads up! Right now Finamp only ever uses AAC for transcoding anyway, except for transcoded downloads (but those aren't streamed anyway). So this shouldn't be a problem.
Opus streaming on iOS sounds very interesting though! If there aren't any major issues with the fmp4 containers we could add more codec options for streaming in a future release.

@jmshrv did you manage to give this a quick test yet?

jmshrv commented 1 month ago

This got lost in my emails sorry, will test :)

felix920506 commented 3 weeks ago

Is there any update on this PR? Or is there anything I can do to help?

Chaphasilor commented 3 weeks ago

@felix920506 I still haven't heard from anyone who tested this on iOS, so if you could manage to do that, it would definitely help!

felix920506 commented 3 weeks ago

@Chaphasilor i tried launching it in Xcode emulator but it just simply won't start, both the rewrite branch and this branch

Chaphasilor commented 3 weeks ago

@felix920506 have you looked through CONTRIBUTING.md? Maybe there's some additional setup required that you haven't done yet?
Any error messages would also help. Are you using VS Code for development? The application logs should appear in the debug console when launching the app through the debugger

felix920506 commented 3 weeks ago

@Chaphasilor I'm using IntelliJ Idea, I'll check the document again and report back

felix920506 commented 3 weeks ago

@Chaphasilor I am getting this error when I try to launch it in Xcode emulator

截圖 2024-10-31 下午2 27 43
felix920506 commented 3 weeks ago

Update: I was able to get into the main screen and settings after deleting the app from the emulator and rerunning it. The settings show up as expected. I will test playback later.

截圖 2024-10-31 下午2 32 03
felix920506 commented 3 weeks ago

@Chaphasilor I tested playback on iOS in the Xcode emulator, iOS 18.0. Here are the results:

Chaphasilor commented 3 weeks ago

Thanks for testing! I guess we can merge this then ^^

Now that DirectStreaming dropped with 10.10, do you think it might be worthwhile to add support for that, so we could use TS and fmp4 transports even when not transcoding?

felix920506 commented 3 weeks ago

@Chaphasilor we could just move to using the UniversalAudio endpoint and the server will auto decide whether to send the source file or do a transcode.

Chaphasilor commented 3 weeks ago

How does it decide? Is there documentation about that? 🙃

felix920506 commented 3 weeks ago

It would probably be faster to ask on matrix, but I think that can be its own separate PR

felix920506 commented 2 weeks ago

Is there anything holding this from getting merged?

Chaphasilor commented 2 weeks ago

Nope, just forgot about it while waiting for the automatic tests to finish ^^
Thanks for the reminder :D