DCI XML subtiltles - custom positioning for each line?

Anything and everything to do with DCP-o-matic.
mdudzik
Posts: 20
Joined: Wed Mar 02, 2016 7:49 pm

DCI XML subtiltles - custom positioning for each line?

Post by mdudzik »

Hello all,

I am aware that DOM forum is not the best place for my question, but hopefully someone will be able to help me?

From time to time, mostly for festival screenings, I need to change position of a single line (not all of them) to completely custom (eg. 10% to the right and 20% up) from eg.:

HAlign="center" HPosition="0.0" VAlign="bottom" VPosition="8"

to make it for example:

HAlign="center" HPosition="10.0" VAlign="bottom" VPosition="28"

Is there any application that you could suggest me that is able to to it? Doing it manually is not really conveniant; I'd love to have some kind of WYSIWYG so I could test the result in real-time... not necessarily FOSS but of course - the cheaper the better.

Clipster can do it, but I am looking for something much more affordable... ;)


Well, looking forward to read your ideas.

all the best!
M.
Carsten
Posts: 3056
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: DCI XML subtiltles - custom positioning for each line?

Post by Carsten »

Did you try one of the various subtitle editors?

- Carsten
mdudzik
Posts: 20
Joined: Wed Mar 02, 2016 7:49 pm

Re: DCI XML subtiltles - custom positioning for each line?

Post by mdudzik »

Dear Carsten,

I believe I've tried/checked almost all of them - starting with SubtitleEdit, Subtitle Workshop and Jubler, through MacCaptions, EZTitles, FAB and Belle Nuit, SubtitleCreator and Aegisub. Does anything else come to your mind?


thanks,
Marek
barber
Posts: 63
Joined: Fri Apr 15, 2016 4:03 pm

Re: DCI XML subtiltles - custom positioning for each line?

Post by barber »

Hello Marek,

I had found a simple workflow for this some years ago :
- creating and adjusting the subtitles in Final Cut Pro 7 (Outline Texts)
- exporting the subtitle track to XML
- using Andreas Kiel's TitleExchange Pro to convert the subtitle file to the required format (setting "Font Align" and "Font Style" to "From Source")

I haven't tried recently and don't know whether it is possible with more recent softwares like FCPX.
Nevertheless TitleExchange does output SMPTE DCI XML and other formats that DOM can import without losing custom positioning.

Best,

Dan
mdudzik
Posts: 20
Joined: Wed Mar 02, 2016 7:49 pm

Re: DCI XML subtiltles - custom positioning for each line?

Post by mdudzik »

Sorry for archaeology in my own thread - but perhaps there are any news in this subject?

New EZTitles can do what I'd need, but it's crazy expensive :shock:
barber
Posts: 63
Joined: Fri Apr 15, 2016 4:03 pm

Re: DCI XML subtiltles - custom positioning for each line?

Post by barber »

Hi Marek,
That's funny, I had forgotten I had posted here my antique subtitle workflow...

Hopefully there's now an actual (free) solution.
- In SubtitleEdit set your project to Advanced Sub Station Alpha (.ass) format.
- Create ASS Styles (in File>ASS Styles..) corresponding to the different positions/margins you want to use.
- Assign (right click>Set Style) the corresponding style to each subtitle.
- Export to .ass, import in DCP-o-matic.

If you load a video in Subtitle Edit, the preview will help you to find the correct formatting values (size, margin...) in the ASS styles.

DOM is now very good at keeping positioning/formatting from various formats (ass, stl, DCI xml...). The problem is that (last time I've checked) SubtitleEdit cannot set custom positioning to each line in DCI xml, so we have to use .ass as "intermediate" format.

Best,
Dan
mdudzik
Posts: 20
Joined: Wed Mar 02, 2016 7:49 pm

Re: DCI XML subtiltles - custom positioning for each line?

Post by mdudzik »

Hi Dan,

Actually I forgot I asked this question here few years ago and it popped up in my Google search when I looked for the new solution few days ago ;-)

Thanks a lot, I'll give it a try!

best!
M
barber
Posts: 63
Joined: Fri Apr 15, 2016 4:03 pm

Re: DCI XML subtiltles - custom positioning for each line?

Post by barber »

Hi,

I'm reviving this thread to share my current workflow for custom positioning of subtitles - hoping it may be useful to others.
So for now, I'm still using Subtitle Edit and the ASS format to create a .ass subtitle file with the precise positions and alignments I want.
  1. In Subtitle Edit set your project to Advanced Sub Station Alpha (.ass) format.
  2. Import a video file (Video->Open Video file...) of the content you are subtitling. It should be in the same framerate than the future DCP.
  3. In File->ASS Properties, check that the Video Resolution is that of the DCP you will make (DCI 2K Flat/Scope or DCI 4K Flat/Scope) even if you are working with a lower resolution video proxy.
  4. Create ASS Styles (in File>ASS Styles..) corresponding to the different positions/margins you want to use. Here is an exemple of some typical settings I use: Arial Font Size 58, Center bottom aligned, Vertical Margin 76, Outline border. Note that ASS fontsize is different than XML IOP/SMPTE fontsize.
    In this example I've created another style named "Right Credits" for subtitles I want to be aligned on the right and upper than the default subtitles.
    Capture d’écran 2026-01-27 020605.png
  5. Assign (right click>Set Style) the corresponding style to each subtitle or group of subtitles.
  6. If you want a very specific position for a subtitle, right-click on it -> ASSA Tools -> Set position. A window will allow you to click and position the subtitle wherever you want in the picture.
    Capture d’écran 2026-01-27 021722.png
    When you click OK a {\pos} tag will be added before the subtitle. Note that the position applies to the whole subtitle element. You cannot set two different positions for the two lines of a same subtitle (as it is sometimes needed by SDH).
  7. When you have finished, save the file to .ass.
As of today, you can import an ASS file directly into DCP-o-matic - the global alignments will be respected, but the positions won't match exactly what you see in the Subtitle Edit preview (or in VLC if you load the .ass file there). I don't know if an automatic and fully versatile conversion is possible, because ASS and SMPTE xml handle subtitle positioning very differently. But I managed to make a small Python script which fits my needs and converts an .ass file to a .xml SMPTE ST 428-7:2014 with excellent accuracy in subtitle placement. The preview in Subtitle Edit matches exactly the DOM preview.

Here are the main limitations :
  • It works for Arial/Liberation and similar but may not work for other fonts.
  • Regarding special formatting, only italics are supported. No bold, no underline, no color changes... The script will generate a white-letters-with-black-borders style for the whole subtitle file.
  • Font size of the first style will be applied to the whole file. No size change is supported.
  • Two lines maximum per subtitle is allowed. Otherwise the script will stop and show the problematic lines.
The usage is simple :
  • ass_to_smpte4287_en.py input.ass output.xml --framerate 25 --lang fr --title "Avatar"
  • Only in/out paths are required. Default framerate is 24 - you should set the correct one. "lang" will populate the XML <Language> tag (default is "en") and "title" is <ContentTitleText>
The script is attached to this post. Don't hesitate to send me your feedbacks. I've heavily used it the past few months but of course it's provided "as is" with no warranty, there are very dirty hacks inside.

Best,
Dan
You do not have the required permissions to view the files attached to this post.