java - Get AudioInputStream from FFMPEG output -


i'm trying pipe output ffmpeg audioinputstream in java. have far:

process process = new processbuilder("ffmpeg", "-hide_banner", "no-stats", "-y", "-i", "song.wav", "-vn", "-q:a", "5", "-f", "mp3", "pipe:1").start(); audioinputstream stream = audiosystem.getaudioinputstream(process.getinputstream()); 

i thought inputstream process , create , audioinputstream that, results in following exception:

caused by: java.io.eofexception: null     @ java.io.datainputstream.readint(datainputstream.java:392)     @ com.sun.media.sound.wavefilereader.getfmt(wavefilereader.java:234)     @ com.sun.media.sound.wavefilereader.getaudioinputstream(wavefilereader.java:150)     @ javax.sound.sampled.audiosystem.getaudioinputstream(audiosystem.java:1113)     @ com.darichey.argentumbot.argentumbot.onready(argentumbot.java:68) 

i'm not sure how can properly.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo