Unable to make FFMPEG to work with Icecast2 Server
I'm really struggling with the following problem, a problem I had solved
few months ago and now that I revisit it, it doesn't work anymore...
At the moment I have a Java desktop application which spits audio bytes
through the stdout, bytes that ffmpeg must receive. I've done this using
some libraries in Java so I don't need to wrap everything in a batch file
whatsoever, but for testing I'm just using the Windows cmd to quick test it.
Basically I'm using the > operator to send the stdout data to ffmpeg in the
Re: Unable to make FFMPEG to work with Icecast2 Server
On Mon, Dec 04, 2017 at 00:42:50 +0100, Edgar H wrote:
> Basically I'm using the > operator to send the stdout data to ffmpeg in the
> following way...
> java -jar folder_in_project_root/streamer.jar > ffmpeg/bin/ffmpeg.exe -f
> s16le -ar 48000 -ac 2 -i - -f ogg -content_type application/ogg icecast://
Under the operating systems I know, '>' is the "redirect stdout to
file" operator. To direct the stdout to another program's stdin, you
would need to '|' (pipe) operator.
You would be overwriting ffmpeg.exe in this case. I wonder why Windows
actually manages to execute ffmpeg at all.
> When I tested this months ago, FFMPEG shown the data that was being
> streamed along more stats, but now when I execute the command nothing
> happens, it just hangs.
We usually like to see the complete, uncut console output. In this
case, ffmpeg is probably just waiting for something to appear on stdin,
which isn't happening (see above).
> Maybe it isn't able to connect to Icecast? Should I do something with ports
> or something to make it even work in localhost?
If that's your doubt, you would use ffmpeg with dummy data (anoisesrc,
for example) and see whether that works, to rule out the Java+stdin