Domanda

Is there a simple way to remove the video-stream from a IMediaWriter? I have a re-conding system which uses a IMediaReader, which has a listener which resizes my pictures and then a listener which recodes to new codex settings.

This works perfect for Video, but I also want the have an audio-only rendering. Ideally using the same system, I thought that if on the writer I catch the even:

public void onAddStream(com.xuggle.mediatool.event.IAddStreamEvent event)

and just give a return when a video stream is created it would work. I did this on both listeners, and just give a return also on the onVideoPicture. But now get the following error:

Caused by: java.lang.RuntimeException: could not open stream com.xuggle.xuggler.IStream@415478112[index:0;id:1;streamcoder:com.xuggle.xuggler.IStreamCoder@415454768[codec=com.xuggle.xuggler.ICodec@415494608[type=CODEC_TYPE_VIDEO;id=CODEC_ID_H264;name=libx264;];time base=1/25;frame rate=0/0;pixel type=YUV420P;width=1920;height=1080;];framerate:0/0;timebase:1/90000;direction:OUTBOUND;]: Operation not permitted

So in what way can I make juggler just completely ignore the VideoStream in the setup above?

È stato utile?

Soluzione

I believe to force it to ignore video, you want to add:

            streamCoder.setFlag(IStreamCoder.Flags.FLAG_QSCALE, false);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top