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 797111 - qtmux: Store video track width/height for closed caption tracks
qtmux: Store video track width/height for closed caption tracks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other All
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-09-10 12:08 UTC by Sebastian Dröge (slomo)
Modified: 2018-09-20 08:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
video-anc: Store width/height for which Closed Caption data was produced in the meta (3.75 KB, patch)
2018-09-10 12:08 UTC, Sebastian Dröge (slomo)
rejected Details | Review
qtmux: Initialize caption track language code to 0 instead of "und" (1.03 KB, patch)
2018-09-10 12:09 UTC, Sebastian Dröge (slomo)
committed Details | Review
qtmux: Store width/height in caption track header (3.60 KB, patch)
2018-09-10 12:09 UTC, Sebastian Dröge (slomo)
rejected Details | Review
deinterlace: Set width/height in closed caption meta (1.41 KB, patch)
2018-09-10 12:09 UTC, Sebastian Dröge (slomo)
rejected Details | Review
decklinkvideosrc: Store Closed Caption width/height in the meta (1.20 KB, patch)
2018-09-10 12:10 UTC, Sebastian Dröge (slomo)
rejected Details | Review
ccextractor: Use gst_caps_new_simple() instead of gst_caps_from_string() (2.05 KB, patch)
2018-09-10 12:10 UTC, Sebastian Dröge (slomo)
committed Details | Review
closedcaption: Store Closed Caption width/height in meta and caps (2.31 KB, patch)
2018-09-10 12:10 UTC, Sebastian Dröge (slomo)
rejected Details | Review
avviddec: Set width/height in closed caption meta (1.34 KB, patch)
2018-09-10 12:11 UTC, Sebastian Dröge (slomo)
rejected Details | Review
qtmux: Set Closed Caption track width/height to that of the first video track (2.03 KB, patch)
2018-09-18 15:14 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2018-09-10 12:08:31 UTC
E.g. MOV wants this to be stored and it should also be required for proper
layouting of the closed captions in renderers.
Comment 1 Sebastian Dröge (slomo) 2018-09-10 12:08:36 UTC
Created attachment 373583 [details] [review]
video-anc: Store width/height for which Closed Caption data was produced in the meta

This is required by some muxers and also for proper rendering.
Comment 2 Sebastian Dröge (slomo) 2018-09-10 12:09:12 UTC
Created attachment 373584 [details] [review]
qtmux: Initialize caption track language code to 0 instead of "und"

Without this, Final Cut considers it "non-standard"
Comment 3 Sebastian Dröge (slomo) 2018-09-10 12:09:18 UTC
Created attachment 373585 [details] [review]
qtmux: Store width/height in caption track header

This is required by the spec. If we don't have any width/height, we
still store 0.
Comment 4 Sebastian Dröge (slomo) 2018-09-10 12:09:24 UTC
Created attachment 373586 [details] [review]
deinterlace: Set width/height in closed caption meta
Comment 5 Sebastian Dröge (slomo) 2018-09-10 12:10:11 UTC
Created attachment 373587 [details] [review]
decklinkvideosrc: Store Closed Caption width/height in the meta
Comment 6 Sebastian Dröge (slomo) 2018-09-10 12:10:16 UTC
Created attachment 373588 [details] [review]
ccextractor: Use gst_caps_new_simple() instead of gst_caps_from_string()
Comment 7 Sebastian Dröge (slomo) 2018-09-10 12:10:22 UTC
Created attachment 373589 [details] [review]
closedcaption: Store Closed Caption width/height in meta and caps
Comment 8 Sebastian Dröge (slomo) 2018-09-10 12:11:20 UTC
Created attachment 373590 [details] [review]
avviddec: Set width/height in closed caption meta
Comment 9 Edward Hervey 2018-09-13 06:25:23 UTC
For the meta we don't really need to put it there, you could just use the width/height from the underlying stream (CC meta are on video streams which should have width/height on them).

For standalone CC streams I agree that having width/height as (maybe optional) caps would be a good idea.
Comment 10 Sebastian Dröge (slomo) 2018-09-13 06:39:52 UTC
(In reply to Edward Hervey from comment #9)
> For the meta we don't really need to put it there, you could just use the
> width/height from the underlying stream (CC meta are on video streams which
> should have width/height on them).

The problem with that is that the stream could be rescaled but the meta would be passed through as-is

> For standalone CC streams I agree that having width/height as (maybe
> optional) caps would be a good idea.

Not set would be 0 in this case
Comment 11 Edward Hervey 2018-09-18 12:19:13 UTC
(Summary of discussion that happened offline)

Closed Caption are not "pixel-dependent" systems, therefore the width/height of the underlying video doesn't matter per-se. What matters is:
* The *display* resolution (if it's rendered/overlayed)
* To a certain extent the aspect-ratio of the original material.

The information regarding the aspect-ratio is within the CDP stream (either not specified and it's 16:9, or specified). For raw CEA 608 streams (non-CDP), it's implied to be 4:3.

=> We don't *need* to store/provide the width/height of the original video stream for a standalone CC stream.

So for storing CC in MOV, I would therefore recommend to just store in that CC 'trak' the same width/height as the correlated video stream.

(Out of scope, but put here for completion) For display/rendering, we should use the *display* resolution/ratio (unrelated to underlying video stream) and the original-aspect-ratio of the CC stream to figure out the ideal/optimal rendering. But this is a similar problem to efficient rendering of other sub formats.
Comment 12 Sebastian Dröge (slomo) 2018-09-18 15:14:30 UTC
Created attachment 373690 [details] [review]
qtmux: Set Closed Caption track width/height to that of the first video track

Otherwise software like Premiere or Final Cut Pro won't like our files.
Comment 13 Sebastian Dröge (slomo) 2018-09-20 08:35:42 UTC
Attachment 373690 [details] pushed as c6e07a6 - qtmux: Set Closed Caption track width/height to that of the first video track