My favorites | Sign in
Google
          
New issue | Search
for
| Advanced search | Search tips
Issue 1461: FLAC file support enhancement request.
349 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----
Type-Enhancement
Priority-Medium
Component-GfxMedia


Sign in to add a comment
 
Reported by donald.a.pellegrino, Dec 05, 2008
This is an enhacment request rather than a defect report.  It would be
useful to add support for the Free Lossless Audio Codec (FLAC) to the
built-in Music application.  More information on FLAC can be found at
http://flac.sourceforge.net/.  A discussion of this feature can be found on
Talk Android at
http://www.talkandroid.com/android-forums/android-applications/385-flac-support-android.html.
 It seems like  Issue 27 
(http://code.google.com/p/android/issues/detail?id=27) may be related to
this as well.
Comment 1 by sukael, Dec 06, 2008
It looks like somebody would need to add a decoder here.

http://android.git.kernel.org/?p=platform/external/opencore.git;a=tree;f=codecs_v2/audio
Comment 3 by sukael, Dec 10, 2008
>flac's are HUGE files, bigger than wav files!

This is completely untrue. FLAC files are 40-50% smaller on average than the
equivalent uncompressed data.

>what's the point of a lossless music file on a cellphone

In-ear headphones or other audiophile equipment. Believe it or not, there is gear out
there high quality enough that you can hear the difference.

>the cpu power and memory power alone might put this as not possible

Not true, FLAC has around the same level of computational load as MP3 (if handled well).

>On top of that the G1 as with other cellphones can only take a 16gig sd card anyways

See above. ~500 MB is pretty hefty for an album but certainly not outside of the
range of feasibility for SDHC cards.
Comment 4 by jbq@google.com, Dec 18, 2008
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Comment 5 by 893productions, Jan 04, 2009
flacs are pretty much the de facto format for lossless music storage. despite lack of
mainstream adoption from ipod (which pushes its own proprietary lossless format),
flac has still retained the crown of lossless audio and a major win for open formats.

if android wants to be considered a serious audio player it will need to earn the
respect of the niches that treat audio players lacking flac playback seriously.
because after .mp3 format and aac, flac the runner up for digital audio in the web
download shops and the runner up to mp3 on the torrent sites. i can fit 2-3 albums on
a 1gb card, which is enough for me on any outing.

reasons why android needs flac support:
-open standard
-most popular lossless format for music
-it needs the audiophile customers that iPhone is leaving in the cold
Comment 6 by ch...@hubick.com, Jan 06, 2009
This is important for all those people (like me) who use FLAC for their music
collection on their desktop, etc, and don't want to (or don't have space to)
transcode all that music for use on their mobile device.
Comment 7 by benjamin.j.mccann, Jan 25, 2009
I think the place developers would want to start is the fileformats directory of
OpenCore.  I can't find any relevant documentation, so I'm not sure how that
directory and the codec directory that sukael posted relate to each other.
http://android.git.kernel.org/?p=platform/external/opencore.git;a=tree;f=fileformats
Comment 8 by benjamin.j.mccann, Jan 25, 2009
The developer will also have to define new constants PVMF_FLAC and PVMF_MIME_FLAC and
update the list of recognized formats:
http://android.git.kernel.org/?p=platform/external/opencore.git;a=blob;f=pvmi/pvmf/include/pvmf_format_type.h
http://android.git.kernel.org/?p=platform/external/opencore.git;a=blob;f=nodes/pvomxaudiodecnode/src/pvmf_omx_audiodec_port.cpp
http://android.git.kernel.org/?p=platform/external/opencore.git;a=blob;f=pvmi/pvmf/src/pvmf_format_type.cpp
http://android.git.kernel.org/?p=platform/external/opencore.git;a=blob;f=nodes/pvomxaudiodecnode/src/pvmf_omx_audiodec_node.cpp
http://android.git.kernel.org/?p=platform/external/opencore.git;a=blob;f=engines/player/src/pv_player_engine.cpp


