Hello people,
Im working on my master's thesis and am trying to use red5+xuggler for
this task:
1. receive live stream
2. transcode to any other codec
3. unwrap from RTMP
4. stream using other (not RTMP) protocol (doesn't matter exactly
which, may be RTP, MMS, or pure UDP,...)
I'd like to ask you for help with the points 3. and 4.
I took the VideoTranscoderDemo deployed with red5/xuggler
The code I've adapted is available onhttp://
www.vichta.com/red5/PerunTranscoder.java.txt
and should almost be equal to the com.xuggle.red5.Transcoder.java from
the xuggler package.
First I tried to save the outputStream to file (stream resulting from
the transcoding) on line 234, what ended up with the exception,
because the saveAs method isn't implemented. Doesn't matter, it was
only experiment, I need to re-stream the data, not to save into file.
I have attached a IStreamListener successfully to the output stream,
but I haven't found way how to convert the IBroadcastStream and
IStreamPacket instances passed to the IStreamListener.packetReceived()
method to the desired form. I tried to use com.xuggle.xuggler package,
where I ended at the point of conversion between
com.xuggle.xuggler.IPacket and org.red5.server.api.
stream.IStreamPacket. It isn't described in the documentation and
example at
http://build.xuggle.com/view/Stable/job/xuggler_jdk5_stable/javadoc/java/api/com/xuggle/xuggler/IContainer.html
Could anybody give me a clue what to do? I'm totally confused of it.
Thanx very much,
Tomas