

Theoretically you might be able to send to multiple receivers via multiple outputs but there is no built-in full blown server. Adjusting bitrate based on line conditionsįFmpeg can basically stream through one of two ways: It either streams to a some "other server", which re-streams for it to multiple clients, or it can stream via UDP/TCP directly to some single destination receiver, or alternatively directly to a multicast destination.Saving a file and Streaming at the same time.HTTP Live Streaming and Streaming with multiple bitrates.Streaming a simple RTP audio stream from FFmpeg.Let me know if you need some sample code or further clarification. Here is another SO post that might interest you: Record RTSP stream with FFmpeg libavformat While you are reading the packets from the stream, your native code could send buffers to your Java code through a callback function which would in turn display the buffers as video/audio. You need to keep in mind the format and encoding of the video and the audio and what you will be decoding it to. I'd recommend that you either remove that flag or run the configure script with -list-protocol, -list-demuxer, -list-muxer, -list-encoder, and -list-decoder (or something along those lines) to get an idea of what you need to enable. The script you used to compile the library uses the flag -disable-everything which also means that it probably disables RTSP support. I say this because ffmpeg makes heavy use of pointers and dynamic memory allocation that would make it a pain to try and use it from Java. Instead, consider creating helper functions like openRTSPStream(String url) and keep the ffmpeg stuff in your C/C++ code. You don't want to expose ffmpeg's API to your Java code.

However, I managed to scrape together some code that actually did what it was supposed to. I was in a similar situation some time ago (I wanted to stream an mp3 from an RTMP server) and it was extremely frustrating.
