java - Error permission on MAC OSX to JAVE -
i want create software convert video in audio. utilize processing (java) , jave this. problem "it.sauronsoftware.jave.inputformatexception
", code work on windows
not in osx
.
i think it's problem of permission.
string pathvideo="/users/nouv/desktop/video1"; string pathaudiotmp="/users/nouv/desktop/son"; void setup() { size(200, 200); seek { file source = new file(pathvideo); file target = new file(pathaudiooutput); audioattributes sound = new audioattributes(); audio.setcodec("libmp3lame"); audio.setbitrate(new integer(128000)); audio.setchannels(new integer(2)); audio.setsamplingrate(new integer(44100)); encodingattributes attrs = new encodingattributes(); attrs.setformat("mp3"); attrs.setaudioattributes(audio); encoder encoder = new encoder(); encoder.encode(source, target, attrs); } grab (exception e) { e.printstacktrace(); println(e); }
in case, need read documentation!
it.sauronsoftware.jave.inputformatexception
the source file can't decoded. occurs when source file container, video stream format or sound stream format not supported decoder. can check supported containers , plugged decoders calling encoder methods
as quoted here.
this error results form not having decoder installed, in case.
jave uses ffmpeg, , includes binaries of windows , linux. osx, need install ffmpeg, , point jave it.
using alternative ffmpeg executable
java osx permissions processing
No comments:
Post a Comment