[Libav-user] How to add a skip frame to a MKV file?

Seungyong Kwon sykwon66 at gmail.com
Thu May 2 05:44:03 EEST 2019


Hello,

It worked. Thank you very much.

Regards,
SY

2019-04-25 오후 5:20에 Tobias Rapp 이(가) 쓴 글:
> On 25.04.2019 09:46, Seungyong Kwon wrote:
>> Hello,
>>
>> I'm writing a program which writes a MKV file.
>> For some reason writing a packet to a file is done by calling
>> av_write_frame instread of av_interleaved_write_frame which
>> inserts skip frames automatically.
>>
>> For an AVI file an AVPacket having size 0 and data NULL is a skip
>> frame and I tried same method to my program. However doing so for
>> a MKV file caused error. So I changed to write an AVPacket having
>> size 4 and data of simple byte sequence like 0x0, 0x0, 0x0, 0x1.
>> However files created that way cannot be played by VLC or WMP
>> although players like PotPlayer could play.
>> It seemed to me that filling such skip packets were not valid.
>>
>> If so what is a valid way of inserting skip frames to MKV files
>> when using av_write_packet?
> 
> Have you tried just sending the next packet with an increased PTS? As far as I remember Matroska 
> stores the timestamp for each packet (in microseconds) while AVI does not. So dummy fill packets 
> should not be necessary for Matroska.
> 
> Regards,
> Tobias
> 
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
> 
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".


More information about the Libav-user mailing list