Hydrogenaudio Forums

Lossy Audio Compression => Other Lossy Codecs => Topic started by: silent10 on 2017-08-04 00:54:46

Title: How to encode raw PCM to wma in Android
Post by: silent10 on 2017-08-04 00:54:46
How can I encode raw PCM data to wma in real-time. The audio comes from android phone's microphone using AudioRecord (https://developer.android.com/reference/android/media/AudioRecord.html). Is there a encoder library available to do this?
Title: Re: How to encode raw PCM to wma in Android
Post by: kode54 on 2017-08-04 02:13:02
FFmpeg includes WMAv1 and WMAv2 encoders. They may even be able to work in real time on your Android device.
Title: Re: How to encode raw PCM to wma in Android
Post by: lvqcl on 2017-08-04 17:36:35
AFAIK their quality is still quite low.
Title: Re: How to encode raw PCM to wma in Android
Post by: greynol on 2017-08-04 17:48:28
What is the end application that requires wma?
Title: Re: How to encode raw PCM to wma in Android
Post by: silent10 on 2017-08-04 20:25:45
FFmpeg includes WMAv1 and WMAv2 encoders. They may even be able to work in real time on your Android device.

I can convert files and concatenate files but I do not know how to do real time encoding with FFMPEG.
Title: Re: How to encode raw PCM to wma in Android
Post by: silent10 on 2017-08-04 20:28:03
AFAIK their quality is still quite low.
I know, but it would still be a good feature in a recorder app to encode wma.
Title: Re: How to encode raw PCM to wma in Android
Post by: silent10 on 2017-08-04 20:29:30
What is the end application that requires wma?
A voice recorder app that lets users record audio in different file formats.
Title: Re: How to encode raw PCM to wma in Android
Post by: saratoga on 2017-08-04 21:16:48
FFmpeg includes WMAv1 and WMAv2 encoders. They may even be able to work in real time on your Android device.

I can convert files and concatenate files but I do not know how to do real time encoding with FFMPEG.

Real time encoding is the same as converting a file, just you provide the data one buffer as a time as it is recorded. 
Title: Re: How to encode raw PCM to wma in Android
Post by: greynol on 2017-08-04 22:55:32
What is the end application that requires wma?
A voice recorder app that lets users record audio in different file formats.
I know what you want, the question is why you want it.
Title: Re: How to encode raw PCM to wma in Android
Post by: silent10 on 2017-08-05 03:12:58
What is the end application that requires wma?
A voice recorder app that lets users record audio in different file formats.
I know what you want, the question is why you want it.
I want it because other applications that my app would be in competition with gives this feature.
Title: Re: How to encode raw PCM to wma in Android
Post by: saratoga on 2017-08-05 16:08:13
I'm really surprised anyone would want that on Android. The format has been dead for many years now, and is not even supported on most phones.  If you want to encode it anyway, I think ffmpeg is your only option.
SimplePortal 1.0.0 RC1 © 2008-2019