Hi!
I have made subtitles with shotcut text-filter and now I need to have those subtitles in .srt -format. Any ideas?
Antti
Hi!
I have made subtitles with shotcut text-filter and now I need to have those subtitles in .srt -format. Any ideas?
Antti
Other than writing a program to process the XML in the .mlt project file and write a .srt subrip file - no.
It would have been beeter to do it the other way round. Create and SRT file then use my web utility to burn them into the video in Shotcut:
Thank you for your answer. I realized that Shotcut .srt -file problem little bit too late
.srt -fileformat is something like this
1
00:00:01,2 —>00:00:02,1
Hello
So my follow-up question is this: Is there a way to get those times out from ShotCut, when the subtitle starts and when it ends?
It is going to be virtually impossible for you to get all the texts and their start and end times out of the .mlt file. Below is a very simple MLT file of a project that has 1 track, a 4 second color bar clip followed by a 3 second Text: Simple filter clip with the text “TEXT for Subtitle”.
If you can figure out the start and end times from this, there might be some hope for you, but I doubt it is possible without a lot of effort and debugging for a large project:
<?xml version="1.0" standalone="no"?>
<mlt LC_NUMERIC="C" version="7.9.0" title="Shotcut version 22.10.25" producer="main_bin">
<profile description="PAL 4:3 DV or DVD" width="640" height="480" progressive="1" sample_aspect_num="1" sample_aspect_den="1" display_aspect_num="4" display_aspect_den="3" frame_rate_num="30000" frame_rate_den="1001" colorspace="601"/>
<playlist id="main_bin">
<property name="xml_retain">1</property>
</playlist>
<producer id="black" in="00:00:00.000" out="00:00:06.974">
<property name="length">00:00:07.007</property>
<property name="eof">pause</property>
<property name="resource">0</property>
<property name="aspect_ratio">1</property>
<property name="mlt_service">color</property>
<property name="mlt_image_format">rgba</property>
<property name="set.test_audio">0</property>
</producer>
<playlist id="background">
<entry producer="black" in="00:00:00.000" out="00:00:06.974"/>
</playlist>
<producer id="producer0" in="00:00:00.000" out="03:59:59.993">
<property name="length">03:60:00.000</property>
<property name="eof">pause</property>
<property name="resource"><producer></property>
<property name="aspect_ratio">1</property>
<property name="version">0.1</property>
<property name="mlt_service">frei0r.test_pat_B</property>
<property name="0">4</property>
<property name="shotcut:caption">SMPTE colour bars</property>
<property name="shotcut:detail">SMPTE colour bars</property>
<property name="ignore_points">0</property>
<property name="xml">was here</property>
<property name="seekable">1</property>
</producer>
<producer id="producer1" in="00:00:00.000" out="03:59:59.993">
<property name="length">03:60:00.000</property>
<property name="eof">pause</property>
<property name="resource">#00000000</property>
<property name="aspect_ratio">1</property>
<property name="mlt_service">color</property>
<property name="mlt_image_format">rgba</property>
<property name="shotcut:caption">transparent</property>
<property name="shotcut:detail">transparent</property>
<property name="ignore_points">0</property>
<property name="xml">was here</property>
<property name="seekable">1</property>
<filter id="filter0" out="00:00:02.970">
<property name="argument">TEXT for Subtitle</property>
<property name="geometry">0 360 640 120 1</property>
<property name="family">Verdana</property>
<property name="size">100</property>
<property name="weight">750</property>
<property name="style">normal</property>
<property name="fgcolour">#ffffffff</property>
<property name="bgcolour">#00000000</property>
<property name="olcolour">#aa000000</property>
<property name="pad">0</property>
<property name="halign">center</property>
<property name="valign">top</property>
<property name="outline">3</property>
<property name="mlt_service">dynamictext</property>
<property name="shotcut:filter">dynamicText</property>
<property name="shotcut:usePointSize">1</property>
<property name="shotcut:pointSize">60</property>
</filter>
</producer>
<playlist id="playlist0">
<property name="shotcut:video">1</property>
<property name="shotcut:name">V1</property>
<entry producer="producer0" in="00:00:00.000" out="00:00:03.971"/>
<entry producer="producer1" in="00:00:00.000" out="00:00:02.970"/>
</playlist>
<tractor id="tractor0" title="Shotcut version 22.10.25" in="00:00:00.000" out="00:00:06.974">
<property name="shotcut">1</property>
<property name="shotcut:projectAudioChannels">2</property>
<property name="shotcut:projectFolder">0</property>
<track producer="background"/>
<track producer="playlist0"/>
<transition id="transition0">
<property name="a_track">0</property>
<property name="b_track">1</property>
<property name="mlt_service">mix</property>
<property name="always_active">1</property>
<property name="sum">1</property>
</transition>
<transition id="transition1">
<property name="a_track">0</property>
<property name="b_track">1</property>
<property name="version">0.1</property>
<property name="mlt_service">frei0r.cairoblend</property>
<property name="threads">0</property>
<property name="disable">1</property>
</transition>
</tractor>
</mlt>
Thanks. You may be right. This task seems too tough for me.
<producer id="producer3" in="00:00:00.000" out="03:59:59.960">
<property name="length">04:00:00.000</property>
<property name="eof">pause</property>
<property name="resource">#00000000</property>
<property name="aspect_ratio">1</property>
<property name="mlt_service">color</property>
<property name="mlt_image_format">rgba</property>
<property name="shotcut:caption">transparent</property>
<property name="shotcut:detail">transparent</property>
<property name="ignore_points">0</property>
<property name="xml">was here</property>
<property name="seekable">1</property>
<filter id="filter1" out="00:00:01.800">
<property name="argument">This is a subtitle</property>
<property name="geometry">0 810 1920 270 1</property>
<property name="family">Verdana</property>
<property name="size">80</property>
<property name="weight">750</property>
<property name="style">normal</property>
<property name="fgcolour">#ffffffff</property>
<property name="bgcolour">#00000000</property>
<property name="olcolour">#aa000000</property>
<property name="pad">0</property>
<property name="halign">center</property>
<property name="valign">top</property>
<property name="outline">3</property>
<property name="mlt_service">dynamictext</property>
<property name="shotcut:filter">dynamicText</property>
<property name="shotcut:usePointSize">1</property>
<property name="shotcut:pointSize">60</property>
</filter>
</producer>
Because I just don’t get this. This piece of xml is one subtitle that starts from 00:00:00:04 and ends 00:00:02:00, but this information lacks here completly, or then I just really do not understand anything about this xml-file. It would make sense to me, if in and out parameters would mean when this simple filter clip with the text will start and when it will end, but no, there is the start time and end time of the whole file, and maybe that out, in filter <filter id="filter1" out="00:00:01.800">
could mean the ending time, but for my eyes, that part of subtitles end in 00:00:02:00.
So I may have to do these subtitles all over again. I make automatic English subtitles with VEED, get .srt file out of there and change the English text to my own language. At least this way I can get the timings right. Although also timings may vary a little, because sentences are not equally long in both languages.
This topic was automatically closed after 90 days. New replies are no longer allowed.