Log in

View Full Version : Subtitle Edit


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 [36] 37 38 39 40 41 42 43 44

cubicibo
3rd March 2024, 13:24
You can have two distincts <event> with partially overlapping InTC and OutTC as long as:
- Each <Event> has a single <Graphic> (maximum of two concurrent <Graphic>)
- The <Graphic> do not spatially overlap.
- The palette of both <Graphic> are identical, or they can be combined as a single <256 colours palette.

This method has pros and cons:
- Better buffer management.
- Easy usage of inline effects like fade, position, color.
- More efficient stream encoding
- Limited to two objects
- PGS encoder is easy to implement: the BDN XML describes the data stream well enough.
- Limited to two overlapping event at any time.
- Palette has to be managed carefully in PNG generation logic.
- Palette management is constrained and hard to implement. The easy way out is to always use 127+1 colors per event. But this may not be enough for colorful subtitles.

Since the conditions above are just too much for most renderer, especially events sharing the same palette, most software rightfully use non overlapping <event>.

- Each <event> can have one or two <graphic>, whose content is irrelevant.
- No need to worry about spatial overlapping across different <event>.
- Each <event> has its own palette (which need to be shared by the two <graphic>). No need to consider neighbout events in time to generate the palette, only the active <graphic>(s).
- Cannot easily make use of BDN inline effects, as there's no logical <graphic> continuity in the <Events> timeline.
- Cannot encode PGS easily, as the BDN gives no helpful indication on the datastream structure, contiguous events, and so on.
- Way too many <graphic> generated, with often suboptimal splits and sizes.

And that's the shitty part.
- There's no smart BDN generators. The output is already too specific to the PGS format, differs too much from common subtitling needs to demotivate companies to implement it properly. Maybe Lemony Pro gets a few things right, but is still not ideal.
- "Stupid" BDN generators like avs2bdnxml or ass2bdnxml leave all the complexity to the PGS encoder. Scenarist and co do their best, but they all have their own issues. The main problem with Scenarist BDNImport is to allocate one buffer slot for every unique bitmap shape. It should just pad everything to the same size to reuse memory allocation. If your BDN is not nicely made, Scenarist won't be happy.

In essence, PGS encoders expect the BDN XML generators to address the complexities. And BDN generators wants PGS encoders to handle them. It is like politics, all blaming each others and not doing anything ;)

Anyway, just my brain dump on the matter raised by jpsdr.

tormento
5th March 2024, 14:15
Look at this PGS (https://www.mediafire.com/file/2fsudmaobcxu55i/2012_Evangelion_3.33_%25E2%2580%2593_You_can_%2528not%2529_redo.7z/file), at a certain point it becomes a pain.

If you can help me to find a faster strategy to ass conversion, I will be really grateful.

von Suppé
17th March 2024, 08:27
@Nikse
There's something wrong with the SUP editor in version 4.0.3 Try importing a SUP with background video, do some positioning edits and save as XML/PNG. Now import the result back.
All durations come out negative which values start very small and negatively increase towards the last subs. Can you have a look? Tried on both Windows 7 and 10.

[EDIT] FYI version 4.0.2 also has this behaviour. Version 4.0.1 works well.

Zetti
17th March 2024, 20:40
Thanks for new release:
https://github.com/SubtitleEdit/subtitleedit/releases/tag/4.0.4

von Suppé
24th March 2024, 10:24
:thanks: for your continuous work on Subtitle Edit, Nikse. XML/PNG issue are ironed out.

GCRaistlin
9th April 2024, 15:40
How do I use Synchronization - Point sync via another subtitle? I want to use timestamps in subtitles 1 to replace corresponding ones in subtitles 2.

Music Fan
9th April 2024, 16:19
When your file is opened, import timecodes of another file, it will import only its timecodes even if it contains text.

von Suppé
16th April 2024, 13:36
Hi Nikse,

I'm on latest SE 4.0.5. In the "Fix common errors" window, the function "Remove dialog dashes in single lines" prompts to remove dash (& space) in the second line, when first line doesn't end with a period.
For example:

This line ends with no period
- Second line beginning with with dash & space.

==>> is prompted for change into

This line ends with no period
Second line with dash & space.

It seems like SE assesses this kind of lines as being one. Can you have a look, please?

Thank you

Yosho
17th April 2024, 06:56
After updating I lost the auto text scrolling on the left while playing the video. Is there a way to get it back?

von Suppé
17th April 2024, 10:01
Maybe by choosing the proper template under the Layout button?

Yosho
17th April 2024, 17:30
nvm. this can be deleted.

LouieChuckyMerry
19th April 2024, 19:38
As always, thank you for Subtitle Edit :) . Some versions ago three windows began popping up whenever I open a subtitle--Video, Audio, and Controls--and I'm wondering if there's a way to make this stop? I've been meaning to ask for a while but am now just finding the time; thanks for any help.

von Suppé
20th April 2024, 09:19
Maybe you have undocked video controls. Try Video --> Re-dock video controls.

LouieChuckyMerry
20th April 2024, 19:31
von Suppé: Thanks for your reply. That's certainly an improvement. Is there any way to make the layout look like it did before the change; ie., no video or waveform windows, just the text?

Yosho
24th April 2024, 04:50
Use FFprobe to extract exact frame time codes does not yield any results. Does this feature actually work? What could I be missing assets or settings wise?
I can't seem to find good software to sync subs for me. Subsync doesn't work for me. I have to edit subs via waveform which takes weeks or months at a time.. I want to cut down on time needing to edit them. But it seems like I can't get the FFprobe to do it's thing in subtitle edit and I can't figure out why it can't or doesn't extract frame time codes..

von Suppé
25th April 2024, 12:56
Is there any way to make the layout look like it did before the change; ie., no video or waveform windows, just the text?

I think you have to choose a GUI template under the "Layout" button.

LouieChuckyMerry
28th April 2024, 03:14
I think you have to choose a GUI template under the "Layout" button.
_____________

:thanks:
:thanks:
:thanks:
:thanks:
:thanks:
:thanks:

I'd buy you multiple beverages of your choice if I could, von Suppé :) .

Yosho
1st May 2024, 17:31
How could I tell subtitle edit to only pay attention to English if the pgs muxed has Chinese on top and English on the bottom?

Thunderbolt8
4th May 2024, 21:27
Thank you for all the new versions in recent years. Glad that there is still a good subtitle tool out there which gets improved continuously.

Nikse555
1st June 2024, 13:59
Thank you for all the new versions in recent years. Glad that there is still a good subtitle tool out there which gets improved continuously.

Thx, you're welcome :)
Just trying to make a good subtitle utility + have fun... 5.000.000 views + sticky :)

Also, SE 4.0.6 is out: https://github.com/SubtitleEdit/subtitleedit/releases
New: "Speech to text" (available in the Video menu) + Batch burn-in of subtitles (also in the Video menu) + many minor improvements.

RobertM
8th June 2024, 16:21
Hi folks, wondering if someone can give me some pointers on handling forced subs on BD titles.

To avoid missing a lot of dialogue in my advancing years I often find myself turning subs on. The default subs are too big and visually distracting, so I've taken to using SE to make my own smaller, subtle subs, and use tsMuxer to rebuild the BD title with the custom sup file that SE creates for me. This works nicely.

The issue I'm having happens when I haven't chosen to turn subs on and foreign dialogue needs to be forced in the subtitles. I use ass format in SE so I can create both my 'subtle' style plus a 'forced' style that is larger and more obvious (because everyone is going to read those). When exporting to sup format there is a "forced" checkbox at the left side, and this works fine for an occasional forced item. But if I have lots of forced text spread throughout the subtitles I can't find a way to segregate the forced items so I can turn them on as a group and not miss any of them.

It would be perfect if ASS had a forced attribute that would toggle the checkbox, or if I could sort the items in the export dialogue by tapping the 'style' header (and then tap the "#" header to put them back in the correct order before starting the export) or something like that. So far all I've found to do is to scroll through the list manually looking for my 'forced' style to show up and toggle those items myself.

Am I missing some easier method to segregate just those items I want to force?

Thanks.

KSSW
9th June 2024, 00:06
Hey guys, who knows the source code for PGS Blu ray decoding

cubicibo
9th June 2024, 19:36
FFmpeg contains pgssubdec.c (https://ffmpeg.org/doxygen/trunk/pgssubdec_8c.html).

KSSW
12th June 2024, 12:00
FFmpeg contains pgssubdec.c (https://ffmpeg.org/doxygen/trunk/pgssubdec_8c.html).

Thank you,Do you have PGS SUP decoding for 100% C++?

cubicibo
12th June 2024, 21:15
What for? Just call C code from C++ (https://isocpp.org/wiki/faq/mixing-c-and-cpp).

markfilipak
12th June 2024, 23:57
Hi All,

I started using SE a couple of weeks ago. Gosh, it's great!

I have some subs that are hanging around too long. Is there a way to automatically set the ending times of all subs to, say, 2 seconds plus 0.1 second per letter? That way "Hello there!" would be up for 3 seconds.

Emulgator
13th June 2024, 16:38
Should be possible to solve that with the already built-in math.
nikse has implemented Min Duration, Optimal / Max Chars/sec. and more per profile.
(Settings/General/Misc)

markfilipak
13th June 2024, 21:23
Should be possible to solve that with the already built-in math.
nikse has implemented Min Duration, Optimal / Max Chars/sec. and more per profile.
(Settings/General/Misc)
I don't think so. Show me how you have done it. Thanks! --Mark.

RobertM
29th June 2024, 01:49
I don't think so. Show me how you have done it. Thanks! --Mark.

I think it is possible using a 2-step process.

1. Use the "tools>adjust durations..." menu. Select the 'recalculate' method and set both parameters to 12 chars/sec. Then 'OK'. Now all subs will be set to your 0.1 sec/char setpoint. The math seems a bit odd to me, since I would have expected to get the right result when setting it to 10 chars/sec, but that doesn't seem to work right. I might be missing something in the settings.

2. Now use the "tools>adjust durations..." function again, but select the 'seconds' method, and set the parameter to 2 seconds. This will add 2 seconds to all of the subs.

So the end result is a base of 2 seconds with 0.1 seconds/char added to the time. There are other checkboxes that will allow you to avoid overlapping subs.

This method seems to give the result that you are looking for, if I understand you correctly.

markfilipak
29th June 2024, 02:07
I think it is possible using a 2-step process.

This method seems to give the result that you are looking for, if I understand you correctly.

Thank you, Robert. You're kind. Upon rereading your proposal, I agree it will probably work. But a script that includes regular expression processing will be easier. The subtitle file is just text.

Thanks again -- Mark.

RobertM
29th June 2024, 12:41
But a script that includes regular expression processing will be easier. The subtitle file is just text.

Yes, the subtitle files (srt, ass, etc.) are plain text, and could easily be edited to rewrite the durations as you desire. Are you looking for a standalone script to post-process the subtitle files outside of SE?

markfilipak
29th June 2024, 18:45
Yes, the subtitle files (srt, ass, etc.) are plain text, and could easily be edited to rewrite the durations as you desire. Are you looking for a standalone script to post-process the subtitle files outside of SE?

I am. If you have one handy that you want to share, that'd be great. If you don't, that's okay, too. It will be easy enough to write. I'm a little bogged down at the moment preparing a revised bug summary to submit to FFmpeg's trac system. That's why I haven't gotten around to this.

When/if I write my own, it will be HTML+javascript that works like this: Copy the srt into the web page, push a button, copy the result back to the srt. I'll have a field for the 'attention' duration and another for 'milliseconds per character'.

RobertM
30th June 2024, 01:26
I am. If you have one handy that you want to share, that'd be great.

I have a python script that I have used in the past to parse .ass files. It could be modified pretty easily to do what you want.

markfilipak
30th June 2024, 01:49
I have a python script that I have used in the past to parse .ass files. It could be modified pretty easily to do what you want.

It's been about 20 years since I wrote any python. I'd be pleased to look at it. If it's not too many lines, I imagine you could paste in doom9.

RobertM
30th June 2024, 05:40
I took my old file and rolled it into a new little script file for you. Seems to work in my testing, but you'll have to give it some real-world exercise. If you have Python installed on your system then you should be able to simply double-click it and the usage should become evident. Let me know if you have trouble.

I appended the script to this message, but it won't be available until it has been reviewed, I understand.

RobertM
3rd July 2024, 21:19
I'd be pleased to look at it. If it's not too many lines, I imagine you could paste in doom9.

Doesn't seem like my attachment is getting looked at, so I'll send you the code in a PM. It's a python script, so just text.

Emulgator
3rd July 2024, 23:19
You may report your own attachment for approval.
P.S. as RobertM did not, I just stepped in and reported it for approval.

jairovital
2nd August 2024, 20:29
I took my old file and rolled it into a new little script file for you. Seems to work in my testing, but you'll have to give it some real-world exercise. If you have Python installed on your system then you should be able to simply double-click it and the usage should become evident. Let me know if you have trouble.




Interesting what your Python scrip purposes to do.
I'd like to use it.

But I'm receiving this error:

==========================================================
SubTailor v0.0.01
==========================================================

This does not appear to be a valid *.ass file

Press 'enter' to quit.

Ass file is this:

[Script Info]
; Script generated by Aegisub 3.2.2
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: None

[Aegisub Project Garbage]
Scroll Position: 28
Active Line: 60

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:24.93,0:00:29.15,Default,,0,0,0,,I've had enough of danger
Dialogue: 0,0:00:30.97,0:00:34.40,Default,,0,0,0,,And people on the streets
Dialogue: 0,0:00:37.24,0:00:41.51,Default,,0,0,0,,I'm looking out for angels
Dialogue: 0,0:00:43.06,0:00:47.28,Default,,0,0,0,,Just trying to find some peace
Dialogue: 0,0:00:49.28,0:00:52.97,Default,,0,0,0,,Now I think it's time
Dialogue: 0,0:00:55.33,0:00:59.73,Default,,0,0,0,,That you let me know
Dialogue: 0,0:01:01.02,0:01:06.66,Default,,0,0,0,,So if you love me\NSay you love me
Dialogue: 0,0:01:06.93,0:01:12.53,Default,,0,0,0,,But if you don't\NJust let me go
Dialogue: 0,0:01:13.68,0:01:16.75,Default,,0,0,0,,Cause teacher
Dialogue: 0,0:01:16.75,0:01:22.44,Default,,0,0,0,,There are things that I don't want to learn
Dialogue: 0,0:01:24.48,0:01:28.75,Default,,0,0,0,,And the last one I had
Dialogue: 0,0:01:28.75,0:01:32.26,Default,,0,0,0,,Made me cry
Dialogue: 0,0:01:34.71,0:01:36.75,Default,,0,0,0,,So I don't want to learn to
Dialogue: 0,0:01:36.75,0:01:42.53,Default,,0,0,0,,Hold you, touch you
Dialogue: 0,0:01:43.68,0:01:47.11,Default,,0,0,0,,Think that you're mine
Dialogue: 0,0:01:47.64,0:01:51.28,Default,,0,0,0,,Because there ain't no joy
Dialogue: 0,0:01:52.71,0:01:57.06,Default,,0,0,0,,For an uptown boy
Dialogue: 0,0:01:57.06,0:02:02.13,Default,,0,0,0,,Whose teacher has told him goodbye
Dialogue: 0,0:02:03.06,0:02:06.31,Default,,0,0,0,,Goodbye
Dialogue: 0,0:02:06.31,0:02:08.31,Default,,0,0,0,,Goodbye
Dialogue: 0,0:02:08.31,0:02:12.62,Default,,0,0,0,,When you were just a stranger
Dialogue: 0,0:02:14.04,0:02:18.62,Default,,0,0,0,,And I was at your feet
Dialogue: 0,0:02:20.04,0:02:24.22,Default,,0,0,0,,I didn't feel the danger
Dialogue: 0,0:02:24.66,0:02:29.42,Default,,0,0,0,,Now I feel the heat
Dialogue: 0,0:02:31.46,0:02:36.04,Default,,0,0,0,,That look in your eyes
Dialogue: 0,0:02:38.31,0:02:42.31,Default,,0,0,0,,Telling me no
Dialogue: 0,0:02:42.31,0:02:45.64,Default,,0,0,0,,So you think that you love me
Dialogue: 0,0:02:45.64,0:02:48.97,Default,,0,0,0,,Know that you need me
Dialogue: 0,0:02:48.97,0:02:52.44,Default,,0,0,0,,I wrote the song, I know it's wrong
Dialogue: 0,0:02:52.44,0:02:55.91,Default,,0,0,0,,Just let me go
Dialogue: 0,0:02:56.40,0:02:59.68,Default,,0,0,0,,And teacher
Dialogue: 0,0:02:59.68,0:03:01.91,Default,,0,0,0,,There are things
Dialogue: 0,0:03:01.91,0:03:06.26,Default,,0,0,0,,That I don't want to learn
Dialogue: 0,0:03:07.68,0:03:11.73,Default,,0,0,0,,Oh the last one I had
Dialogue: 0,0:03:12.71,0:03:16.48,Default,,0,0,0,,Made me cry
Dialogue: 0,0:03:17.73,0:03:20.31,Default,,0,0,0,,So I don't want to learn to
Dialogue: 0,0:03:20.31,0:03:26.84,Default,,0,0,0,,Hold you, touch you
Dialogue: 0,0:03:26.84,0:03:30.31,Default,,0,0,0,,Think that you're mine
Dialogue: 0,0:03:30.88,0:03:34.40,Default,,0,0,0,,Because there ain't no joy
Dialogue: 0,0:03:36.66,0:03:40.26,Default,,0,0,0,,For an uptown boy
Dialogue: 0,0:03:40.26,0:03:46.40,Default,,0,0,0,,Whose teacher has told him goodbye
Dialogue: 0,0:03:46.88,0:03:48.97,Default,,0,0,0,,Goodbye
Dialogue: 0,0:03:48.97,0:03:52.00,Default,,0,0,0,,Goodbye
Dialogue: 0,0:04:24.57,0:04:28.97,Default,,0,0,0,,So when you say that you need me
Dialogue: 0,0:04:28.97,0:04:32.17,Default,,0,0,0,,That you'll never leave me
Dialogue: 0,0:04:32.17,0:04:36.31,Default,,0,0,0,,I know you're wrong, you're not that strong
Dialogue: 0,0:04:36.31,0:04:38.93,Default,,0,0,0,,Let me go
Dialogue: 0,0:04:38.93,0:04:42.04,Default,,0,0,0,,And teacher
Dialogue: 0,0:04:42.04,0:04:44.84,Default,,0,0,0,,There are things
Dialogue: 0,0:04:44.84,0:04:48.66,Default,,0,0,0,,That I still have to learn
Dialogue: 0,0:04:50.66,0:04:58.80,Default,,0,0,0,,But the one thing I have is my pride
Dialogue: 0,0:04:59.46,0:05:03.77,Default,,0,0,0,,Oh so I don't want to learn to
Dialogue: 0,0:05:03.77,0:05:08.84,Default,,0,0,0,,Hold you, touch you
Dialogue: 0,0:05:09.55,0:05:13.02,Default,,0,0,0,,Think that you're mine
Dialogue: 0,0:05:13.91,0:05:17.60,Default,,0,0,0,,Because there ain't no joy
Dialogue: 0,0:05:19.73,0:05:23.33,Default,,0,0,0,,For an uptown boy
Dialogue: 0,0:05:23.33,0:05:29.02,Default,,0,0,0,,Who just isn't willing to try
Dialogue: 0,0:05:29.02,0:05:32.40,Default,,0,0,0,,I'm so cold
Dialogue: 0,0:05:32.40,0:05:34.88,Default,,0,0,0,,Inside
Dialogue: 0,0:05:35.51,0:05:41.73,Default,,0,0,0,,Maybe just one more try
Dialogue: 0,0:00:00.00,0:00:05.00,Default,,0,0,0,,


What's wrong?


Thanks.

jairovital
2nd August 2024, 20:35
I have too many files, grab from Youtube, that overlap end and start times between sequential subtitles.

"Tool/Adjust durations" solves all the errors, separating conflicted times.
But how to apply it to hundred of files at once?

Is there a command line for SE?
What parameters/commands/options for such solution?

Nikse555
4th August 2024, 00:01
You can use "Adjust durations" on many files via the UI in "Tools" - "Batch convert" :)

jairovital
4th August 2024, 00:04
Interesting what your Python scrip purposes to do.
I'd like to use it.

But I'm receiving this error:

...

What's wrong?


Thanks.


I'll answer my own question:

The file I used as a test is missing string:

; advanced sub station alpha


Now, it works fine.

Thanks.

GCRaistlin
4th August 2024, 00:08
Nikse555
Is there any chance that https://github.com/SubtitleEdit/subtitleedit/issues/7983 will be fixed? You marked it as completed but the issue is still present in 4.0.7.

jairovital
4th August 2024, 00:09
You can use "Adjust durations" on many files via the UI in "Tools" - "Batch convert" :)

Oh, my!...
I didn't see that!

Wonderful!
Solve all the times issues!

Many thanks!
:) :) :)

