Write metadata to an audio file - android

Is there anyway to write metadata to an audio file? The web is full of stuff on MediaMetadataRetriever but not editing. I've looked at MetadataEditor but that doesn't seem to let me write metadata to a specific file. Pretty much I want to add a Bitmap to an audio file so that when a 3rd party app plays the audio file it has cover art. Thanks :)

Related

how to read a smaller chunk of a bigger file as byte array and treat it as a video or audio file in java android

I have one big file (I used a hex editor to simply put a few .mp4 and .mp3 files next to each other and saved them as one big ~500mb raw data file and recorded each file's starting offset/index and their lengths, i.e. file Sizes) now I want to put that big file in android external storage and read one of these videos or audio files from it. I know I can create a temporary file in context.getCacheDir(); and write this smaller(30-50MiB) byte array chunk to it and simply play the file in my videoView, but i want to read this file without creating a temporary file and deleting it each time i get in/out of that activity.
i probably need to define a File and save that byte array to it, and feed that File to my mediaPlayer as the data source without writing it to a cache file. how can i do this? (please answer with a code snippet/example)
You can easily do that if you just switch to a different player.
Use ExoPlayer to play, and create a custom DataSource. In this DataSource you can start reading bytes from wherever and feed it to the ExoPlayer to be played.
However, it should be noted that some video file containers add some meta data at the end of the file, while others add it at the start. And this meta-data is required to play them.

PowerApps - Saving Mic Audio into Playable format

We're trying to upload playable audio files from PowerApps mic to SharePoint Online list.
I have used the following line:
Patch(sharepointlistname, ForAll(Gallery1.AllItems,{Title:Title, VoiceMessage:Audio});
The above returns the following results:
(from Android and iPhone, .aac and .caf links (respectively) to SharePoint List):
data/bb788abd-7848-449f-810b-2bd6368dcb19.aac
or
temp/recording_8BA1187E-158A-469E-9994-F644C6F619D8-1610-000001A0FBF5F1F0.caf
It seems impossible to convert these .aac and .caf to .wav or any playable file.
Can someone guide me on this, or maybe let me know where the actual audio files are being saved to from powerapps? The .aac or .caf links are most likely references to a specific location on a local database that is created by PowerApps. Unfortunately, I have not found any information.
aac files and caf files are audio files. They are not just your regular and familiar wav or mp3 files.
Both formats can be played by Quicktime.
You can find a list of all the programs that can play those formats here:
http://extension.nirsoft.net/caf
http://extension.nirsoft.net/aac

Recording video with Android

I need to process data that MediaRecorder provides when i recording video and then save into file as *.mp4. I have ParcelFileDescriptor and with that i send Recorder output to pipe which is read in my thread. Problem is that i have no idea how to save mp4 file. Which metadata i need to provide? Can i extract all of them from MediaRecorder. And how much bytes are provided for metadata. Possibly you have better idea how can i store that data as *.mp4 using some external library?
Thanks.

How to merge an Audio and Video files in Android

I have a small video clip and an audio file. The problem is how to write code to merge them into a single file. i have never written code for multimedia applications for android and don't know if the merging is possible with android media framework. Is there any third party library to do that?
Can we right a merging code in Java and call it in Android?
Please guide me through this. Thanks
You can try INDE Media for Mobile, tutorials are here: https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials
It has a sample demonstating how to substitute audio track in mp4 video file by another audio track from another mp4 file. It's here: https://github.com/INDExOS/media-for-mobile/blob/master/Android/samples/effects/src/com/intel/inde/mp/effects/SubstituteAudioEffect.java
In sample app it's under Audio Effect:

Convert mp3 to wav on Android

There seem to be a lot of questions regarding the inverse wav to mp3 conversion, but none to go the other way. My situation is that I can use steganography to embed data in wav files. I can convert these to ogg and back (the steganography is format independent, and can survive format conversion). What I want to do now is build in AudioBoo integration. Uploading to AudioBoo is not a problem, retrieving the files in mp3 format is not a problem, but converting those mp3 files back to wav to perform the steg. extraction is. Does anyone know where I should start?
Check out JLayer. It should run on Android. Beware, some of the calls are synchronized. If this doesn't work, tweak the source code or extract the converter modules from the entire source, since all you need is the mp3 to wav converter, not the mp3 player.

Categories

Resources