Java Question How to Open URL link using File in Java Eclipse

walterf25

Expert
Licensed User
Longtime User
Hello everyone, i'm trying to wrap a library which converts videos to audio, the syntax for the library is this:

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
 

DonManfred

Expert
Licensed User
Longtime User
File need an local exiting File
IT will Not Work with this library i believe...
 

walterf25

Expert
Licensed User
Longtime User
File need an local exiting File
IT will Not Work with this library i believe...
Yes i know that much, but isn't there a way to pass an inputstream to a file type?
 

walterf25

Expert
Licensed User
Longtime User
The Problem is:
The library need to allow an Stream as input :)

I dont know but maybe it is possible.
I have the library source, i'll see if i can change the File to type to inputstream instead.
 
Top