oniiz86
5th August 2024, 10:03
@Nikse555 Is there any chance you could remove the Subtitle Edit version number from the thread title as it's always several versions behind & no longer reflects the current release version, it be greatly appreciated :)

oniiz86
6th August 2024, 17:45
@Nikse555 Thanks but oddly only your first post was altered, the thread title remains unchanged & still reflects version 4.0.4, perhaps a moderator can only change this now?
https://i.imgur.com/lhBEf9X.png

markfilipak
8th August 2024, 04:34
Hi All,

I'm happy with SE except for one thing, and it's probably my fault.

When I click the 'Start time' or 'Duration' up/down arrows, the start time or duration increment/decrement by 100 ms. I'd prefer it increment/decrement by one frame. I have the video loaded in 'Beautify time codes' and 448291 time codes loaded -- the video is over 5 hours long. The video is 24/1.001 FPS, which is also set.

Is there a way to get SE to use the time codes instead of 100 ms? I have searched everywhere for it.

Thanks!--Mark.

arslan
16th August 2024, 07:37
Hi Nikse and all forum members,

I would have a suggestion that I believe might improve the functionality of line breaking in the Text box. Here is what I mean:

If I have this in the Text box:

WORDspaceWORDspaceWORDspaceWORDspaceWORD
WORD

and I want to have only 2 words in line 1 and 4 words in line 2, when I hit the Enter right after the second word I get this in the text box:

WORDspaceWORD
spaceWORDspaceWORDspaceWORD
WORD

So there's a space at the beginning of line 2 now, and what used to be line 2 is now line 3 (even though in the Settings I have set a maximum of 2 lines).

Would it be possible to program the Text box to automatically do this:

WORDspaceWORD
WORDspaceWORDspaceWORDspaceWORD

that is, to erase the space at the beginning of line 2 automatically and to keep only 2 lines? That would save a bit of manual line editing. :)

Thank you very much!

arslan

tebasuna51
30th August 2024, 11:13
@Nikse555 Thanks but oddly only your first post was altered, the thread title remains unchanged & still reflects version 4.0.4, perhaps a moderator can only change this now?
Done.

oniiz86
30th August 2024, 12:09
@tebasuna51 Thanks so very much for that, much obliged :thanks:

varekai
13th September 2024, 07:17
https://i.imgur.com/qwpFywI.png
Best regards,
varekai