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 651958 - Merge and split lines
Merge and split lines
Status: RESOLVED FIXED
Product: gnome-subtitles
Classification: Other
Component: general
latest
Other Linux
: Normal enhancement
: ---
Assigned To: Maintainers of GNOME subtitles
Maintainers of GNOME subtitles
: 656168 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-06-06 00:51 UTC by Zsolt Kozak
Modified: 2011-08-12 11:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Zsolt Kozak 2011-06-06 00:51:45 UTC
Hi there,

I have the following requests.

I would like to combine/join 2 lines/subtitles. After combining them the result should start where the first subtitle starts and ends where the second subtitle ends.

Splitting should be working with the following way. When I would split one subtitle into 2 parts, the beginning of the first one should start where the original one started, ends at the middle minus 0.05 sec; the second part should end where the original ended and starts at the middle of the subtitle plus 0.05 sec. So there should be 0.1 sec (or it could be configurable) between the two new subtitles.

Shortcuts also needed. ;) Subtitle Editor has these features. ;)

I would like to donate $100 for this feature request implemented.

PS: There is a similar bug #463796 but it's about joining subtitle FILES not subtitles themselves.
Comment 1 Pedro Castro 2011-06-06 23:44:33 UTC
Hi Zsolt,

I see Subtitle Editor actually supports joining more than 2 lines, although it seems a bit odd as the typical maximum number of lines for a subtitle is 2.
It does make sense to have this "gap" configurable in the preferences.

Now for the tough part, which shortcuts are we going to use? ;-)
Comment 2 Zsolt Kozak 2011-06-07 00:15:41 UTC
(In reply to comment #1)
> Hi Zsolt,
> 
> I see Subtitle Editor actually supports joining more than 2 lines, although it
> seems a bit odd as the typical maximum number of lines for a subtitle is 2.
> It does make sense to have this "gap" configurable in the preferences.

Yeah, it does make sense. You're right. 
But sometimes it's not a problem to join 3 short lines, because you can edit them and make 2 long lines.

 
> Now for the tough part, which shortcuts are we going to use? ;-)

LOL! :)
What about Ctrl+Shift+C for combine and Ctrl+Short+S for split? They haven't reserved yet. :)
Comment 3 Pedro Castro 2011-06-11 18:55:19 UTC
Hi there Zsolt,

I've just pushed a version to the development trunk that allows to test subtitle splitting. Some remarks:
- The time between subtitles (or TBS :) isn't settable yet in gconf.
- If the duration of the subtitle to be split is less than TBS, no TBS will be set. The end time of the first half after splitting will be equal to the start time of the second half.
- If the duration is negative, no splitting will be done.
- Should the text be split in half (in terms of whole lines), or should the text be the same in both subtitles for the user to change after splitting? I recognize the first makes more sense at first, but it might be worse to the user if splitting lines that way doesn't give a good result most times.

Merge is on the way and should be ready by tomorrow.
Comment 4 Zsolt Kozak 2011-06-11 20:24:19 UTC
Hi Pedro,

Splitting seems to be working, I'vbe just pulled the new code, compiled it and tested it. ;)

"Should the text be split in half (in terms of whole lines), or should the
text be the same in both subtitles for the user to change after splitting? I
recognize the first makes more sense at first, but it might be worse to the
user if splitting lines that way doesn't give a good result most times."

Maybe it should be configurable. :))) But your second case is okay for me as a default behaviour. ;) 

Thanks for the new feature. ;) I'm waiting for the merging. :)
Comment 5 Pedro Castro 2011-06-12 22:54:53 UTC
Zsolt, I've just pushed the remaining changes for your testing pleasure. :-)

As you may have noticed, splitting works with multiple subtitles selected, where GS will split each one in 2. Merging basically merges the range of subtitles selected, so using it with subtitles 3,4,5 selected is the same as with subtitles 3 and 5 selected (that is, it doesn't merge only 3 and 5, but everything in between too: 4).

The time between subtitles is settable in gconf-editor (default 100ms), not in the Preferences dialog yet. I'll have to reorganize the dialog for it to hold the new options.

Last but not least, these operations also seek the video afterwards to the first changed subtitle, if that's set in the user preferences (similar behavior to the quick shifting feature). Tell me what you think.
Comment 6 Zsolt Kozak 2011-06-13 10:35:31 UTC
Hi Pedro,

I've just checked the new feature and it's okay. :) Thanks for the implementation. :) I'm going to pay the donation in a few minutes. :)))
Comment 7 Pedro Castro 2011-08-12 11:32:05 UTC
*** Bug 656168 has been marked as a duplicate of this bug. ***