Xuggler IContainerFormat Fields for MPEG2-TS

99 views Asked by At

I am trying to create an video outputstream using Xuggler, and am successfully outputting to the stream using sample code :

    mediaWriter = ToolFactory.makeWriter(XugglerIO.map(outputStream));
    IContainerFormat containerFormat = IContainerFormat.make();
    containerFormat.setOutputFormat("ogg", null, "application/ogg");
    mediaWriter.getContainer().setFormat(containerFormat);

    // add the video stream
    mediaWriter.addVideoStream(0, 0, ICodec.ID.CODEC_ID_THEORA, size.width, size.height);

However instead of the output format being ogg I want to use MPEG-2 TS as my output format. What are the fields in the setOutputFormat method if I want to output in MPEG-2 TS?

1

There are 1 answers

0
John Kim On

I just guessed and happened to find it. Anyone else who wants to know :

containerFormat.setOutputFormat("mpegts", null, "application/mpegts");