Open jaruba opened 9 years ago
It turns ASS:
Dialogue: 0,1:48:28.18,1:48:29.66,Default,,0,0,0,,- C'est tellement politique...
into SRT:
285
1:48:28.18 --> 1:48:29.66
- C'est tellement politique...
Note that charsetDetect = require('jschardet');
You probably can better understand what it does by adding those at the end of the rl.on('line', function (line) {})
function:
console.log(line)
console.log(parsedLine)
You'll also find the entire code there: https://gist.github.com/vankasteelj/39723be4a99fc2d151b1
It is crappy and needs serious rewrite, but I scavenged that from popcorntime and found it useful, although I have nor the time nor the will to rewrite it or deeply analyze it.
Thanks. Somebody should merge all of these into a library. Though I also don't have the time for that now...
wcjs-player
is it possible to pass subtitles pass vlc,the method used vlc resolution subtitles. like
var player=[{ url:"file:///D:/1.mp4", vlcArgs:":sub-file=D:/2.ass" }]
Play local video, there is a subtitle with the same name as the video and subtitle files and video files in the same directory, vlc can automatically load ass file
Saw this in the readme:
In actuality,
wcjs-player
supports.srt
,.sub
and.vtt
I was going to add
.ass
,.ssa
and.txt
support based on @vankasteelj 's code but never got to it.The code itself converts the 3 types mentioned above to
.srt
, ideally this should be changed to just parse the subs. Hope it helps.