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

M4b files don't play #1429

Closed
PaulWoitaschek opened this issue Aug 8, 2022 · 15 comments
Closed

M4b files don't play #1429

PaulWoitaschek opened this issue Aug 8, 2022 · 15 comments

Comments

@PaulWoitaschek
Copy link
Owner

What happened?

M4b files refuse to play. Renaming them to mp4 fixes the playback.
@newhinton
I'm on vacation for the next three weeks without a machine with me. Could you take a look if you can fix this?

Version

6.0.8

Relevant log output

No response

@newhinton
Copy link

I can give it a try!

@PaulWoitaschek
Copy link
Owner Author

@shirish87 if you could take a look as well? 🙈
It's really effecting a lot of users.

My main suspicion is, that a downgrade to exoplayer .17 fixes it.

@PaulWoitaschek
Copy link
Owner Author

It seems to be somehow connected to updating from an older version.
People have reportet, that reinstalling fixes it.

@shirish87
Copy link
Contributor

M4B playback works fine in my early testing. Tried upgrading from an earlier version as well as a fresh install.

Book covers take a while to show up, but no issues with playback. Have ~70 books, all m4b.

Minor note: I had to downgrade AGP to 7.2.2 to work with my build env.

@PaulWoitaschek
Copy link
Owner Author

Thanks! I tried to contact some issue reporters so they can provide more detailed answers here.

From my understanding it is rather the case that books don't show up at all instead of not being able to play them.

Another suspicion: maybe it is related to R8 and it doesn't reproduce because your Agp version doesn't have a bug?
Might be worth a shot.

@PaulWoitaschek
Copy link
Owner Author

Whoever has this issue:
Please try the apks from the github releases page and identify, from which version this issue started appearing.

@shirish87
Copy link
Contributor

ah, if the books aren't showing up, I guess ffmpeg metadata extraction or cover extraction could be the reasons. possibly native code. I think we can rule out exoplayer.

Is there any way to know which version they were upgrading from?

@PaulWoitaschek
Copy link
Owner Author

The reports so far are mixed and I don't really know.

This issue is somewhat related:
#1260

@codingCoffee can you reproduce this?

@codingCoffee
Copy link

Hey @PaulWoitaschek

Playback of m4b files is working for me without renaming the file extension to mp4. I upgraded to 6.0.8 from an older version of Voice (most likely 6.0.2, though I can't be sure). And also uninstalled and reinstalled the app. In both the cases, playback and loading book covers for m4b files worked just fine. Also repeated the same from 6.0.7 to 6.0.8 and it's working perfectly.

Could it be something device/vendor specific? I'm using a OnePlus 6. Getting some more metrics on the devices it's failing on might give us a hint about the issue.

@PaulWoitaschek
Copy link
Owner Author

PaulWoitaschek commented Aug 9, 2022

I think it was due to a bug in Androids mime type. I think that last commit of mine fixed it.
Can someone verify this? Probably on an older emulator it should be reproducible.
Can you also take a look, what kind of mine type a m4b file returns if it reproduces?

Fun fact: first commit done from an Android device in my career 😂

@codingCoffee
Copy link

codingCoffee commented Aug 9, 2022

Unrealted
But I want to know what all you used :P ? I'm sure termux was involved. Was that it or does there exist any native app to commit code :P ??

On a related note, I checked out the latest release (v6.0.9), things are working just fine! Wasn't able to reproduce the issue (fortunately or unfortunately :P)

@shirish87
Copy link
Contributor

It may be useful to keep the m4b that failed around. If it is copyrighted media, I suppose sharing it would be an issue. But I wonder if sharing an insignificantly short clip would be considered "fair use"? Any thoughts?

You could use ffmpeg like so to create a 10 sec m4b file with just audio streams:
ffmpeg -i "the-file-that-will-not-play.m4b" -map a -t 00:10 -dn -c copy broken-10s-clip.m4b

@PaulWoitaschek
Copy link
Owner Author

But I want to know what all you used :P

The GitHub web interface 😅

On the issue itself:
It's probably possible to create a test with an empty m4b file and see if that is being picked up by the cover scanner.
I assume that m4b was added to the mime type map with Android 11 / 12 and therefore wasn't on older Android Versions.

@shirish87
Copy link
Contributor

shirish87 commented Aug 10, 2022

You were right about the mime type issue. v6.0.8 fails to parse m4bs in an Android 9 emulator, whereas v6.0.9 works.

Edit: FWIW, the mime type for m4bs on Android 9 is application/octet-stream

Before:

v6.0.8-2022-08-10-04.51.39.655463343.mp4

After:

v6.0.9-2022-08-10-04.54.36.215987193.mp4

@PaulWoitaschek
Copy link
Owner Author

Thank you for your help everyone ❤️ 🪲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants