Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to play m4a files #36

Closed
marcelogp opened this issue Mar 4, 2020 · 8 comments
Closed

Unable to play m4a files #36

marcelogp opened this issue Mar 4, 2020 · 8 comments
Assignees
Labels
Milestone

Comments

@marcelogp
Copy link

I noticed that when I try to play a m4a file (aac codec) using either DSub client or web UI, the song never starts and I get the following errors in the log:

[2020-Mar-04 01:40:06.515] 1 [/ 8TCpFxPx0ZGnr7sD] [info] - [TRANSCODE] [35] - Transcoding file '/music/Brahms - Piano Trios 2 and Piano Trio in A Major op. posthume (Guarneri Trio Prague)/02 Piano Trio No. 2 in C major, Op. 87 - II. Andante con moto.m4a'
[2020-Mar-04 01:40:06.515] 1 [/ 8TCpFxPx0ZGnr7sD] [error] - [AV] Cannot guess media file format for '/music/Brahms - Piano Trios 2 and Piano Trio in A Major op. posthume (Guarneri Trio Prague)/02 Piano Trio No. 2 in C major, Op. 87 - II. Andante con moto.m4a'
[2020-Mar-04 01:40:06.515] 1 [/ 8TCpFxPx0ZGnr7sD] [error] - [UI] Cannot start transcoder
[2020-Mar-04 01:35:31.558] 1 - [info] - [TRANSCODE] [23] - Transcoding file '/music/Smetana, Sibelius - String Quartets - Kocian Quartet [M4A]/10 Andante Festivo for string quartet, JS 34a.m4a'
[2020-Mar-04 01:35:31.558] 1 - [error] - [AV] Cannot guess media file format for '/music/Smetana, Sibelius - String Quartets - Kocian Quartet [M4A]/10 Andante Festivo for string quartet, JS 34a.m4a'

These files are regular aac encoded tracks as shown by ffmpeg:

  Duration: 00:08:52.39, start: 0.047891, bitrate: 321 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 320 kb/s (default)

Also, after that happens the lms process starts using max CPU on my server (but continues to play other tracks normally) until I restart the container.

I would also like to completely disable transcoding on the server so that it always use the original file. It's already disabled in the /settings page but is it still enabled somehow?

@epoupon
Copy link
Owner

epoupon commented Mar 4, 2020

Hi!
Nice catch. Transcoding is actually disabled, but ffmpeg is still used to:

  1. Deliver the audio file only from the requested offset (truncate), with direct copy of the audio stream.
  2. Guess the mime type of your file and report it to the client. This is what is not working here, and lms consider that failing to guess the mime type implies it is not a valid audio file. Well this should not be fatal and we may try to fallback on something else, for example using the file extension.

@epoupon epoupon self-assigned this Mar 4, 2020
@epoupon epoupon added this to the v3.8.0 milestone Mar 4, 2020
@epoupon epoupon added the bug label Mar 4, 2020
@epoupon
Copy link
Owner

epoupon commented Mar 4, 2020

Additional information: the format is guessed in order to select the correct muxer for ffmpeg.

  1. If the format is unknown, there is no way to select an output format.
  2. If the format is badly guessed, the selected muxer can be incompatible with the stream being copied in.

I tried some m4a files I got and I always fall in 2. I will investigate that.
Can you please send me an offending file at tmp49-tmp49@yahoo.com?

Edit: nervermind, I found what is wrong here.
Since we remux each file even when not transcoding, we need them in the docker image.

@epoupon
Copy link
Owner

epoupon commented Mar 4, 2020

Ok, I will rework this out and try to not use ffmpeg at all when not transcoding.
Doing like this will also fix #28

@marcelogp
Copy link
Author

Nice! Let me know if you need any other information.

epoupon added a commit that referenced this issue Mar 7, 2020
@epoupon
Copy link
Owner

epoupon commented Mar 7, 2020

Web player part done, Subsonic part is remaining.

@epoupon
Copy link
Owner

epoupon commented Mar 8, 2020

@marcelogp : would you mind testing the docker image epoupon/lms:amd64-7d5654c to check if everything is fine for you now? There are quite heavy refactor changes in it, so any feedback is welcome :)

@marcelogp
Copy link
Author

Hi @epoupon. I tested a bit and it worked perfectly. Thanks for the quick fix!

@epoupon
Copy link
Owner

epoupon commented Mar 8, 2020

Thanks for testing. I will release 3.8.0 tomorrow then.

@epoupon epoupon closed this as completed Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants