Skip to main content

Topic: How to encode raw PCM to wma in Android (Read 1209 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • silent10
  • [*]
How to encode raw PCM to wma in Android
How can I encode raw PCM data to wma in real-time. The audio comes from android phone's microphone using AudioRecord. Is there a encoder library available to do this?

  • kode54
  • [*][*][*][*][*]
  • Administrator
Re: How to encode raw PCM to wma in Android
Reply #1
FFmpeg includes WMAv1 and WMAv2 encoders. They may even be able to work in real time on your Android device.

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Re: How to encode raw PCM to wma in Android
Reply #2
AFAIK their quality is still quite low.

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
Re: How to encode raw PCM to wma in Android
Reply #3
What is the end application that requires wma?
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

  • silent10
  • [*]
Re: How to encode raw PCM to wma in Android
Reply #4
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.

  • silent10
  • [*]
Re: How to encode raw PCM to wma in Android
Reply #5
AFAIK their quality is still quite low.
I know, but it would still be a good feature in a recorder app to encode wma.

  • silent10
  • [*]
Re: How to encode raw PCM to wma in Android
Reply #6
What is the end application that requires wma?
A voice recorder app that lets users record audio in different file formats.

  • saratoga
  • [*][*][*][*][*]
Re: How to encode raw PCM to wma in Android
Reply #7
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. 

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
Re: How to encode raw PCM to wma in Android
Reply #8
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.
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

  • silent10
  • [*]
Re: How to encode raw PCM to wma in Android
Reply #9
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.
  • Last Edit: 04 August, 2017, 10:15:35 PM by silent10

  • saratoga
  • [*][*][*][*][*]
Re: How to encode raw PCM to wma in Android
Reply #10
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.