Comments (5)
What if you put https://github.com/finnp/to-utf-8 inbetween the input the srt-to-vtt?
var utf8 = require('to-utf-8')
...
source.pipe(utf8).pipe(srtToVtt)
from srt-to-vtt.
sure, i can do that in my code, but if you want to use srt-to-vtt from CLI this should be done in srt-to-vtt.
But if the module do srt to vtt and srt COULD BE in non-UTF8 and VTT MUST BE in UTF8, IMHO this should be handled by srt-to-vtt.
I can always send PR and get accepted
from srt-to-vtt.
after some testing i found to-utf-8
doesn't recognize correct encoding because it uses default peek-stream
options to get the sample to do the detection. The input is an srt, so the first line is always 1
because its the caption number. So, i need to detect first the encoding from real subtitle text, then pass it to utf8(encoding) to do the conversion
from srt-to-vtt.
PR finnp/to-utf-8#2 for better encoding detection, if that patch is accepted encoding conversion should be easy as change
return pumpify(split(), parse)
to
return pumpify(utf8({newline:false}), split(), parse)
in
https://github.com/mafintosh/srt-to-vtt/blob/master/index.js#L27
from srt-to-vtt.
send a pr for that change once your pr lands in to-utf-8 :)
from srt-to-vtt.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srt-to-vtt.