Comments (14)
I suggest to comment on or try to get these PRs merged: https://android-review.googlesource.com/q/owner:aykevanlaethem%2540gmail.com
If enough people make comments on the issue they will be forced sooner or later to merge it, they're ignoring it because they don't really care that much and most people don't even know what Opus is, hence they get currently away with it. It's such a small issue and the PR is already open almost a year, that says a lot about the state of Google.
from shuttle.
I use x-opus+ogg
files for my library. Rhythmbox sync works around this issue by naming all copied files .ogg
, but they're not reencoded so treating them as ogg
should work fine.
from shuttle.
Since the PR doesn't seem to work as intended, here might be some more info:
https://code.google.com/p/android/issues/detail?id=80729
from shuttle.
I think this might have to be part of the plans @timusus makes for weaning off MediaStore as he mentioned in the readme.
from shuttle.
As far as I know, the Android platform has supported the codec since 5.0.
No, Opus files are not yet supported. Google claimed to add support in Lollipop. They made some very minor changes, but AFAIK, they never actually added support - the MediaScanner doesn't add Opus to the MediaStore and the MediaPlayer doesn't play Opus.
from shuttle.
I actually managed to get Opus working.
Device: Google Pixel, running Android 7.1.1
Files: The result of running ffmpeg -i <input> -c:a libopus -b:a 192k -vn -y <output>.opus.ogg
I found however that ffmpeg, which I suspect most people are using, by default transcodes the album art as a Theora video stream. When album art is present, the file fails to play, when the album art is omitted (the -vn
argument), the album is added to MediaStore and Shuttle is able to read its metadata and play it (and Shuttle also somehow gets album art?).
from shuttle.
While I find this interesting, none of it is relevant to Shuttle's ability to play Opus files. Either Google actually add support for Opus via the MediaScanner
, MediaStore
and MediaPlayer
, or Shuttle replaces these with custom/3rd party components.
from shuttle.
What I'm saying is that Shuttle is currently able to play Opus files. Google has added support for Opus via the MediaScanner, MediaStore and MediaPlayer.
I currently have ~3000 Opus files on my phone, running stock Android. Shuttle has added them all to its internal library and I'm able to view and play them inside Shuttle, as if they were any other format.
from shuttle.
It appears that support for Opus in an Ogg container was added specifically in Android 7.0:
- CDD for 6.0 only requires that Opus be supported in a Matroska container.
- CDD for 7.0 requires that Opus be supported in both Ogg and Matroska containers.
from shuttle.
@bobobo1618 right, well that is good to know.
As far as this issue is concerned though - Shuttle supports Opus only as far as Android does, which is in a very limited fashion at the moment. Very savvy users might be able to encode their files using the appropriate container.
The only solutions I know of to fully support Opus are:
- Android adds support natively
- Shuttle moves to a 3rd party playback engine.
from shuttle.
@Daykm: Can you try renaming your files to "*.ogg"? That worked for me, no reencoding necessary.
from shuttle.
Very savvy users might be able to encode their files using the appropriate container.
As far as I'm aware, Ogg is the only appropriate container. It's the container used by ffmpeg
and opusenc
when the .opus
file extension is selected as well as the one that there's a spec for. There shouldn't be an encoder that outputs it as anything else (unless you're encoding video) so there shouldn't be any particularly hard work other than to make sure there's not a video stream (from embedded album art) and using the .ogg
extension.
I actually did some more testing and it seems that Android's fine with there being a video stream in some circumstances.
So the problems remaining as far as I'm aware are:
- Support Opus on Android < 7.0.
- Support Opus files with the
.opus
file extension. - Support Opus files with album art erroneously transcoded as a video stream (the Ogg spec has provisions for album art as metadata), though I'd really treat this as as a problem with the encoder rather than the player. I'm still not certain what exactly causes it to fail in some cases.
The first certainly requires a 3rd party playback engine but I'm curious whether there's a way to hack around the second by writing your own scanner (and keeping Android's playback API) and the last by perhaps remuxing before sending to Android's playback API.
This is a lot of effort just to keep Android's playback API but I believe some devices, particularly on the lower end, have hardware audio decoders and I fear switching to software decode may negatively impact them.
from shuttle.
I'm using a Pixel 3 with Android 9 (so way past the 6.0/7.0 minimum) and I think I ran into a regression in Shuttle, but maybe more likely - MediaStore.
Currently Shuffle fails to import my library at all (mostly ogg opus made with opusenc --bitrate 96 --discard-pictures $INPUT $OUTPUT.ogg
but there is a couple MP3s in there as well.)
As you can see the files are all "null" (ignore the playing song for a second)
Interacting with them does nothing and forcing a rescan doesn't seem to work.
I've tested in VLC (i.e. not using MediaStore AFAIK) and it plays the files fine. (albeit it doesn't like my preference for Album_Artist
vs. Artist
)
I also tested in Phonograph which also uses MediaStore and has this bug (not adding the files to the database), but it's file viewer does not display them as "null".
If I select "scan" from the overflow menu, it actually gets added to the database allowing me to play the file in Phonograph and Shuffle - as shown in the first screenshot
Does anyone else have this strange bug?
I'd also just like to point out the fact MediaStore (No fault of Shuttle, Phonograph, etc.) still has these strange bugs is really annoying
from shuttle.
@timusus Has Android 10 improved in this regard?
from shuttle.
Related Issues (20)
- A display issue
- Folder View not Working on Android 11 HOT 4
- Screenshots for F-Droid
- Metadata not showing for albums with large album covers
- Support browsing artists/albums/tracks over Bluetooth
- Read metadata from WAV files
- Shuttle use issue with new galaxy s10 update
- Privacy leak in Shuttle+ ? HOT 2
- Add support for embedded lyrics. HOT 2
- Tag Editor fails to update track number correctly
- Slow library loading with more entries in exclusion list
- Playlist Longer Than 30 Songs? HOT 8
- Playlists not updating
- Autoplay of next song doesn't produce sound
- Alert Tone genre
- Play Store Data Safety Section
- Feature Request: Folder view: Stay on last chosen folder or at least have setting for default folder
- Looping for a very long time stops working HOT 1
- mpc files are not added to library when scanned
- `IllegalStateException` when trying to open Folders view
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shuttle.