This repository has been archived by the owner. It is now read-only.

MinCache in webm #2079

Closed
mkver opened this Issue Aug 22, 2017 · 6 comments

Comments

2 participants
@mkver

mkver commented Aug 22, 2017

Hello,

at the moment MKVToolNix seems to set MinCache automatically for video tracks in webm (and sets it to 1). But MinCache (and MaxCache) are not allowed according to the webm specs.

Grüße
Andi

PS: What is the purpose of setting MinCache at all? Do players use the reference pseudo-cache system at all?

@mbunkus

This comment has been minimized.

Show comment
Hide comment
@mbunkus

mbunkus Aug 22, 2017

Owner

Why not? If I only wrote elements that players actually used, there would never be any kind of advancement. Heck, Matroska wouldn't exist in the first place.

Owner

mbunkus commented Aug 22, 2017

Why not? If I only wrote elements that players actually used, there would never be any kind of advancement. Heck, Matroska wouldn't exist in the first place.

@mkver

This comment has been minimized.

Show comment
Hide comment
@mkver

mkver Aug 22, 2017

But mkvmerge seems to always set the MinCache to 1 which is not very useful for players. There might be a useful value that could be conveyed to players using the MinCache, namely the number of reorder frames a video stream has (or what is essentially the same thing: The difference between (implicit) dts and (explicit) pts.). This is information players could actually use and that a muxer can easily calculate during muxing. (See here for an issue arising from relying on guessing the number of reorder frames.) Would this be compatible with the pseudo-cache reference system (where is this system explained anyway?)?
PS: Yes, I know the above is definitely off-topic.

mkver commented Aug 22, 2017

But mkvmerge seems to always set the MinCache to 1 which is not very useful for players. There might be a useful value that could be conveyed to players using the MinCache, namely the number of reorder frames a video stream has (or what is essentially the same thing: The difference between (implicit) dts and (explicit) pts.). This is information players could actually use and that a muxer can easily calculate during muxing. (See here for an issue arising from relying on guessing the number of reorder frames.) Would this be compatible with the pseudo-cache reference system (where is this system explained anyway?)?
PS: Yes, I know the above is definitely off-topic.

@mbunkus

This comment has been minimized.

Show comment
Hide comment
@mbunkus

mbunkus Aug 23, 2017

Owner

But mkvmerge seems to always set the MinCache to 1…

Not entirely correct. If B frames are found, MinCache is set to 2. That value's not entirely useful or correct either, of course, as frames can depend on more than two frames in modern codecs.

Would this be compatible with the pseudo-cache reference system (where is this system explained anyway?)?

I cannot answer either question. I guess it's not really explained anywhere and didn't go anywhere either. I'll just remove MinCache & MaxCache altogether.

Owner

mbunkus commented Aug 23, 2017

But mkvmerge seems to always set the MinCache to 1…

Not entirely correct. If B frames are found, MinCache is set to 2. That value's not entirely useful or correct either, of course, as frames can depend on more than two frames in modern codecs.

Would this be compatible with the pseudo-cache reference system (where is this system explained anyway?)?

I cannot answer either question. I guess it's not really explained anywhere and didn't go anywhere either. I'll just remove MinCache & MaxCache altogether.

@mbunkus

This comment has been minimized.

Show comment
Hide comment
@mbunkus
Owner

mbunkus commented Aug 23, 2017

See 52d51e7

@mkver

This comment has been minimized.

Show comment
Hide comment
@mkver

mkver Aug 23, 2017

Not entirely correct. If B frames are found, MinCache is set to 2. That value's not entirely useful or correct either, of course, as frames can depend on more than two frames in modern codecs.

This isn't true for all the files that I just checked: They always have MinCache set to 1, although they use reorder frames. I think I should add that most of these video tracks are H.264 tracks. (I know (?) that in order to make setting the fps work the H.264 packetizer itself takes care of this because of PAFF vs MBAFF stuff. Maybe this isn't set for H.264 tracks because the part with v_bframes isn't properly set by the H.264 output module?)

I cannot answer either question. I guess it's not really explained anywhere and didn't go anywhere either. I'll just remove MinCache & MaxCache altogether.

Ok. The lack of explanation really explains why it isn't being used. If it isn't explained anywhere, shouldn't then the specs be updated, too?

mkver commented Aug 23, 2017

Not entirely correct. If B frames are found, MinCache is set to 2. That value's not entirely useful or correct either, of course, as frames can depend on more than two frames in modern codecs.

This isn't true for all the files that I just checked: They always have MinCache set to 1, although they use reorder frames. I think I should add that most of these video tracks are H.264 tracks. (I know (?) that in order to make setting the fps work the H.264 packetizer itself takes care of this because of PAFF vs MBAFF stuff. Maybe this isn't set for H.264 tracks because the part with v_bframes isn't properly set by the H.264 output module?)

I cannot answer either question. I guess it's not really explained anywhere and didn't go anywhere either. I'll just remove MinCache & MaxCache altogether.

Ok. The lack of explanation really explains why it isn't being used. If it isn't explained anywhere, shouldn't then the specs be updated, too?

@mbunkus

This comment has been minimized.

Show comment
Hide comment
@mbunkus

mbunkus Aug 23, 2017

Owner

Feel free to file bug reports against the specs.

Owner

mbunkus commented Aug 23, 2017

Feel free to file bug reports against the specs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.