Comment 9 by daniel.haxx, Feb 25, 2009
FLAC requires a great deal _less_ computational power on all the ARM cores we do FLAC
and MP3 playback on in the Rockbox project (http://www.rockbox.org/) and I would
expect the typical Android-platforms to have the same characteristics in that aspect.
Comment 10 by benjamin.j.mccann, Feb 25, 2009
Here's the FLAC source from Rockbox that Daniel mentioned:
http://svn.rockbox.org/viewvc.cgi/trunk/apps/codecs/libffmpegFLAC/
Note that Rockbox is licensed under LGPL and Android under Apache 2.0.  I'm not sure
whether that would be an issue.
Also, Conrad Parker has written a blog post about OpenMAX that I believe is worth a
read: http://blog.kfish.org/2009/02/is-openmax-important-for-free-software.html

Comment 11 by e...@mredd.co.uk, Apr 02, 2009
I would also love to see FLAC being supported in Android, despite FLAC files being
larger than MP3 storage is getting so much cheaper and bigger these days that fitting
a sizable FLAC collection on to a memory card is no longer an issue. I would
certainly consider moving to an Android handset if FLAC were to be supported.
Comment 12 by spamsudden, Apr 02, 2009
Could we please get some comment from an Android developer/Google employee?
Comment 13 by ericfriesen, Apr 02, 2009
Really this is one of the few areas where I don't think the Google engineers have to
get too involved. If the Packet Video OpenCore can library can be improved to support
FLAC that'd do it.
Comment 14 by Jeffrey.Sharkey, Apr 02, 2009
A good starting place would be to peek at how OGG is integrated into the platform.  I
remember hearing somewhere that OGG might not even go through OpenCore at all.
Comment 15 by benjamin.j.mccann, Apr 03, 2009
Jeffrey is correct.  Ogg does not go through OpenCore.  Rather the Vorbis reference
implementation, Tremor, is used
(http://android.git.kernel.org/?p=platform/external/tremor.git;a=summary)
If anyone is considering working on media codecs, you may be interested in Google
Summer of Code:
http://wiki.xiph.org/index.php/Summer_of_Code_2009#OpenMAX_IL_components_for_Ogg_codecs
Comment 16 by mikexilva, Apr 11, 2009
First, solid state memory keeps geting cheaper and capacity keeps geting higher, so
FLAC starts to be a more viable options just as time goes by.

Then Flac is completely open source codec and it's a very fast at decoding time (good
for battery saving when playing).

If the cupcake android update will indeed have the bluetooth stereo profile, this
means we can put the audio out of the phone exacly as it was on the original audio CD
and keeping the best quality possible (keeping the digital stereo 16bit 44100hz over
bluetooth).

So now I belive no one can say we don't need FLAC because internal DAC output is not
good enough (using digital output), or it needs too much storage (time will take care
of this issue).

If it could be implemented inside the DSP it would certanly be best optimized for
batery/CPU usage.

Comment 17 by avuton, Apr 11, 2009
BTW- let me go ahead and state if your requirements for a music player aren't sky
high, 16gb of FLACs is more then enough to get me through the day (on the player I've
been using). I want to replace it with an android once support is there.
Comment 18 by squarebottle, Apr 27, 2009
Let's not be self-centered or shortsighted, people! Just because you might not choose
to put FLAC files on your Android device doesn't mean that other people wouldn't want
to. Also, Android is going to be on a lot of different kinds of devices, and maybe
some of the future devices will be designed with more storage for media playback in mind.
Comment 19 by mikexilva, Apr 30, 2009
Ok, now that we have A2DP support in Adnroid 1.5 (aka cupcake) we can use this high
fidelity bluetooth DAC to interface with HIFI stereos:
http://whathifi.com/News/Transfer-music-from-your-mobile-to-hi-fi-with-the-Chordette-Gem/
Now guess what's missing from the big picture? FLAC decoding in android... (could it
be done by hardware using the dedicated DSP's inside G1?;)

Comment 20 by francishemingway, May 02, 2009
This would be a great addition to the android platform - flac seems to be the best
bet for a lossless audio standard. 
Comment 21 by Davehope.co.uk, May 21, 2009
Another vote for this enhancement request. Will save me maintaining a flac and mp3
library.


Comment 22 by wolvenwraith, May 21, 2009
Much of my music library is in FLAC - having to encode it into MP3 before I can use
it is a pain, not to mention the quality loss.  Space is not an issue, either.
Comment 23 by tanrub, Jun 01, 2009
Same for me. I would be very happy to be able to use my FLAC library on android. 
Comment 24 by murpe79, Jun 01, 2009
Another vote from me, I also have my music collection in flac on the desktop.
Comment 25 by richie.thornton, Jun 02, 2009
Another vote from me, I have my music collection in FLAC to use with my Linn Sneaky
DS and it would be a pain to convert it just for Android.

Comment 26 by rmrector, Jun 02, 2009
Unfortunately, using code from Rockbox or from ffmpeg is just not going to work, due
to licensing. There is no way that LGPL code (Rockbox and ffmpeg) can be included in
a project with an Apache/BSD/MIT style license (Android). We'd have to start with
libFLAC, and optimize from there.
Comment 27 by koalay, Jun 05, 2009
Another vote here.
I already have a bunch of flac in my computer's music library.
Comment 28 by tommarnk, Jun 14, 2009
iphone os has apple lossless, so android should have flac lossless support :)
meybe port libavcodec to android, that way its easy to add more codec support
http://en.wikipedia.org/wiki/Libavcodec#Implemented_audio_codecs
Comment 30 by 0x0...@gmail.com, Jun 16, 2009
I have a 16G SDHC for my G1. My desktop has 64G of flac files. Mounting mp3fs every
time I want to add or remove tracks from my G1 is not an elegant solution.
Comment 31 by tommarnk, Jun 17, 2009
samsunng i7500 has built in 8GB internal memory and upgradable to 40GB (8GB+MicroSDHC 
32GB) and thats around 93 CDs in FLAC, and the internal 8GB is around 16 CDs in FLAC

i hope to see FLAC supported, many of my friends also want it to
Comment 32 by ianmacfarlane, Jun 18, 2009
@rmrector - there's no reason to avoid LGPL in Android - Android uses LGPL already
(notably WebKit).
Comment 33 by yend...@pv.com, Jun 20, 2009
It has been acknowledged that Webcore and bluez are probably the only rare
exceptions. It is not of interest to pull in more (L)GPL components.
Comment 34 by 0x0...@gmail.com, Jun 20, 2009
Bluez is not of interest. Bluetooth burns battery life. Who put that rubbish in there.

"It is not of interest" to you.
Comment 35 by orbanbalage, Jun 27, 2009
bump, another vote from me!
Comment 36 by simianspoon, Jun 28, 2009
Another vote for FLAC support.
Please!
Comment 37 by benjamin.j.mccann, Jun 28, 2009
Another place you can vote for the idea: http://productideas.appspot.com/#9/e=cf&t=flac
Comment 38 by lowe.schmidt, Jun 30, 2009
Also I would be very happy if FLAC support was added. My main reason for going after
a phone with android was that they had vorbis and (I thought) Flac support. 

Comment 39 by martin.gollowitzer, Jul 01, 2009
Another vote for FLAC here. I can't buy an Android phone until this is added :/
Comment 40 by tanrub, Jul 01, 2009
Is there any roadmap for this implementation. It shouldn't be that complicated.
Comment 41 by robin@robinwinslow.co.uk, Jul 01, 2009
Has there been any feedback from a Google developer yet? 

This issue is now 6 months old and obviously very popular. I really think if Google
are seriously going to compete with mainstream products like iPhone they have to step
up their level of customer service.
Comment 42 by craigloftus, Jul 01, 2009
It doesn't seem that the Devs are listening, but I'll add my vote anyhow.

I too won't be buying an android phone until support for FLAC is added. The idea of
transcoding my entire music collection is not an appealing one.
Comment 43 by bernd.zeimetz, Jul 01, 2009
And another vote from me.
Comment 44 by sl...@iggu.org, Jul 05, 2009
And a vote from me
Comment 45 by donald.a.pellegrino, Jul 06, 2009
The recent release of the native development tools
(http://developer.android.com/sdk/ndk/1.5_r1/index.html) might make this a bit
easier.  The FLAC API is available in C and C++
(http://flac.sourceforge.net/api/index.html).  It would be interesting to see if the
FLAC API compiles with the native development tools.
Comment 46 by Jeffrey.Sharkey, Jul 06, 2009
@Donald, the NDK doesn't provide an efficient way of piping decoded buffers over to
the media subsystem.

The best option is to write FLAC support parallel to
frameworks/base/media/libmediaplayerservice/VorbisPlayer.cpp, and plug the ".flac"
extension into MediaPlayerService.cpp.

VorbisPlayer is just some lightweight glue to get over to the external/tremor
library.  We would do the same thing with FLAC, add the core library into external/
and write the glue into libmediaplayerservice, adding the library reference to
Android.mk.

j
Comment 47 by director.oracle, Jul 12, 2009
Another vote for flac support - upwards and onwards, people. Lossless support, please. 
Comment 48 by RyanBettis, Jul 13, 2009
I would be really enjoy having FLAC support on my Android phone. I don't want to have
to convert my music to have songs and ringtones on my phone. 

THANKS!
Comment 49 by FLACvest.identede, Jul 14, 2009
Hi, I'm a FLACtard, and would love to have FLAC support on my Android phone. I don't
like lossy music! I like the good stuff! c'mon it's 2009!!

Ever hear of allFLAC.com? it's a great site.
Comment 51 by avuton, Jul 14, 2009
No way to get rid of the spam in these bugs is there?
Comment 52 by lyceuhns, Jul 16, 2009
I was thinking in take a S60 (end of the year), and put oggplayer to play Vorbis and
FLAC files. But Android is nice, ok, but a native support for FLAC would be nice, and
no need more to encode audio in lossy formats.

It's large, but with a 1GB SD Card i can put 2 albums to play anywhere.
And space is going to grow day by day, anyone here thought in put a ("complete") O.S.
on a mobile 'phone' years ago? ;)

And FLAC is free software, then, i see that all ways goes to support.
(I just can't talk about technical questions ;) )

o/
Comment 53 by scott.armitage, Jul 24, 2009
I am currently running a 5th gen iPod video with Rockbox. As a Linux user, once this
iPod dies, I cannot upgrade to another Apple device due to interoperability
difficulties. Since my current cell-phone is several years old, upgrading to a decent
smartphone, running Android, is likely the direction I will go.

Having said that, the majority of my music collection is in FLAC, and if Android does
not support FLAC decoding, then I will also not be able to upgrade to an Android device.

I can't imagine it would be /that/ difficult to add FLAC support, so what is the hold
up? I would contribute myself if I even knew where to start...
Comment 54 by dola...@gmail.com, Jul 24, 2009
I think you should check how the ogg part has been implemented and do the
wrapping/bindings on the FLAC libraries :)
But you must get the whole android sources I think (I don't know how to exctract only
parts of it) (about 2,7 GB after git sync)

http://source.android.com/download
Comment 55 by kenny.l....@gmail.com, Jul 29, 2009
I actually wrote this patch a couple days ago. I'm still testing its stability and
there are a few bugs to work on with the Thumb interwork.

I don't think it will be accepted to Android mainline any time in the next several
months (or ever?) because it adds another shared library.
Comment 56 by scott.armitage, Jul 29, 2009
@kenny:

The only way to make it happen is to show that FLAC playback is possible, and to
provide the cleanest, fastest implementation of it that we can. Convince those in
charge of the mainline that this is a highly desirable feature -- sometimes its worth
adding to the system if the benefits are abundant enough.
Comment 57 by lyceuhns, Jul 29, 2009
A (simple basic) question:
If i get a Android cellphone now, i'll be able to "upgrade" to a new version that
will support FLAC?

o/
Comment 58 by dola...@gmail.com, Jul 29, 2009
I think answering yes is quite secure ... :)
(Already changed firmwares 3 times on my HTC Magic/MyTouch 3G : official,
frenchcommunity, Orange UK HTC Hero image adapted to HTC Magic (with the HTC Sense
interface/programs)
Comment 59 by kruton, Jul 31, 2009
I finished the patches and uploaded the changes into Gerrit:

https://review.source.android.com/10908
https://review.source.android.com/10909
https://review.source.android.com/10910

The CyanogenMod ROM uses this to provide FLAC support from version 3.9.3 onward:

http://forum.xda-developers.com/showthread.php?t=539744
Comment 60 by Jeffrey.Sharkey, Aug 01, 2009
kruton, that is awesome!!  Thanks for taking the initiative and putting together the
patchsets.  I'll try finding someone to code review this and get it merged ASAP.  :)
Comment 61 by Jeffrey.Sharkey, Aug 08, 2009
Just ran some numbers here at work using a Monsoon, which is an extremely accurate
power meter for embedded devices.

I did a pretty large suite of testing, measuring various speaker/headphone
combinations, volume levels, and file formats.  The final result is that all formats
are equally inefficient, lol.  Here's a quick example from one of the songs:

VBR -V0 MP3:      112.65mA
OGG -q6:          112.4979mA
192kBps CBR MP3:  111.82mA
FLAC:             110.46mA

The differences are /marginal/ at best, which means that FLAC reading large files
from the internal SD card has little impact on battery used.  (The majority of power
here is used by the ARM11, since all decoding takes place in software.)

Here's the full set of measurements I took:
http://spreadsheets.google.com/pub?key=tMfXDet38HraVU0E3lzVM8A&single=true&gid=0&output=html

Comment 62 by lyceuhns, Aug 09, 2009
Congratulations kruton for the patches and thanks Jeffrey for the "benchmark".
Day by day we see that's a good and interesting (and necessary)thing to Android
system and your users.
Some Android developer look this please.

And for those worried about space, the 2TB memory cards are coming up.

Cheers. o/
Comment 63 by keitha...@gmail.com, Aug 10, 2009
For those needing Flac support on their phone, I fully recommend rooting your phone and flashing Cyanogen's mod. As Kruton mentioned 3.9.3 first had flac 
support, 3.9.7 is out now and it is great. Not only do you get flac, but also apps to SD, wifi teather and more. I couldnt be happier with it!
Comment 64 by peemot, Aug 11, 2009
Any luck finding someone to integrate/accept/review these changes to donut/2.0? (I 
for example wait for possible SE android-phone which will use 2.0. And I'd like to 
see flac-support there.)
Comment 65 by Jeffrey.Sharkey, Aug 11, 2009
We're internally swamped right now.  I tried finding people with bandwidth, but this
change won't be reviewed and merged until after Eclair.  In particular, native
libraries like this need a thorough security review, even if the library is well-known.
Comment 66 by romain...@android.com, Aug 11, 2009
Here is a precision: we are past feature freeze on Donut and Eclair, we unfortunately cannot add this extra 
feature.
Comment 67 by jbq@google.com, Aug 24, 2009
(No comment was entered for this change.)
Labels: Component-GfxMedia
Comment 69 by fahadayaz, Sep 09, 2009
@Romain

could this at least be looked at? cyanogen seems to have integrated this with little 
problem. shouldnt be much work to it i dont think.

thanks.
Comment 70 by raynerape, Sep 09, 2009
Off topic, but is Android team open to submission from ROM hackers such as Cyanogen?
Comment 72 by jakobsson.robin, Sep 27, 2009
This is important for me as well.
Comment 73 by sor...@gmail.com, Sep 29, 2009
plus one vote for me!
i always rip my cds into flac, mp3 and ogg is lossy, i think flac is pretty much the
only free lossles audio compression out there.
Comment 74 by li...@hemolky.cz, Sep 29, 2009
It is absolutelly enough to click star at the top of the page for your vote to be
counted ! Otherwise all of the voters are spammed with your messages .... just like
this time :-P 

Let's see whether this will help
Comment 75 by sven.svenagen, Oct 03, 2009
Please add FLAC support :)
Comment 76 by kororanui, Oct 05, 2009
I've just purchased an HTC Hero because it was an android phone. I was amazed to find
out that Android didn't support flac. I'm now forced to us wav files.
Please add flac support.
Comment 78 by christophklasen, Oct 15, 2009
please hook up the flac. not having it just tempts people to go down the cyanogen 
path
Comment 79 by darkxdragon, Oct 15, 2009
Please stop posting "I want this too" messages or other messages which don't
contribute to the bug! That is what the star is for!


I am following the conversation and I keep getting bothered by loads of pointless
emails. I am sorry to people I have bothered with this one...
Comment 80 by jands.blackberry, Oct 29, 2009
FLAC PLEASE FOR ANDROID!!!
Comment 81 by lemmuh, Oct 30, 2009
FLAC support would be an important addition to Android.  I'd also be more compelled
to get an Android phone if this happens.  Pretty soon everyone is going to realize
that there is no point to lossy formats, and FLAC is the de facto lossless format...
Comment 82 by johnrsamuelsen, Oct 30, 2009
I would also like flac support. I am considering buying a Droid and flac support
would go a long way towards convincing me of my purchase. I have to keep flac and mp3
files now because of my old mp3 player. Having to only keep flac files will actually
decrease the amount of storage I use because I will be able to delete all my mp3 files.
Comment 83 by csmcdem, Oct 31, 2009
@ everyone wanting flac : http://the-b.org/FLAC_on_Android
Comment 84 by johnrsamuelsen, Nov 02, 2009
@ csmcdem : That will not work for those of us considering a Droid since that mod is
built on Android 1.6 and Droid uses Android 2.0
Comment 85 by andonngu...@gmail.com, Nov 03, 2009
just talked to the developer @ http://the-b.org/FLAC_on_Android, said he can't update 
to support android 2.0 because the source hasn't been released yet.
Comment 86 by BradleyJLang, Nov 03, 2009
https://review.source.android.com/#change,10910
Comment 87 by m.p.linthout, Nov 06, 2009
Is there a step by step tutorial how to get these patches installed on a stock hero. so 
even a person that cooks for a living still understands it? I would really appreciate 
it. 

