开发者

Xuggler-Java- How to create packets from a byte array?

I am building an export application using Xuggler that exports a h264 encoded recording so that it can be played in an external player ( writing the video recording to .avi or .mp4 container).

I am interest开发者_开发知识库ed to know how one could create a IPacket from a byte array representing a video frame. What parameters from the IPacket need to be set and what values should those contain? And again what parameters should be set and what should be their values for the container that gathers the packets?


packet = IPacket.make( IBuffer.make( null, data, 0, data.length ));
packet.setTimeStamp( time );
packet.setTimeBase( IRational.make(1,1000) ); 
int pksz = packet.getSize(); 
packet.setComplete(true, pksz);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