Is there an ActionScript library for MP3 encoding than Shine-MP3-Encoder? - audio

Is there an ActionScript library for MP3 encoding than Shine-MP3-Encoder? (https://github.com/kikko/Shine-MP3-Encoder-on-AS3-Alchemy)
This library works fine, but I wanted to find a similar solution (on ActionScript, not C) to optimize it for specific needs.
Thanks.

Dont wait for it. A pure AS3 library is impossible as the speed of AS3 is too slow to do MP3 encoding. You will need C++ via AIR Native Extensions (ANE) or Alchemy for this. ANEs work with Adobe AIR so you can publish your content as an app for desktop and mobile. I dont see any issue with it.
See these for ANE-based Mic recording:
ANE-RecordAudio
AirMicrophone
AirMicrophone-ANE

I recorded the mic into a WAV and then use ffmpeg -i d:/path/input.wav d:/path/output.mp3 to convert it instantly into an MP3. I delete the WAV when FFMPEG completes. FFMPEG is a cool little EXE you can just add to your project in any dir. I used Thibault's class to record into WAV.

Related

OPUS Audio Format Safari Dilemma

In a few words: how use OPUS audio format in a Webapp (JSX PWA) and make it Safari compatible? Still highly compressed MP3s don't appear to yet be an alternative to OPUS.
Background info: Truly EVERYTHING was looked into - Media recorder API within Vanilla JS, Opus Media recorder. The last was using the React-Mic-basic component.
React-Mic worked on every browser except Safari. Here also tried WAV, Mp3, OGG and all don't work on Safari.
It appears the only solution here is playing around with encoding yet really clueless.
How could this be handled in 2021? A spec issue or perhaps impossible?
Best
Here's a proof-of-concept to get you started. Works in Safari via a WebAssembly Opus decoder. You'll need to dig into the code a little and handle buffer/backpressure control to avoid decoding everything into memory before it's played:
https://fetch-stream-audio.anthum.com/

How to play wave files in X11

Please help, I need to play wave files in X11. Is there any API in X11 like PlaySound in windows? Thanks in advance
You can use aplay, mplayer, vlc, mpg123, mpg321, etc.
For raw (non-mp3, non-compressed) wav files, simple cat should work:
cat file.wav > /dev/dsp
If you need API way to do it, this is simple example how to play wav file using ALSA API.
However, this has nothing to do with X11.

How to play audio on Corona?

I am trying to play audio as i used to do but it seems not working now. These are the codes I tried:
local birdSound = audio.loadSound("bird.mp3")
audio.play(birdSound)
It gives an error like that:
WARNING: Failed to create audio sound
Can you help me out? Thanks.
Don't use .mp3. .wav works for both iphone and android.
Make sure the .wav file is in our folder.
Sometimes some sound file can be played on computer, but not works in simulator. In that case, use other files instead.
If you really like that .mp3 file and can not find .wav, find some free software to convert it.
Changing the bit rate(increasing) of my files helped me to solve the problem. Thanks to SatheeshJM!

Record screen and audio then generate to one video file in java.

I am writting a program as http://www.screencast-o-matic.com/. I used applet and import jmf.jar to my project. When I use it, it couldn't get anything capture devices so it couldn't capture audio and video.
I captured screen to video but it hadn't sound. I captured sound but it hadn't video. I use jmf to merger 2 stream to video file. But it error.
Everybody can help me to resol problem. Thanks your help.
You can use Xuggle-Xuggler http://www.javacodegeeks.com/2011/02/introduction-xuggler-video-manipulation.html API which is wrapper of FFmpeg command line tool. Both are open source.

iPhone App Dev - Edited mp3 files are not working in App

In my application there are mp3 files located in the bundle (nothing from the web). Some of the mp3 files are original files and some I had edited using simple sound editing software (the ones where you insert a file, cut a slice of it and save it as a new and shorter mp3 file).
I'm using the AVAudioPlayer [initWithData] method.
All the original files (the ones that I hadn't edited and inserted to the bundle as is) are working perfectly and all the ones that were edited are not working at all.
I used 2 different editing software and the outcome is the same.
Anyone had ever encountered that or have any idea what may I done wrong?
Thanks,
Ohad
Converting the mp3 to caf worked for me
as specified here.
see the following:
How do I convert an audio file to the preferred format for iPhone OS?
The preferred full-quality audio format for iPhone OS is 16-bit, little-endian, linear PCM packaged as a CAF file. To convert an audio file to this format, use the afconvert tool at the command line in Mac OS X, as shown in Listing 5.
Listing 5 Converting an audio file to the preferred format for iPhone OS
/usr/bin/afconvert -f caff -d LEI16 {INPUT} {OUTPUT}
To see all the options available for the afconvert tool, enter afconvert -h at the command line.

Resources