Minor changes
This commit is contained in:
parent
9583f70c7c
commit
63dd7b3bc7
3 changed files with 15 additions and 13 deletions
14
index.js
14
index.js
|
@ -28,9 +28,10 @@ app.use(bodyParser.urlencoded({ extended: false }))
|
|||
|
||||
app.get("/download", async (req, res) => {
|
||||
const url = req.query.url
|
||||
const format = req.query.format
|
||||
const quality = req.query.quality
|
||||
const defin = req.query.definition
|
||||
const format = req.query.format || 'mp4'
|
||||
const quality = req.query.quality || 'highest'
|
||||
const defin = req.query.definition || 'hd'
|
||||
const preset = 'medium'
|
||||
|
||||
res.setHeader("X-Accel-Buffering", "no")
|
||||
|
||||
|
@ -54,7 +55,6 @@ app.get("/download", async (req, res) => {
|
|||
}
|
||||
|
||||
if ("mp3 ogg wav".includes(format)) {
|
||||
console.log('audio')
|
||||
var audio = ytdl(url, { filter: 'audioonly', quality: quality })
|
||||
|
||||
const ffmpegProcess = cp.spawn(ffmpeg, [
|
||||
|
@ -62,7 +62,7 @@ app.get("/download", async (req, res) => {
|
|||
'-c:v', 'copy',
|
||||
'-c:a', 'libmp3lame',
|
||||
'-crf','27',
|
||||
'-preset','veryfast',
|
||||
'-preset',preset,
|
||||
'-movflags','frag_keyframe+empty_moov',
|
||||
'-f', format,
|
||||
'-loglevel','error',
|
||||
|
@ -91,7 +91,7 @@ app.get("/download", async (req, res) => {
|
|||
'-c:v', 'copy',
|
||||
'-c:a', 'libmp3lame',
|
||||
'-crf','27',
|
||||
'-preset','veryfast',
|
||||
'-preset',preset,
|
||||
'-movflags','frag_keyframe+empty_moov',
|
||||
'-f', format,
|
||||
'-loglevel','error',
|
||||
|
@ -116,7 +116,7 @@ app.get("/download", async (req, res) => {
|
|||
'-c:v', 'copy',
|
||||
'-c:a', 'libmp3lame',
|
||||
'-crf','27',
|
||||
'-preset','veryfast',
|
||||
'-preset',preset,
|
||||
'-movflags','frag_keyframe+empty_moov',
|
||||
'-f', format,
|
||||
'-loglevel','error',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "univerter",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0",
|
||||
"description": "A web youtube converter for converting videos to mp4, mp3, and other supported formats",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Univerter <p>v3.1</p>
|
||||
<h1>Univerter <p>v3.1.1</p>
|
||||
<p style="color: lightgray">And still javascript free...</p>
|
||||
<hr>
|
||||
</h1>
|
||||
|
@ -31,9 +31,10 @@
|
|||
</select>
|
||||
|
||||
<select required id="definition" name="definition">
|
||||
<option value="sd">SD (Standard Definition)</option>
|
||||
<option value="hd">HD (High Definition)</option>
|
||||
<option value="sd">SD (Standard Definition)</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="setting">
|
||||
|
@ -46,14 +47,15 @@
|
|||
<option value="avi">.avi</option>
|
||||
<option value="mov">.mov</option>
|
||||
<option disabled>Audio Formats</option>
|
||||
<option value="mp3">.mp3</option>
|
||||
<option value="mp3" selected>.mp3</option>
|
||||
</select>
|
||||
</div>
|
||||
<input type="submit">
|
||||
</form>
|
||||
<br>
|
||||
<p>The SD option only supports 720p and below, HD supports all qualities. HD is experimental, so please report
|
||||
issues :D</p>
|
||||
<p>Notes: </p>
|
||||
<p>SD is 720p max, HD supports all qualities (even 4k!)</p>
|
||||
<hr>
|
||||
<p><a href="https://ko-fi.com/bingus_violet">Please consider donating</a> or host the website yourself! Anything
|
||||
helps! (Check <a href="https://codeberg.org/Bingus_Violet/Univerter">Codeberg</a> for more info)</p>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue