[FFmpeg-devel] [PATCH] avformat/matroskaenc: add matroska subtitle muxer (.mks)

James Almer jamrial at gmail.com
Sun Apr 5 00:08:10 EEST 2020


On 4/4/2020 3:00 PM, Jan Chren (rindeal) wrote:
> On Sat, 4 Apr 2020 at 16:32, Andreas Rheinhardt
> <andreas.rheinhardt at gmail.com> wrote:
>> What is the aim of your patch? If it is simply making sure that using
>> the mks extension autoselects the Matroska muxer,
> 
> That's correct.
> 
>> then adding "mks" to
>> the list of extensions of the ordinary Matroska muxer would be enough.
>> (Notice that using mka for files with audio, but without video or mks
>> for subtitle-only files is just a convention; putting something else
>> than indicated by the extension in the files does not make them less
>> spec-compliant.)
> 
> Should I create a new patch which removes the audio muxer and just
> adds `mka` and `mks` extensions to the ordinary muxer?
> Or is there some reason why a dedicated audio muxer must exist,
> whereas a subtitle muxer does not?

Is there a mimetype specific for .mks? If so, then a separate demuxer
would be acceptable. Otherwise, simply adding the extension to the
existing matroska muxer and adding stream checks to mkv_init() should
suffice.

In any case, your patch is apparently not correct as it's missing all
the allowed codec ids in AVCodec.codec_tag, and/or defining an
AVCodec.query_codec function to only accept subtitle codecs.


More information about the ffmpeg-devel mailing list