[FFmpeg-user] Encoding raw data written in real time into vorbis?

Edgar H kaotixpro at gmail.com
Tue Dec 6 23:17:55 EET 2016


Hello guys,

I have a Java application which writes into a file without extension all
the bytes that are read from a given mixer in the system. Those raw bytes
should be encoded into a .ogg file so that it can be sent in real time to
Icecast and stream it to the net.

The fact is that I'm facing problems with this as it's my first time with
ffmpeg and I'm quite lost. What I've tried so far are the following things.

- Write/overwrite bytes into .au file in 4kb chunks > Encode .au chunk to
.ogg and merge all .ogg files in realtime. (It seems that concatenated
files don't work in some software).

- Write/overwrite raw bytes into file in 4kb chunks > Encode raw chunk file
to .ogg and merge all .ogg files in realtime. (The same problem as with the
previous approach).

And another possible solution that I don't know if it's possible... Writing
constantly all the bytes into the file, open ffmpeg in another thread and
encode the file which is being written in real time to .ogg?

If this isn't possible, how could I solve the concatenation problems?


More information about the ffmpeg-user mailing list