Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRC Lyrics ms (.lrc) rounding issue, discarded empty lines and improper use of the ti: tag #9048

Open
AverageHoarder opened this issue Dec 1, 2024 · 4 comments

Comments

@AverageHoarder
Copy link

Opening this .lrc file in SubtitleEdit and saving it with LRC Lyrics ms (.lrc) as the format without performing any change

[00:00.00]We aim for the air, one wing
[00:08.56]Then the other gets us there
[00:15.71]Above the dirt, until we one day, unfazed
[00:30.01]We become the earth
[00:39.57]
[00:39.57]Become the earth
[00:47.82]Become the earth
[00:58.00]
[00:58.00]Belonging in the longing
[01:05.83]Could last as long
[01:13.25]As love is
[01:17.56]Longer than measurement
[01:26.72]Until we all become the earth
[01:38.60]
[01:38.60]Become the earth
[01:46.68]Become the earth
[01:54.75]Become the earth
[02:03.80]
...

yields these rounded timestamps:

[ti:08 Become The Earth ms]
[re: Subtitle Edit]
[ve: 4.0.8.0]
[00:00.000]We aim for the air, one wing
[00:08.000]
[00:09.000]Then the other gets us there
[00:16.000]Above the dirt, until we one day, unfazed
[00:23.710]
[00:30.010]We become the earth
[00:38.010]
[00:40.000]Become the earth
[00:47.570]
[00:48.000]Become the earth
[00:55.820]
[00:58.000]Belonging in the longing
[01:06.000]Could last as long
[01:14.000]As love is
[01:18.000]Longer than measurement
[01:25.560]
[01:27.000]Until we all become the earth
[01:34.720]
[01:39.000]Become the earth
[01:47.000]Become the earth
[01:55.000]Become the earth
[02:02.750]
...

SubtitleEdit seems to also assume the max line duration to be 8s, (which for this song for example is too short). This cuts lines short and inserts empty lines within the lyrics.

Saving the initial file (without changing anything) as LRC Lyrics, no end time (.lrc) on the other hand simply removes all empty lines:

[ti:08 Become The Earth02 no end]
[re: Subtitle Edit - LRC No End Time]
[ve: 4.0.8.0]
[00:00.00]We aim for the air, one wing
[00:08.56]Then the other gets us there
[00:15.71]Above the dirt, until we one day, unfazed
[00:30.01]We become the earth
[00:39.57]Become the earth
[00:47.82]Become the earth
[00:58.00]Belonging in the longing
[01:05.83]Could last as long
[01:13.25]As love is
[01:17.56]Longer than measurement
[01:26.72]Until we all become the earth
[01:38.60]Become the earth
[01:46.68]Become the earth
[01:54.75]Become the earth
...

One might argue that the empty line timestamps in the initial file are invalid (2 lines start with the same timestamp), but they're from Deezer and fairly common. However SubtitleEdit also ignores valid empty lines like this one from another song that contains a passage without singing:

[00:55.80](The emptiness machine)
[00:58.20]
[01:08.01]Going around like a revolver

At least the second case should retain the empty lines.

On another note:
According to the wikipedia page, ti is supposed to contain the song title, not the filename without extension, so setting it to this automatically is problematic as well.

After fixing the timings in SubtitleEdit, adding back the passages without singing and saving the result as LRC Lyrics, no end time (.lrc), it correctly saves these empty lines. But when reopening the file, they are gone again.

[ti: 08 Become The Earth]
[re: Subtitle Edit - LRC No End Time]
[ve: 4.0.8.0]
[00:00.03]We aim for the air, one wing
[00:08.67]Then the other gets us there
[00:15.90]Above the dirt, until we one day, unfazed
[00:30.08]We become the earth
[00:34.42]
[00:40.08]Become the earth
[00:48.06]Become the earth
[00:53.04]
[00:58.14]Belonging in the longing
[01:05.93]Could last as long
[01:13.51]As love is
[01:17.81]Longer than measurement
[01:26.88]Until we all become the earth
[01:34.26]
[01:38.72]Become the earth
[01:46.86]Become the earth
[01:54.84]Become the earth
[01:58.55]
...

Ideally I'd like SubtitleEdit to open the .lrc files while retaining (valid) empty lines and save the result after syncing without end timestamps but with ms precision (and without setting the filename as ti).

