Hello everyone, i'm trying to wrap a library which converts videos to audio, the syntax for the library is this:
As you guys can see the video parameter is of File type, but i need to figure out how to convert an online video stream to mp3, would it be possible, i'm sure it can be done, but i'm not an expert in Java.
Does anyone have any suggestions? any advice will be greatly appreciated.
Thanks,
Walter
B4X:
public void ConvertToAudio(File video){
File = Audio new File("target location where audio file will be saved");
AudioAttributes audio = new AudioAttributes();
audio.setCodec("pcm_s241e");
audio.setBitRate(new Integer(128000));
audio.setChannels(new Integer(2));
EncodingAttributes attr = new EncodingAttributes();
attr.setFormat("mp3");
attr.setAudioAttributes(audio);
Encoder encode = new Encoder();
encode.encode(video, Audio, attr);
}
As you guys can see the video parameter is of File type, but i need to figure out how to convert an online video stream to mp3, would it be possible, i'm sure it can be done, but i'm not an expert in Java.
Does anyone have any suggestions? any advice will be greatly appreciated.
Thanks,
Walter