[vlc-devel] [vlc-commits] demux: mkv: support OPUS/EXPERIMENTAL codec ID

Tristan Matthews tmatth at videolan.org
Thu Feb 15 15:44:29 CET 2018


Hi,

On Thu, Feb 15, 2018 at 2:22 AM, Steve Lhomme <robux4 at ycbcr.xyz> wrote:
> Le 15/02/2018 à 05:13, Tristan Matthews a écrit :
>>
>> vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Wed Feb
14
>> 23:12:07 2018 -0500| [5d0056dc3e2bc11bebf7dfa0ddefaa32f34cefd2] |
committer:
>> Tristan Matthews
>>
>> demux: mkv: support OPUS/EXPERIMENTAL codec ID
>
>
> IMO it's not a good move to support temporary versions of a binary format.
> How many versions were there ?

5 it looks like.

> Can decoders differentiate them ? All of them
> ? Why was it called EXPERIMENTAL in the first place ?

So for context, this codec ID is from files created with mkvtoolnix.
There's a caveat for this tool that it can't recover the original Opus
file's end trimming for files muxed in experimental mode:
https://gitlab.com/mbunkus/mkvtoolnix/commit/6de77e94234f3b0b6ead4596247c4cdb95e65ab8#2205c707f8ec1e0062fb0a16b9a3cccd1b843c3d_1508_1509

It looks like Moritz did that to incrementally add a few features in
between his initial patch and the final one, namely:

Initial patch:
https://gitlab.com/mbunkus/mkvtoolnix/commit/98a580978fb500b13ff806e481b4a6b1f742baa5
Discard padding:
https://gitlab.com/mbunkus/mkvtoolnix/commit/5ee51ef6f599f1f11ff32db15adb0b6ecc25340e
Write seek preroll:
https://gitlab.com/mbunkus/mkvtoolnix/commit/ea6009c50a54318957bf4c57e25617a1e13a8e7d
Write codec delay:
https://gitlab.com/mbunkus/mkvtoolnix/commit/eb63797b7c2274220ee213760d6185d8b05276b6
Take codec delay/seek pre-roll into account:
https://gitlab.com/mbunkus/mkvtoolnix/commit/086ec83973cf48c7cfd3e6cd0dd4de8e90926bd1

I can generate samples for each version and add them to the Trac ticket if
needed.

> Can it be used for
> other experiments in the future ?

That seems unlikely.

Best,
Tristan

>
>> Fixes #19660
>>
>>>
>>>
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d0056dc3e2bc11bebf7dfa0ddefaa32f34cefd2
>>
>> ---
>>
>>   modules/demux/mkv/matroska_segment_parse.cpp | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/modules/demux/mkv/matroska_segment_parse.cpp
>> b/modules/demux/mkv/matroska_segment_parse.cpp
>> index 63cf64e346..7b18ee3286 100644
>> --- a/modules/demux/mkv/matroska_segment_parse.cpp
>> +++ b/modules/demux/mkv/matroska_segment_parse.cpp
>> @@ -1753,7 +1753,7 @@ bool matroska_segment_c::TrackInit( mkv_track_t *
>> p_tk )
>>               vars.p_fmt->i_codec = VLC_CODEC_VORBIS;
>>               fill_extra_data( vars.p_tk, 0 );
>>           }
>> -        S_CASE("A_OPUS") {
>> +        static void A_OPUS__helper(HandlerPayload& vars) {
>>               vars.p_fmt->i_codec = VLC_CODEC_OPUS;
>>               vars.p_tk->b_no_duration = true;
>>               if( !vars.p_tk->fmt.audio.i_rate )
>> @@ -1772,6 +1772,8 @@ bool matroska_segment_c::TrackInit( mkv_track_t *
>> p_tk )
>>                   ps, pkt, 2 ) )
>>                   msg_Err( vars.p_demuxer, "Couldn't pack OPUS headers");
>>           }
>> +        S_CASE("A_OPUS")                { A_OPUS__helper( vars ); }
>> +        S_CASE("A_OPUS/EXPERIMENTAL")   { A_OPUS__helper( vars ); }
>>           static void A_AAC_MPEG__helper(HandlerPayload& vars, int
>> i_profile, bool sbr = false) {
>>               int i_srate;
>>
>> _______________________________________________
>> vlc-commits mailing list
>> vlc-commits at videolan.org
>> https://mailman.videolan.org/listinfo/vlc-commits
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180215/d6662226/attachment.html>


More information about the vlc-devel mailing list