niksedk added a commit that referenced this issue Dec 1, 2024
@niksedk
Copy link
Member

niksedk commented Dec 1, 2024

I've tried to fix the timestamps in the LRC milliseconds format here: https://github.com/SubtitleEdit/subtitleedit/releases/download/4.0.8/SubtitleEditBeta.zip

In Options - Settings, you can set the max duration to something higher, to avoid cutting lines at 8 seconds:
image

@AverageHoarder
Copy link
Author

AverageHoarder commented Dec 1, 2024

The rounding error seems to be gone, but it seems to have broken the automatic setting of end times a bit. Opening this lrc file

[ti: Become The Earth]
[re: Subtitle Edit - LRC No End Time]
[ve: 4.0.8.0]
[00:00.03]We aim for the air, one wing
[00:08.67]Then the other gets us there
[00:15.90]Above the dirt, until we one day, unfazed
[00:30.08]We become the earth
[00:34.42]
[00:40.08]Become the earth
[00:48.06]Become the earth
[00:53.04]
[00:58.14]Belonging in the longing
[01:05.93]Could last as long
[01:13.51]As love is
[01:17.81]Longer than measurement
[01:26.88]Until we all become the earth
[01:34.26]
[01:38.72]Become the earth
[01:46.86]Become the earth
[01:54.84]Become the earth
[01:58.55]

and then saving it as LRC Lyrics ms (.lrc) introduces empty lines when there's a duration above 8s, but does not set the end time 8s after the first timestamp (instead after 1933ms for the second timestamp):

[ti: Become The Earth]
[re: Subtitle Edit]
[ve: 4.0.8.238]
[00:00.030]We aim for the air, one wing
[00:01.963]
[00:08.670]Then the other gets us there
[00:15.900]Above the dirt, until we one day, unfazed
[00:18.633]
[00:30.080]We become the earth
[00:31.680]
[00:40.080]Become the earth
[00:48.060]Become the earth
[00:49.420]
[00:58.140]Belonging in the longing
[01:05.930]Could last as long
[01:13.510]As love is
[01:17.810]Longer than measurement
[01:19.490]
[01:26.880]Until we all become the earth
[01:28.880]
[01:38.720]Become the earth
[01:40.080]
[01:46.860]Become the earth
[01:54.840]Become the earth
[01:56.200]

When changing the max duration to 30s in SubtitleEdit, these problems go away.

[ti: Become The Earth]
[re: Subtitle Edit]
[ve: 4.0.8.238]
[00:00.030]We aim for the air, one wing
[00:08.670]Then the other gets us there
[00:15.900]Above the dirt, until we one day, unfazed
[00:30.080]We become the earth
[00:40.080]Become the earth
[00:48.060]Become the earth
[00:58.140]Belonging in the longing
[01:05.930]Could last as long
[01:13.510]As love is
[01:17.810]Longer than measurement
[01:26.880]Until we all become the earth
[01:38.720]Become the earth
[01:46.860]Become the earth
[01:54.840]Become the earth

However all the empty lines are removed in this case. Even the valid ones at [00:34.42], [00:53.04], [01:34.26] and [01:58.55] from the original file.
Seeing as this is not selected, should these not be kept?
grafik

Also even setting the max duration to 30s is often not enough as there are songs with huge instrumental parts (sometimes 5+ minutes before the singing resumes). To really make it work for lrc files, I'd have to set a value so high that it renders it useless for normal subtitles.
A better way in my opinion would be a LRC lyrics, no end time ms format to avoid the duration problem entirely while keeping ms precision. That plus retaining empty lines when opening an lrc file would turn SubtitleEdit into a great tool to sync lyrics.

@niksedk
Copy link
Member

niksedk commented Dec 3, 2024

I could make a new format LRC lyrics ms, no end time - would that help?

@AverageHoarder
Copy link
Author

That should eliminate the Max. duration, milliseconds problem, so yes!
Any thoughts about keeping empty lines when opening an .lrc file?
I mean this:

[00:30.08]We become the earth
[00:34.42]
[00:40.08]Become the earth
[00:48.06]Become the earth
[00:53.04]
[00:58.14]Belonging in the longing

being turned into:
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants