Announcement

Collapse
No announcement yet.

SMPTE subtitle positioning in DCPs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SMPTE subtitle positioning in DCPs

    Hi all,

    I wonder if anybody can shed any light on some confusion on my part which I think is now into its third or fourth year... it relates to the seemingly simple question: "I have a DCP subtitle with a VAlign of 'top' and some VPosition. I measure the VPosition from the top of the screen, and then: do I put the top of the subtitle at this position, or the baseline?'

    There seems to be 4 different places where this is specified: the interop CineCanvas 'standard', SMPTE 428-7 (2007), SMPTE 428-7 (2010) and SMPTE 428-7 (2014).

    Interop is clear: the reference is the baseline.

    SMPTE 428-7 from 2007 and 2010 are, to be honest, not clear. For the "text" subtitle case they refer to a table from the "image" subtitle case (table 3 for those following along at home) which says the VPosition is "The distance between the top primary image border and the top subtitle instance border.​"

    In SMPTE 2014 the clouds are finally lifted and it's clearly specified that the reference is the baseline.

    In current versions DCP-o-matic dutifully follows this mess and interprets 2007/2010-namespaced subs as "reference is top".

    I always thought it a bit weird that SMPTE changed from a de-facto standard to a new (albeit easier-to-implement) way, and then back again. After just finding a message deep in my inbox from somebody saying that DCP-o-matic's subtitle placement disagrees with their Barco, I'm now wondering if I've misread it all along and we should always have been using baseline alignment.

    If anybody has any insights here, I'd be glad to hear them.

    All the best,
    Carl

  • #2
    Now of course I find a thread from some dodgy DCP authoring software forum: https://www.dcpomatic.com/forum/viewtopic.php?t=2030 where we talked about this 3 years ago. Nonetheless, I'd be interested if anybody has any updated information, or if things have changed in the field since then!

    Comment


    • #3
      When you consider the types of servers/projectors in the field and the very small range of servers in current production, I guess the only viable way to target this is testing and adjusting DCP-o-matic's subtitle positioning to the test results (maybe issue warnings prior to DCP generation when subtitles are placed in critical areas).
      Many servers and projectors will not see software updates correcting the subtitle rendering behaviour. Some servers have options to adjust subtitle height, some not.


      This is something that should have long been addressed by ISDCF.
      Last edited by Carsten Kurz; 07-12-2025, 06:24 PM.

      Comment


      • #4
        You are right! The 2007 version referenced the bounding box of the subtitle (top, center, and bottom of the bounding box for top, center, and bottom Valign). The 2014 version uses the horizontal text baseline. It gets really messy for vertical text (like Japanese or Chinese). Ideally, the vertical origin (typically centered above a glyph, but not always, as some glyphs are offset from center) would be the reference point, and the character spacing would be the advance height as specified in the font file. However, font compressors remove vertical metrics, so there is no information as to how vertical text is supposed to be positioned or spaced. Some systems use the bounding box of the glyph, and one uses the horizontal baseline. And, without the advance height, systems space the glyph bounding boxes an unspecified amount. This results in the Japanese 111 displaying as a Japanese 3. There is a SMPTE EG in process that offers a workaround for Japanese text. Before retiring, I advocated proper interpretation of the font file (and not discarding vertical metrics), but I did not prevail.

        Comment


        • #5
          And because asian fonts are usually very large, font compressors are probably always applied.

          Comment


          • #6
            Originally posted by Harold Hallikainen View Post
            It gets really messy for vertical text (like Japanese or Chinese). Ideally, the vertical origin (typically centered above a glyph, but not always, as some glyphs are offset from center) would be the reference point, and the character spacing would be the advance height as specified in the font file.
            A little off-topic, but you triggered me. I've seen Japanese movies with vertical credits and I've seen some on Japanese TV. Is it common practice in Asian countries to put vertical subtitles into DCPs?

            To me it looks like those cultures have adapted to the West, as such that it is nowadays probably more common to write stuff left to right instead of top to bottom.

            Comment


            • #7
              Top to bottom would probably also hide more image content under the subs, but maybe that's okay when placing them on the extreme sides. But then, sides are usually cropped to a larger extent for all non-standard screen aspect rations. Add keystoning and side cropping. Not nice.

              Comment


              • #8
                Originally posted by Carsten Kurz View Post
                Top to bottom would probably also hide more image content under the subs, but maybe that's okay when placing them on the extreme sides. But then, sides are usually cropped to a larger extent for all non-standard screen aspect rations. Add keystoning and side cropping. Not nice.
                Not to mention if you do have cropping hiding keystone, vertical language text at an edge is gonna look very non-vertical relative to masking and crop line. Would probably look subjectively “better” just to pin the masking to follow the keystone angles and avoid corrective crops, until everyone has 4k geometry correcting capacity anyway.

                Comment


                • #9
                  I think the choice of horizontal or vertical Japanese subtitles is an artistic choice. It seems like the handling of vertical subtitles is a substantial issue. I dealt with it in SMPTE for at least 5 years. I hear that the issue is holding up Japan's transition to SMPTE DCPs. However, I believe that Interop subtitles (using CineCanvas) would have the same issue with vertical subtitles. Recall also that Japanese vertical text has columns starting at the right side of the page (or screen) and advancing to the left.

                  On font compression, I believe the intent is to remove characters from the font file if they are not used in the reel or composition. A font file may include a LOT of code points that are not used. However, I think vertical metrics would be a pretty small part of a font file, much smaller than the glyph outline.

                  Back on the original question, the draft EG on Japanese subtitles suggests using Valign = "bottom" for improved vertical location consistency. Since the horizontal baseline is closer to the bottom of the bounding box than it is to the top of the bounding box, there is a smaller difference in subtitle positioning by using bottom alignment. Most of the horizontal subtitle files I've seen use bottom alignment. For vertical text, it SEEMS more logical to use top alignment since the subtitle column starts at the top, however, bottom alignment will give more consistent placement, again, due to the smaller distance between the horizontal baseline and the bottom of the bounding box than between the horizontal baseline and the top of the bounding box.

                  Another solution is to just put the subtitles in PNG images. They will be displayed consistently. That might be an interesting option for DOM.

                  In my research on this, back when I was chair of the SMPTE subtitle committee, I tried to get a good understanding of font files. They are complicated! I never did figure out how to determine the coordinates of the vertical origin. Typography is complicated!

                  Comment


                  • #10
                    Originally posted by Harold Hallikainen View Post
                    [...]
                    In my research on this, back when I was chair of the SMPTE subtitle committee, I tried to get a good understanding of font files. They are complicated! I never did figure out how to determine the coordinates of the vertical origin. Typography is complicated!
                    And I always wondered if you got to parse the SMPTE subtitle MXF file, you were asking about some time ago, on another forum.
                    As of now, the asdcp library never got to deliver the fonts file of a SMPTE subtitles' package. One either backs up, or makes anew.

                    PNG makes sense for consistency, especially as an alternative to hard coding for "safety", but I scarcely see subtitles like that nowadays. And I don't remember if I ever had seen any on a SMPTE package.

                    Comment


                    • #11
                      Originally posted by Ioannis Syrogiannis View Post
                      As of now, the asdcp library never got to deliver the fonts file of a SMPTE subtitles' package.
                      If you are wanting to get the font out of a SMPTE subtitle MXF, there is small tool in libdcp (a part of DCP-o-matic) called "dcpdumpsub" which can do it. I could distribute it if it were useful.

                      Comment


                      • #12
                        "I grow old ever learning many things."
                        Thank you, Carl, that's nice to know. I would say "yes", being hungry for more and more tools at my disposal. Yet, to be frank, I don't know when I would use it next.
                        It could be in a month or in half a year...

                        I was always met with the error:
                        Code:
                        Error opening file /<UUID-file-name-here>: Permission denied
                        Program stopped on error.
                        File open failure.​
                        and exporting only the subtitle file, when running asdcp-unwrap on a SMPTE subtitle. So, I presumed that to be the only way to go.

                        Comment


                        • #13
                          Originally posted by Harold Hallikainen View Post
                          I think the choice of horizontal or vertical Japanese subtitles is an artistic
                          choice. It seems like the handling of vertical subtitles is a substantial issue. ​
                          Back some time in the 1990's, I was involved with a company that was producing a
                          set of educational laser disks for Japanese students learning English. The producer
                          wanted to be able to do both vertical Japanese text on screen as well as English.
                          Although we had one of the most state-of-the-art (at that time) 3M character
                          generators, there was no easy way to get it to do Japanese text, vertical or
                          horizontal. We we wound up going to one of the Bay Area UHF stations that
                          broadcast Japanese programs, and they had the equipment to do the vertical,
                          traditional, Japanese text. We were mastering the project on 1" videotape, but,
                          as I mentioned, the final product was a set of interactive educational laser-disks.

                          Comment

                          Working...
                          X