Cheers!

(tsss no FLAC support... WHAT THE HELL WERE THEY THINKING!?) It's like buying a car 
with no...uhm  but getting a trycicle.
Comment 88 by batrick.donnelly, Nov 06, 2009
@BradleyJLang

Does that mean Google is officially going to add it?
Comment 89 by m.p.linthout, Nov 07, 2009
@Batrick.Donnelly

No these links are so called 3th party patches created by members of the android 
opensource family :P. 

I dont know if official ondroid developers will look here and use there stuff in 
official releases. I think why not its the way of opensource right? the whole world 
can have a part in it right? Correct me if i'm wrong, sometimes it looks they are jealous of the fact 3th party's can do the job and they don't and that they are to 
proud to admit and to embed it in an official releases.(why else conflicts with 
Cyanogen etc?) 

But by all means i hope offcourse i'm wrong and we can have flac support in "Andy2.0"

(And basic bluetooth functionality: send, contacts, presentation remote, etc. like 
any other phone with BT)  
Comment 90 by adiamantcohen, Dec 08, 2009
hello i too would very much love to see the addition of flac support to the android os i know its possible because 
the archos 5 which runs on android just did it

http://www.archos.com/products/imt/archos_5/specs.html?country=ru&lang=en

now if they can do it i don't see why google cant, especially if they are aiming to adopt and champion the open 
source community and cause
Comment 91 by Georgiatechne, Dec 11 (5 days ago)
I vote for FLAC also since 1/2 of my music uses this lossless format. Why should use
a worse format if I can simply listen to this format? FLAC is an important encoding.
Comment 92 by ezzy305, Dec 13 (3 days ago)
There is already a FLAC player for android called AndLess, but it's very very basic
and beta. 
I use FLAC to store all my cd's on my desktop computer and use andless to play them
on my Hero. I'd like to see it embraced properly by the Android community as well.
Comment 93 by vespadaddy, Dec 13 (3 days ago)
It looks like AndLess requires root access, which I am not ready or willing to do.

If someone makes an app for Adroid 2.o that works as a .flac player, I will buy it.
Comment 94 by tash.robinson, Dec 14 (2 days ago)
AndLess won't work for the Motorola Droid, even with root access because it requires 
direct access to /dev/msm_pcm_out - that doesn't exist on the Droid. 
Comment 95 by scareface.rick, Yesterday (23 hours ago)
Add FLAC support!
Comment 96 by pilarcik, Yesterday (20 hours ago)
in this times its a NEED to losless support for every mobile phone/smartphone... 

+1 for flac / WAVPACK support for android devices.
Comment 97 by xiangkui, Yesterday (17 hours ago)
i need this too.
Comment 98 by zdenek.zikan, Yesterday (17 hours ago)
Sorry guys but can you PLEASE stop writing comments like "i need this too" and just 
star the issue? I also want FLAC support very much and 345 other people do as well 
but fortunately not everyone has the need to comment on it. That's what stars are 
for, comments serve for different purpose - discussion about details of the issue, 
possible workarounds, how the issue should be implemented, etc.
Sign in to add a comment