Skip to content

[File format] Treat LRC as text, not as image #647

@HomerHaddock

Description

@HomerHaddock

Describe the file format
An LRC file is generally a list of lyric timings to be used alongside music (mpv and Tauon Music Box support these). It's pure text and can be opened with text editors without issue.

Example: (The One Who's Running the Show by Gooseworx & Glitch, sourced from LRCLIB using LRCGET)

[00:08.44] It's news to me that it's news to you
[00:14.64] To which degree who answers to who
[00:20.85] We could go on and on
[00:22.85] But in the end
[00:23.74] Who are we kidding?
[00:26.11] My divinity is past infinity
[00:28.77] Am I...
[00:30.16] Getting through?
[00:33.09] Seems our regime has plummeted south
[00:38.44] Don't need to scream
[00:40.18] If you ain't got a mouth
[00:43.79] Why bite the hand that feeds
[00:45.66] When it's the only hand you're getting
[00:48.86] It's time to see that this great marquee
[00:50.97] Is the only place you're ever gonna be
[00:53.85] So strap on in and take it on the chin
[00:56.32] And don't forget
[00:57.52] Who's running the show
[01:04.36] Now look at this!
[01:06.63] Absolute bliss!
[01:09.59] Oh, what a shock!
[01:12.16] Watch where you walk!
[01:15.40] I'm the host, I run the place
[01:18.21] Caine, that is my name
[01:20.86] Not enthused?
[01:21.80] Just feeling used?
[01:23.30] Oh, what a goddamn shame!
[01:27.09] Congratulations, all of my friends
[01:33.57] Public relations are getting a cleanse
[01:39.96] Put on your Sunday best
[01:42.22] Because I'm nowhere close to quitting
[01:45.88] So play the games, and just ignore the pains
[01:48.44] Cause all that remains, is how you prime your brains
[01:51.97] You whine to me, but you're too blind to see
[01:54.54] That I'm the one
[01:55.85] Who's running the show
[02:08.34] Yeah!

Note: Metadata could be added in [] but it's almost never seen.

Problem I found

It seems odd that converting LRC to txt starts with the path of LRC → webp → txt instead of LRC → txt.

Describe the expected behavior
There are two (2) ways I think would work.

  1. Just return the input text, the file is only text.
  2. Remove all timings/metadata and return a transcript-like file.

Provide reference implementations
A project that reads LRC contents is available under the MIT License and uses JS and TS for the code.
Here is a link.

PLEASE NOTE: Simply listing a file format with no further justification beyond "I want this" will likely get your issue closed. There are a lot of file formats out there, and it can take hours to add support for just one. Just naming them isn't productive, so please try to be forthcoming with resources of your own.

Do you plan on implementing this yourself?
No, I don't have much experience in TS. I could if I quickly learnt it but it would cost quality and performance.

Additional context
A solution like this could be used for SubRip (.srt) files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    format requestRequesting support for a file format

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions