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 736752 - mp4mux/qtmux: Add HEVC support
mp4mux/qtmux: Add HEVC support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal enhancement
: 1.11.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-16 14:23 UTC by Richard Mitic
Modified: 2017-01-12 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
qtmux: add basic HEVC/H.265 muxing support (3.68 KB, patch)
2017-01-12 15:18 UTC, Aurélien Zanelli
none Details | Review
qtmux: add basic HEVC/H.265 muxing support (2.86 KB, patch)
2017-01-12 16:35 UTC, Aurélien Zanelli
committed Details | Review

Description Richard Mitic 2014-09-16 14:23:42 UTC
Add support for muxing HEVC streams in mp4mux/qtmux. It's already supported in qtdemux, so this would be a nice complement.
Comment 1 Tim-Philipp Müller 2014-09-16 17:29:31 UTC
Are you going to work on a patch? :)
Comment 2 Aurélien Zanelli 2017-01-12 15:18:55 UTC
Created attachment 343375 [details] [review]
qtmux: add basic HEVC/H.265 muxing support

Since I am interested in HEVC muxing in qtmux, here is a patch to add this feature. It is basically the same code as h264. Resulting file, encoding with this pipeline:

gst-launch-1.0 videotestsrc num-buffers=60 ! x265enc ! h265parse ! qtmux ! filesink location=/tmp/out.mp4

is successfully read by vlc and mplayer, and also using GStreamer plugins.
Comment 3 Sebastian Dröge (slomo) 2017-01-12 15:36:33 UTC
Review of attachment 343375 [details] [review]:

Some things that are weird, but they're probably copy&paste from the h264 code. Maybe omit them here and provide another patch for h264 :)

::: gst/isomp4/gstqtmux.c
@@ +4240,3 @@
+
+    if ((strcmp (format, "hvc1") != 0 && strcmp (format, "hev1") != 0) ||
+        alignment == NULL || strcmp (alignment, "au") != 0) {

alignment can't possibly be NULL here (and stream-format can't be missing either). They're both in the template caps.

@@ +4261,3 @@
+      gint avg_bitrate = 0;
+
+      gst_structure_get_int (structure, "bitrate", &avg_bitrate);

This should come via tags if anything, the caps generally don't have the bitrate
Comment 4 Aurélien Zanelli 2017-01-12 16:32:42 UTC
(In reply to Sebastian Dröge (slomo) from comment #3)
> Review of attachment 343375 [details] [review] [review]:
> 
> Some things that are weird, but they're probably copy&paste from the h264
> code. Maybe omit them here and provide another patch for h264 :)
> 
> ::: gst/isomp4/gstqtmux.c
> @@ +4240,3 @@
> +
> +    if ((strcmp (format, "hvc1") != 0 && strcmp (format, "hev1") != 0) ||
> +        alignment == NULL || strcmp (alignment, "au") != 0) {
> 
> alignment can't possibly be NULL here (and stream-format can't be missing
> either). They're both in the template caps.

Indeed, I will remove all this tests as all are already done when intersecting with pad template.

> 
> @@ +4261,3 @@
> +      gint avg_bitrate = 0;
> +
> +      gst_structure_get_int (structure, "bitrate", &avg_bitrate);
> 
> This should come via tags if anything, the caps generally don't have the
> bitrate

Copy&paste from h264, I assumed that weird code use it, but it doesn't make sense and associated qtmux fields are set on tags event. I will provide a patch for h264.

and thanks for review.
Comment 5 Aurélien Zanelli 2017-01-12 16:35:48 UTC
Created attachment 343380 [details] [review]
qtmux: add basic HEVC/H.265 muxing support
Comment 6 Sebastian Dröge (slomo) 2017-01-12 17:08:29 UTC
Comment on attachment 343380 [details] [review]
qtmux: add basic HEVC/H.265 muxing support

Looks good, now just h264 before we forget again. thanks!
Comment 7 Aurélien Zanelli 2017-01-12 17:10:57 UTC
(In reply to Sebastian Dröge (slomo) from comment #6)
> Comment on attachment 343380 [details] [review] [review]
> qtmux: add basic HEVC/H.265 muxing support
> 
> Looks good, now just h264 before we forget again. thanks!

I opened a new bug for this:
https://bugzilla.gnome.org/show_bug.cgi?id=777181
Comment 8 Sebastian Dröge (slomo) 2017-01-12 17:18:01 UTC
Attachment 343380 [details] pushed as 4c6a69f - qtmux: add basic HEVC/H.265 muxing support