Application provided non monotonic timestamp

12 views
Skip to first unread message

Kostas Andrianopoulos

unread,
May 10, 2013, 11:10:30 AM5/10/13
to xuggle...@googlegroups.com
Many of us have already faced this error. I found a workaround for everyone who may be interested.

Right after you add the video and audio streams to the writer, encode a video packet with a timestamp of value 0.

writer.addVideoStream(0, 0, ICodec.ID.CODEC_ID_H264, outVideoWidth, outVideoHeight);
writer.addAudioStream(1, 0, ICodec.ID.CODEC_ID_AAC, 2, sampleRate);
blankVideoPicture.setTimestamp(0);
writer.encodeVideo(0, blankVideoPicture);

Anything else fails for me. If anyone is aware of the reason behind this, please explain. :)
Reply all
Reply to author
Forward
0 new messages