[gst-devel] GStreamer MP4 to Matroska
MTy
mty_empty at hotmail.com
Thu Jun 10 13:41:24 CEST 2010
Hi im quite new to GStreamer and have a few questions.
I'm using the java-wrapper for GStreamer in order to transcode different
media streams in to a Matroska video stream. The main goal that I'm trying
to achieve is live on the fly transcoding, i.e.
GStreamer
-------video/x----->||||||||||||||||||||||||-----Matroska----->
As soon as you write video data on the inputstream GStreamer will transcode
it and put it on the outputstream as Matroska video data. I have gotten it
to somewhat work with "AVI to Matroska" in this manner, here is the code
that i used:
String def = "decodebin name=DecodeBin ! ffenc_mpeg4 ! ffmux_matroska
name=MediaMux";
Pipeline pipe = Pipeline.launch(def);
InputStreamSrc streamSrc = new InputStreamSrc(inStream, "Input Stream");
OutputStreamSink streamSink = new OutputStreamSink(outStream, "Output
Stream");
pipe.addMany(streamSrc, streamSink);
streamSrc.link(pipe.getElementByName("DecodeBin"));
pipe.getElementByName("MediaMux").link(streamSink));
pipe.setState(State.PLAYING);
Gst.main();
pipe.setState(State.NULL);
With this code I can write AVI data to the inputstream and then GStreamer
will start writing Matroska data to the outputstream in the same phase as
the video normally plays. HOWEVER when I send MP4 data to the inputstream
GStreamer won't start writing Matroska data to the outputstream until the
end of the MP4 data has been written. Why is this? Is there a workaround to
get the same data flow with MP4?
Thanks alot / Rikard
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/GStreamer-MP4-to-Matroska-tp2250272p2250272.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list