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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
"use client";
import React from "react";
import styled, { createGlobalStyle } from "styled-components";
const GlobalStyle = createGlobalStyle`
body {
font-family: 'Roboto', sans-serif;
}
`;
const Container = styled.div`
display: flex;
flex-direction: column;
align-items: left;
padding: 20px;
background-color: #f9f9f9;
color: #333;
`;
const Title = styled.h1`
font-size: 2.5em;
margin-bottom: 0.5em;
font-weight: 700;
`;
const Subtitle = styled.h2`
font-size: 1.5em;
margin-bottom: 1em;
font-weight: 600;
`;
const Paragraph = styled.p`
font-size: 1.2em;
line-height: 1.6;
margin-bottom: 2em;
text-align: left;
font-weight: 450;
`;
const Preformatted = styled.pre`
font-size: 1em;
background-color: #eaeaea;
padding: 10px;
border-radius: 5px;
white-space: pre-wrap;
word-wrap: break-word;
`;
const BackLink = styled.a`
font-size: 1em;
color: #007bff;
text-decoration: none;
&:hover {
text-decoration: underline;
}
`;
const Video = styled.video`
width: 100%;
max-width: 600px;
margin: 20px 0;
border-radius: 10px;
`;
const lyrics = `[ti:CRUSH]
[al:CRUSH]
[ar:IVE]
[length: 03:29.49]
[00:00.11] La, la, la-la-la-la
[00:07.83] 瞳の奥 重なる eyes
[00:11.88] 今宵 二人を照らす moon
[00:16.06] Nine to five dreaming, これじゃまるで恋ね
[00:20.12] But the odds were high, 夢見たい気分?
[00:25.23] 待ってるだけじゃ何も始まんない`;
const AboutPage: React.FC = () => {
return (
<div>
<GlobalStyle />
<Container>
<Title>About</Title>
<Subtitle>What is this player?</Subtitle>
<Paragraph>
This player is capable of simultaneously playing back a
lyric file (LRC), a main video/audio file, a SRV3 YouTube
Timed Text, and a backing audio file.
<br />
The idea is that this helps with not only karaoke but also
checking how well a LRC or SRV3 file syncs with the main
video/audio.
</Paragraph>
<Subtitle>How to use this player?</Subtitle>
<Paragraph>
You'll need to prepare a few files for the media you
want to play back first.
<br />
Theoretically you can mix/match any of the files below since
the main video/audio is all that's mandatory for
playback.
<br />
In this guide I'll assume that you're after a
karaoke experience, and want the works.
<br />
<br />
To add any files to the player simply drag it onto the right
part of the player page.
<br />
EVERYTHING IS RAN LOCALLY, NO FILES ARE EVER UPLOADED TO ANY
SERVERS.
</Paragraph>
<Subtitle>1. Main video/audio file</Subtitle>
<Paragraph>
Note: I've renamed the second button seen in the demos
from Video to Media to avoid confusion since it can support
audio/video files
</Paragraph>
<Paragraph>
This is the file that you want to play back. It can be a
video or an audio file.
<br />
Supported formats: mp4, webm, ogg, mp3, wav, flac, and more.
<br />
If you choose to use an audio file here, the right part of
the player will not show a video preview.
<br /> <br />A good way would be to download some video from
YouTube. You may need to make adjustments to the offset
later depending on how well the LRC file syncs with the
video.
<br /> How you do that will be up to you, but I recommend
using <a href="https://github.com/yt-dlp/yt-dlp">
yt-dlp
</a>{" "}
to download the video.
</Paragraph>
<Subtitle>2. Lyric File (LRC)</Subtitle>
<Paragraph>
This is the file that contains the lyrics of the song you
want to sing.
<br />
An example LRC file is shown below...
</Paragraph>
<Preformatted
dangerouslySetInnerHTML={{
__html: lyrics.replace(/\n/g, "<br/>"),
}}
/>
<Paragraph>
The player will highlight the current line of the lyrics as
the main media progresses.
<br />
If you need a LRC file, a good way is to rip it from Spotify
using{" "}
<a href="https://github.com/akashrchandran/syrics">
Syrics
</a>
.
</Paragraph>
<br />
<br />
<Paragraph>
At this point you should already be able to play back the
main media and have the lyrics highlighted as the media
progresses.
<br />
Depending on how well the LRC file syncs with the main
media, you may need to adjust the main offset labelled as
"Offset (±ms)"
</Paragraph>
<Video controls>
<source
src="https://files.catbox.moe/mfaei6.mp4"
type="video/mp4"
/>
</Video>
<Subtitle>3. Instrumental/Vocals (Audio 2)</Subtitle>
<Paragraph>
If you only wanted one or the other, simply add that as the
main media then you're done
<br />
There are a ton of tools online to remove this but
you'll want to make sure you get the instrumental track
in an audio format (mp3, wav, etc.)
<br />
Then hover over the right side of the player, click the
"Audio #2" button, and find your instrumental
track.
<br />
<br />
(TIP!) I suggest going back and setting the main media in
step 1 (Media button) in the previous step to a vocal only
video/audio.
<br /> This will make it significantly easier to offset the
2 tracks. You can always mux a video file on top of that if
you want visuals too!
<br />
Ultimately it doesn't matter which "slot" the
instrumental or "vocals" go into, it's just
better to have them separated!
<br />
<br />
Now adjust the offset using the numerical inputs, the
"Sync" button will adjust Audio 2 relative to the
main media.
<br />I suggest positioning the playhead at 00:00 and then
adding the secondary audio; this will make adjustments much
easier.
<br />
<br />
Now you should be able to control the balance between both
of these files (which one is louder) by using the slider!
</Paragraph>
<Subtitle>4. YouTube Timed Text</Subtitle>
<Paragraph>
If the YouTube video you downloaded has subtitles (sometimes
they look really cool and fancy), you can download that
using yt-dlp for use in the player as well.
<br />
<br />
Unfortunately there is no way to adjust the offset for this,
it'll play according to the main media.
</Paragraph>
<Video controls>
<source src="https://files.catbox.moe/ir6bs3.mp4" />
</Video>
<BackLink href="/">Back to player</BackLink>
</Container>
</div>
);
};
export default AboutPage;
|