After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 654379 - matroskamux: make default framerate optional per stream
matroskamux: make default framerate optional per stream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-07-11 06:56 UTC by Oleksij Rempel
Modified: 2016-09-29 07:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch v1 (5.08 KB, patch)
2011-07-11 06:56 UTC, Oleksij Rempel
reviewed Details | Review
patch v2 (5.09 KB, patch)
2011-07-12 19:57 UTC, Oleksij Rempel
none Details | Review
patch v3 (6.66 KB, patch)
2011-10-12 20:54 UTC, Oleksij Rempel
none Details | Review
patch v4 (7.38 KB, patch)
2011-11-05 14:08 UTC, Oleksij Rempel
committed Details | Review

Description Oleksij Rempel 2011-07-11 06:56:02 UTC
Created attachment 191681 [details] [review]
patch v1

Current webmmuxer was not really changed to make valid stram.
This patch disables every thing what webm do not support.

I also disabled DefaultDuration, since webm should use only sipmeblock, there is no way to correct duration.
Comment 1 Sebastian Dröge (slomo) 2011-07-11 07:08:49 UTC
Review of attachment 191681 [details] [review]:

::: gst/matroska/matroska-mux.h
@@ +88,3 @@
   /* EBML DocType. */
   const gchar    *doctype;
+  gboolean       is_webm;

Why do you add a new field instead of changing the doctype to an enum and convert the enum to a string in the single place where doctype is used?
Comment 2 Sebastian Dröge (slomo) 2011-07-11 07:12:22 UTC
Review of attachment 191681 [details] [review]:

::: gst/matroska/matroska-mux.c
@@ +2694,3 @@
   if (collect_pad->track->type == GST_MATROSKA_TRACK_TYPE_VIDEO) {
     if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT)) {
+      if (!mux->is_webm && (strcmp (collect_pad->track->codec_id,

Why only for the !webm case?

@@ +2708,3 @@
+  } else if (collect_pad->track->type == GST_MATROSKA_TRACK_TYPE_AUDIO &&
+      mux->is_webm)
+    flags = 0x80;

Isn't this setting the discardable flag? You probably meant to set the keyframe flag
Comment 3 David Schleef 2011-07-11 23:18:20 UTC
I'm not a big fan of applying this patch.  The WebM spec for the container was written fairly quickly and has a number of known bugs that haven't been fixed.  I'd prefer to wait until there's a spec that is consistent and makes sense before making the muxer pedantic.

In particular, the bit about "You can't have anything beyond what we specified" is rather dumb, since that neatly excludes metadata, live streaming, and captioning.

I could be convinced that a "pedantic=true" flag would be appropriate.
Comment 4 Oleksij Rempel 2011-07-12 19:56:52 UTC
David, you have right.
I reduced this patch to optional "default frame duration". Only this option make difference for other players.
If default frame duration (frame rate) is written: 
mplayer - seek failed
vlc - ok
firefox - ok
chromium - seek filed
mkvmerge - converted frames with duration=0 to key frames (should  be fixed now)
Comment 5 Oleksij Rempel 2011-07-12 19:57:24 UTC
Created attachment 191847 [details] [review]
patch v2
Comment 6 Oleksij Rempel 2011-07-12 19:59:07 UTC
this patch depend on this one: https://bugzilla.gnome.org/show_bug.cgi?id=653080
Comment 7 Oleksij Rempel 2011-09-07 13:55:39 UTC
As it was discussed on IRC, we should make it option per stream not per file.
Comment 8 Oleksij Rempel 2011-10-12 20:54:38 UTC
Created attachment 198884 [details] [review]
patch v3

New patch, this add PadOption for frmaerate.
Comment 9 Oleksij Rempel 2011-11-05 14:08:38 UTC
Created attachment 200752 [details] [review]
patch v4

Latest version of this patch
Comment 10 Oleksij Rempel 2011-11-29 07:46:19 UTC
any updates?
Comment 11 Sebastian Dröge (slomo) 2011-12-01 09:56:08 UTC
commit 23594b0324e4bfdc153fcf89569b74bdb918c94d
Author: Alexey Fisher <bug-track@fisher-privat.net>
Date:   Tue Oct 11 02:07:13 2011 +0200

    matroskamux: make default framerate optional per stream
    
    there is at least two use cases where default frame rate
    should or may be disabled:
    - vp8 stream with altref frame enabled. If default frame rate
    is enabled, some players will missinterprete it (critical!)
    - for webm container, to reduce micro overhead
    - for stream with variable frame rate.
    
    Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Comment 12 Tim-Philipp Müller 2011-12-01 13:24:39 UTC
Running suite(s): matroskamux


Unexpected critical/warning: g_param_spec_internal: assertion `!(flags & G_PARAM_STATIC_NAME) || is_canonical (name)' failed


Unexpected critical/warning: g_param_spec_internal: assertion `!(flags & G_PARAM_STATIC_NAME) || is_canonical (name)' failed


Unexpected critical/warning: g_param_spec_internal: assertion `!(flags & G_PARAM_STATIC_NAME) || is_canonical (name)' failed


Unexpected critical/warning: g_param_spec_internal: assertion `!(flags & G_PARAM_STATIC_NAME) || is_canonical (name)' failed
0%: Checks: 4, Failures: 4, Errors: 0
gstcheck.c:72:F:general:test_ebml_header:0: Unexpected critical/warning: g_param_spec_internal: assertion `!(flags & G_PARAM_STATIC_NAME) || is_canonical (name)' failed
gstcheck.c:72:F:general:test_vorbis_header:0: Unexpected critical/warning: g_param_spec_internal: assertion `!(flags & G_PARAM_STATIC_NAME) || is_canonical (name)' failed
gstcheck.c:72:F:general:test_block_group:0: Unexpected critical/warning: g_param_spec_internal: assertion `!(flags & G_PARAM_STATIC_NAME) || is_canonical (name)' failed
gstcheck.c:72:F:general:test_reset:0: Unexpected critical/warning: g_param_spec_internal: assertion `!(flags & G_PARAM_STATIC_NAME) || is_canonical (name)' failed
FAIL: elements/matroskamux

commit 337533ee843eb86289f4550293b30a853b31e94e
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Thu Dec 1 13:22:42 2011 +0000

    matroska-mux: fix name of new property and the unit test
    
    https://bugzilla.gnome.org/show_bug.cgi?id=654379
Comment 13 Tim-Philipp Müller 2012-02-20 14:18:48 UTC
For future reference, calling a property "frame-duration" when it's a boolean is just awful (should have noticed that earlier when I changed the name..)
Comment 14 Sebastian Dröge (slomo) 2016-09-29 07:19:39 UTC
The latest version of the WebM spec says that DefaultDuration is supported: http://www.webmproject.org/docs/container/

Going to enable it by default again now, so that we can guess the framerate from it. See also bug #772141

Might want to make the property deprecated...