Search code examples
audioraspberry-pimp3recordwindowsiot

Record Audio File with mp3 Format on raspberry pi windows IOT


I'm trying to record an audio file on my raspberry pi3 that has window iot on it. I found out that mp3 encoder isn't exist on windows iot for ARM based devices like raspberry pi, but the decoder is exist. it means that you can read a mp3 format audio file but you can't write or create mp3 format audio files. this problem is just for running or compiling your App on raspberry pi and if you try debug your app on desktop windows, then your app works properly. I have to record my audio in mp3 format because I need it for third-party server that it just accepts mp3 formats. the m4a format encoder is exist on raspberry windows iot and I can record audio in m4a format.So what is your suggestion or workaround for this problem? Is it any UWP library for converting or transcoding audio files to mp3 format?


Solution

  • I have tried to find a library which includes a transcoding API for UWP(ARM), but unfortunately i did not find out, some wrappers of ffmepg can not work in UWP. The workaround is you can build a custom server which receives the audio stream from your devices, and trancodes the audio to mp3, and then sends the mp3 audio to the third-party server.

    Another way is you can build the ffmpeg for Windows IoT Core(ARM). And then launch a process to call ffmpeg to covert the audio file to mp3. But it can not trancode the real-time audio stream which captured from audio input device.

    BuildFFmpeg.bat phone8.1 win10 ARM