Unable to make FFMPEG to work with Icecast2 Server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to make FFMPEG to work with Icecast2 Server

Edgar H
Hey guys,

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
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://
hackme:hackme@127.0.0.1:8000/streaming.ogg

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.

Maybe it isn't able to connect to Icecast? Should I do something with ports
or something to make it even work in localhost?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Unable to make FFMPEG to work with Icecast2 Server

Moritz Barsnick
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://
> hackme:hackme@127.0.0.1:8000/streaming.ogg

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
part.

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".