Compare commits
No commits in common. "main" and "1.8.7" have entirely different histories.
9 changed files with 278 additions and 299 deletions
|
@ -1,28 +0,0 @@
|
||||||
name: Upload release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
npm install --platform=win32 &&
|
|
||||||
apt-get update &&
|
|
||||||
apt-get install -y zip
|
|
||||||
|
|
||||||
- name: Build the app
|
|
||||||
run: npm run make -- --platform=win32
|
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
uses: akkuman/gitea-release-action@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.TOKEN }}
|
|
||||||
files: out/make/zip/win32/x64/dsr-win32-x64-${{ github.ref_name }}.zip
|
|
||||||
draft: true
|
|
36
README.md
36
README.md
|
@ -1,10 +1,10 @@
|
||||||
# Discord Video Sharing [![status-badge](https://git.mylloon.fr/Anri/dsr/badges/workflows/release.yml/badge.svg)](https://git.mylloon.fr/Anri/dsr/actions?workflow=release.yml)
|
# Discord Video Sharing
|
||||||
|
|
||||||
Tool for sharing video to Discord.
|
Tool for sharing video to Discord.
|
||||||
|
|
||||||
> This tool was primarily made for video captured by NVidia Shadowplay.
|
> This tool was primarily made for video captured by NVidia Shadowplay.
|
||||||
|
|
||||||
## Download/Install/Update
|
## Download/Install
|
||||||
|
|
||||||
2 choices :
|
2 choices :
|
||||||
|
|
||||||
|
@ -15,36 +15,22 @@ Tool for sharing video to Discord.
|
||||||
irm https://git.mylloon.fr/Anri/dsr/raw/branch/main/install.ps1 | iex
|
irm https://git.mylloon.fr/Anri/dsr/raw/branch/main/install.ps1 | iex
|
||||||
```
|
```
|
||||||
|
|
||||||
## Available flags
|
> - If you have Discord Nitro: add `/nitro` flag when running DSR.
|
||||||
|
> - If you have an NVidia GPU with NVenc: add `/nvenc` flag when running DSR.
|
||||||
You can add thoses flags in the `Target` field of your Windows shortcut.
|
|
||||||
|
|
||||||
| | |
|
|
||||||
| ------------- | ----------------------------------------------------- |
|
|
||||||
| `/nitro` | Increase the file limit to 500Mo |
|
|
||||||
| `/nitrobasic` | Increase the file limit to 50Mo |
|
|
||||||
| | |
|
|
||||||
| `/nvenc_h264` | Enable NVenc with H.264 encoder (NVidia GPU required) |
|
|
||||||
| `/nvenc_h265` | Enable NVenc with H.265 encoder (NVidia GPU required) |
|
|
||||||
| `/h265` | Enable the H.265 CPU encoder (slow compression) |
|
|
||||||
|
|
||||||
> NVenc support is experimental, but faster than CPU counterparts.
|
|
||||||
|
|
||||||
## More info
|
## More info
|
||||||
|
|
||||||
- [x] KISS interface
|
- [x] KISS interface
|
||||||
- [x] Support drag&drop into the icon
|
- [x] Support drag&drop into the icon
|
||||||
- [x] Keep the video under discord limitation
|
- [x] Keep the video under 25mb (discord limitation)
|
||||||
- [x] Defaults to H.264 CPU encoder
|
|
||||||
- [x] If already under the limit, the file won't be compressed
|
|
||||||
- [x] NVenc support
|
- [x] NVenc support
|
||||||
- [x] Nitro suppport
|
- [x] If already under the limit, the file won't be compressed
|
||||||
- [x] Merge 2 audio files into one track when recorded with system audio and microphone
|
- [x] Nitro suppport via `/nitro` flag
|
||||||
split up, while keeping the original ones (with conveniant metadata)
|
- [x] Merge audio files into one track when recorded with system audio and microphone
|
||||||
- [x] Works also with file with only one or more than 2 audio track, by doing
|
split up, while keeping the original ones (with conveninant metadata)
|
||||||
nothing
|
- [x] Works also with file with only one audio track
|
||||||
- [x] Support multiples files at once
|
- [x] Support multiples files at once
|
||||||
- [x] Always optimize for video streaming
|
- [x] Optimize for video streaming
|
||||||
|
|
||||||
## Package the app for Windows
|
## Package the app for Windows
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,6 @@ $archive = "$env:TEMP\dsr.zip"
|
||||||
Invoke-WebRequest -Uri $link -OutFile $archive
|
Invoke-WebRequest -Uri $link -OutFile $archive
|
||||||
Remove-Item "$path" -Recurse -ErrorAction SilentlyContinue
|
Remove-Item "$path" -Recurse -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
# Close running DSR
|
|
||||||
Stop-Process -Name "DSR" -Force -ErrorAction SilentlyContinue
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
Expand-Archive -Path $archive -DestinationPath "$path" -Force
|
Expand-Archive -Path $archive -DestinationPath "$path" -Force
|
||||||
Move-Item -Path "$path\dsr-win32-x64\*" -Destination "$path" -Force
|
Move-Item -Path "$path\dsr-win32-x64\*" -Destination "$path" -Force
|
||||||
|
|
292
package-lock.json
generated
292
package-lock.json
generated
|
@ -1,23 +1,24 @@
|
||||||
{
|
{
|
||||||
"name": "dsr",
|
"name": "dsr",
|
||||||
"version": "1.11.0",
|
"version": "1.8.7",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "dsr",
|
"name": "dsr",
|
||||||
"version": "1.11.0",
|
"version": "1.8.7",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron-forge/maker-zip": "^7.4",
|
"@electron-forge/maker-zip": "^7.4",
|
||||||
"ffmpeg-static": "^5.2",
|
"ffmpeg-static": "^5.2",
|
||||||
"ffprobe-static": "^3.1",
|
"ffprobe-static": "^3.1",
|
||||||
"typescript": "^5.6"
|
"terminate": "^2.6",
|
||||||
|
"typescript": "^5.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron-forge/cli": "^7.4",
|
"@electron-forge/cli": "^7.4",
|
||||||
"@types/ffprobe-static": "^2.0",
|
"@types/ffprobe-static": "^2.0",
|
||||||
"electron": "^32.1"
|
"electron": "^30.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@derhuerst/http-basic": {
|
"node_modules/@derhuerst/http-basic": {
|
||||||
|
@ -311,12 +312,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/asar": {
|
"node_modules/@electron/asar": {
|
||||||
"version": "3.2.13",
|
"version": "3.2.10",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.13.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.10.tgz",
|
||||||
"integrity": "sha512-pY5z2qQSwbFzJsBdgfJIzXf5ElHTVMutC2dxh0FD60njknMu3n1NnTABOcQwbb5/v5soqE79m9UjaJryBf3epg==",
|
"integrity": "sha512-mvBSwIBUeiRscrCeJE1LwctAriBj65eUDm0Pc11iE5gRwzkmsdbS7FnZ1XUWjpSeQWL1L5g12Fc/SchPM9DUOw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/glob": "^7.1.0",
|
|
||||||
"commander": "^5.0.0",
|
"commander": "^5.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"minimatch": "^3.0.4"
|
"minimatch": "^3.0.4"
|
||||||
|
@ -338,9 +338,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/get": {
|
"node_modules/@electron/get": {
|
||||||
"version": "3.1.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/get/-/get-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/get/-/get-3.0.0.tgz",
|
||||||
"integrity": "sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ==",
|
"integrity": "sha512-hLv4BYFiyrNRI+U0Mm2X7RxCCdJLkDUn8GCEp9QJzbLpZRko+UaLlCjOMkj6TEtirNLPyBA7y1SeGfnpOB21aQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
|
@ -400,9 +400,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/notarize": {
|
"node_modules/@electron/notarize": {
|
||||||
"version": "2.5.0",
|
"version": "2.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.3.2.tgz",
|
||||||
"integrity": "sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==",
|
"integrity": "sha512-zfayxCe19euNwRycCty1C7lF7snk9YwfRpB5M8GLr1a4ICH63znxaPNAubrMvj0yDvVozqfgsdYpXVUnpWBDpg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
|
@ -429,9 +429,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/osx-sign": {
|
"node_modules/@electron/osx-sign": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.3.0.tgz",
|
||||||
"integrity": "sha512-BAfviURMHpmb1Yb50YbCxnOY0wfwaLXH5KJ4+80zS0gUkzDX3ec23naTlEqKsN+PwYn+a1cCzM7BJ4Wcd3sGzw==",
|
"integrity": "sha512-TEXhxlYSDRr9JWK5nWdOv5MtuUdaZ412uxIIEQ0hLt80o0HYWtQJBlW5QmrQDMtebzATaOjKG9UfCzLyA90zWQ==",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"compare-version": "^0.1.2",
|
"compare-version": "^0.1.2",
|
||||||
|
@ -450,12 +450,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/packager": {
|
"node_modules/@electron/packager": {
|
||||||
"version": "18.3.5",
|
"version": "18.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/packager/-/packager-18.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/packager/-/packager-18.3.2.tgz",
|
||||||
"integrity": "sha512-ClgTxXTt3MesWAcjIxIkgxELjTcllw1FRoVsihP7uT48kpDMqI71p4XvnMWbq8PvU57TcrKICAaLkxRhbc+/wQ==",
|
"integrity": "sha512-orjylavppgIh24qkNpWm2B/LQUpCS/YLOoKoU+eMK/hJgIhShLDsusPIQzgUGVwNCichu8/zPAGfdQZXHG0gtw==",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron/asar": "^3.2.13",
|
"@electron/asar": "^3.2.1",
|
||||||
"@electron/get": "^3.0.0",
|
"@electron/get": "^3.0.0",
|
||||||
"@electron/notarize": "^2.1.0",
|
"@electron/notarize": "^2.1.0",
|
||||||
"@electron/osx-sign": "^1.0.5",
|
"@electron/osx-sign": "^1.0.5",
|
||||||
|
@ -569,9 +569,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/universal/node_modules/minimatch": {
|
"node_modules/@electron/universal/node_modules/minimatch": {
|
||||||
"version": "9.0.5",
|
"version": "9.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||||
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
|
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": "^2.0.1"
|
"brace-expansion": "^2.0.1"
|
||||||
|
@ -584,9 +584,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@electron/windows-sign": {
|
"node_modules/@electron/windows-sign": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/windows-sign/-/windows-sign-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/windows-sign/-/windows-sign-1.1.2.tgz",
|
||||||
"integrity": "sha512-OqVSdAe+/88fIjvTDWiy+5Ho1nXsiBhE5RTsIQ6M/zcxcDAEP2TlQCkOyusItnmzXRN+XTFaK9gKhiZ6KGyXQw==",
|
"integrity": "sha512-eXEiZjDtxW3QORCWfRUarANPRTlH9B6At4jqBZJ0NzokSGutXQUVLPA6WmGpIhDW6w2yCMdHW1EJd1HrXtU5sg==",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cross-dirname": "^0.1.0",
|
"cross-dirname": "^0.1.0",
|
||||||
|
@ -761,16 +761,6 @@
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/glob": {
|
|
||||||
"version": "7.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
|
|
||||||
"integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/minimatch": "*",
|
|
||||||
"@types/node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/http-cache-semantics": {
|
"node_modules/@types/http-cache-semantics": {
|
||||||
"version": "4.0.4",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
|
||||||
|
@ -786,19 +776,13 @@
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/minimatch": {
|
|
||||||
"version": "5.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
|
|
||||||
"integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "22.5.5",
|
"version": "20.12.12",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz",
|
||||||
"integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==",
|
"integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~6.19.2"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/responselike": {
|
"node_modules/@types/responselike": {
|
||||||
|
@ -888,9 +872,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ansi-regex": {
|
"node_modules/ansi-regex": {
|
||||||
"version": "6.1.0",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
|
||||||
"integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
|
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
|
@ -924,7 +908,6 @@
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz",
|
||||||
"integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==",
|
"integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==",
|
||||||
"deprecated": "This package is no longer supported.",
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"delegates": "^1.0.0",
|
"delegates": "^1.0.0",
|
||||||
|
@ -1106,7 +1089,6 @@
|
||||||
"version": "8.1.0",
|
"version": "8.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
|
||||||
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
|
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
|
||||||
"deprecated": "Glob versions prior to v9 are no longer supported",
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs.realpath": "^1.0.0",
|
"fs.realpath": "^1.0.0",
|
||||||
|
@ -1193,9 +1175,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chrome-trace-event": {
|
"node_modules/chrome-trace-event": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
|
||||||
"integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==",
|
"integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0"
|
"node": ">=6.0"
|
||||||
|
@ -1478,12 +1460,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/debug": {
|
"node_modules/debug": {
|
||||||
"version": "4.3.7",
|
"version": "4.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||||
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ms": "^2.1.3"
|
"ms": "2.1.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0"
|
"node": ">=6.0"
|
||||||
|
@ -1610,6 +1592,12 @@
|
||||||
"p-limit": "^3.1.0 "
|
"p-limit": "^3.1.0 "
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/duplexer": {
|
||||||
|
"version": "0.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
|
||||||
|
"integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/eastasianwidth": {
|
"node_modules/eastasianwidth": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
||||||
|
@ -1617,9 +1605,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/electron": {
|
"node_modules/electron": {
|
||||||
"version": "32.1.0",
|
"version": "30.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/electron/-/electron-32.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/electron/-/electron-30.0.6.tgz",
|
||||||
"integrity": "sha512-4etE3K6vPUkHihf7nvawngbB5+jLuUJgZh31f9ki1Gfveo0qwNDkLv/doabw+4zFFWKUXI+uFUpyOpL5+RwS+Q==",
|
"integrity": "sha512-PkhEPFdpYcTzjAO3gMHZ+map7g2+xCrMDedo/L1i0ir2BRXvAB93IkTJX497U6Srb/09r2cFt+k20VPNVCdw3Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -1657,16 +1645,6 @@
|
||||||
"global-agent": "^3.0.0"
|
"global-agent": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron/node_modules/@types/node": {
|
|
||||||
"version": "20.16.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz",
|
|
||||||
"integrity": "sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"undici-types": "~6.19.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/electron/node_modules/fs-extra": {
|
"node_modules/electron/node_modules/fs-extra": {
|
||||||
"version": "8.1.0",
|
"version": "8.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
||||||
|
@ -1792,9 +1770,9 @@
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"node_modules/escalade": {
|
"node_modules/escalade": {
|
||||||
"version": "3.2.0",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
|
||||||
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
|
"integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
|
@ -1813,6 +1791,21 @@
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/event-stream": {
|
||||||
|
"version": "3.3.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
|
||||||
|
"integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"duplexer": "~0.1.1",
|
||||||
|
"from": "~0",
|
||||||
|
"map-stream": "~0.1.0",
|
||||||
|
"pause-stream": "0.0.11",
|
||||||
|
"split": "0.3",
|
||||||
|
"stream-combiner": "~0.0.4",
|
||||||
|
"through": "~2.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eventemitter3": {
|
"node_modules/eventemitter3": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
|
||||||
|
@ -2090,6 +2083,12 @@
|
||||||
"node": ">= 12"
|
"node": ">= 12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/from": {
|
||||||
|
"version": "0.1.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
|
||||||
|
"integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/fs-extra": {
|
"node_modules/fs-extra": {
|
||||||
"version": "10.1.0",
|
"version": "10.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
||||||
|
@ -2149,7 +2148,6 @@
|
||||||
"version": "4.0.4",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
|
||||||
"integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==",
|
"integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==",
|
||||||
"deprecated": "This package is no longer supported.",
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"aproba": "^1.0.3 || ^2.0.0",
|
"aproba": "^1.0.3 || ^2.0.0",
|
||||||
|
@ -2303,7 +2301,6 @@
|
||||||
"version": "7.2.3",
|
"version": "7.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||||
"deprecated": "Glob versions prior to v9 are no longer supported",
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs.realpath": "^1.0.0",
|
"fs.realpath": "^1.0.0",
|
||||||
|
@ -2673,7 +2670,6 @@
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
||||||
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"once": "^1.3.0",
|
"once": "^1.3.0",
|
||||||
|
@ -2723,15 +2719,12 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/is-core-module": {
|
"node_modules/is-core-module": {
|
||||||
"version": "2.15.1",
|
"version": "2.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
|
||||||
"integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==",
|
"integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"hasown": "^2.0.2"
|
"hasown": "^2.0.0"
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.4"
|
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
@ -3050,6 +3043,11 @@
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/map-stream": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g=="
|
||||||
|
},
|
||||||
"node_modules/matcher": {
|
"node_modules/matcher": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
||||||
|
@ -3089,13 +3087,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/micromatch": {
|
"node_modules/micromatch": {
|
||||||
"version": "4.0.8",
|
"version": "4.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
|
||||||
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"braces": "^3.0.3",
|
"braces": "^3.0.2",
|
||||||
"picomatch": "^2.3.1"
|
"picomatch": "^2.3.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -3244,9 +3242,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.3",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/negotiator": {
|
"node_modules/negotiator": {
|
||||||
|
@ -3266,9 +3264,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/node-abi": {
|
"node_modules/node-abi": {
|
||||||
"version": "3.67.0",
|
"version": "3.62.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.67.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.62.0.tgz",
|
||||||
"integrity": "sha512-bLn/fU/ALVBE9wj+p4Y21ZJWYFjUXLXPi/IewyLZkx3ApxKDNBWCKdReeKOtD8dWpOdDCeMyLh6ZewzcLsG2Nw==",
|
"integrity": "sha512-CPMcGa+y33xuL1E0TcNIu4YyaZCxnnvkVaEXrsosR3FxN+fV8xvb7Mzpb7IgKler10qeMkE6+Dp8qJhpzdq35g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"semver": "^7.3.5"
|
"semver": "^7.3.5"
|
||||||
|
@ -3407,7 +3405,6 @@
|
||||||
"version": "6.0.2",
|
"version": "6.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz",
|
||||||
"integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==",
|
"integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==",
|
||||||
"deprecated": "This package is no longer supported.",
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"are-we-there-yet": "^3.0.0",
|
"are-we-there-yet": "^3.0.0",
|
||||||
|
@ -3702,6 +3699,18 @@
|
||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/pause-stream": {
|
||||||
|
"version": "0.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
|
||||||
|
"integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==",
|
||||||
|
"license": [
|
||||||
|
"MIT",
|
||||||
|
"Apache2"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"through": "~2.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/pe-library": {
|
"node_modules/pe-library": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/pe-library/-/pe-library-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/pe-library/-/pe-library-1.0.1.tgz",
|
||||||
|
@ -3879,10 +3888,25 @@
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ps-tree": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"event-stream": "=3.3.4"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"ps-tree": "bin/ps-tree.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/pump": {
|
"node_modules/pump": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||||
"integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==",
|
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"end-of-stream": "^1.1.0",
|
"end-of-stream": "^1.1.0",
|
||||||
|
@ -4181,16 +4205,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rfdc": {
|
"node_modules/rfdc": {
|
||||||
"version": "1.4.1",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz",
|
||||||
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
|
"integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/rimraf": {
|
"node_modules/rimraf": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
|
||||||
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
|
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
|
||||||
"deprecated": "Rimraf versions prior to v4 are no longer supported",
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"glob": "^7.1.3"
|
"glob": "^7.1.3"
|
||||||
|
@ -4272,9 +4295,9 @@
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.6.3",
|
"version": "7.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
|
||||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
|
@ -4466,11 +4489,23 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/spdx-license-ids": {
|
"node_modules/spdx-license-ids": {
|
||||||
"version": "3.0.20",
|
"version": "3.0.17",
|
||||||
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz",
|
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz",
|
||||||
"integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==",
|
"integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==",
|
||||||
"license": "CC0-1.0"
|
"license": "CC0-1.0"
|
||||||
},
|
},
|
||||||
|
"node_modules/split": {
|
||||||
|
"version": "0.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",
|
||||||
|
"integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"through": "2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/sprintf-js": {
|
"node_modules/sprintf-js": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
|
||||||
|
@ -4489,6 +4524,15 @@
|
||||||
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/stream-combiner": {
|
||||||
|
"version": "0.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
|
||||||
|
"integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"duplexer": "~0.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/string_decoder": {
|
"node_modules/string_decoder": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||||
|
@ -4639,6 +4683,24 @@
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/terminate": {
|
||||||
|
"version": "2.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/terminate/-/terminate-2.6.1.tgz",
|
||||||
|
"integrity": "sha512-0kdr49oam98yvjkVY+gfUaT3SMaJI6Sc+yijJjU+qhat+0NQKQn60OsIZZeKyVgTO0/33nRa3HowRbpw3A7u9A==",
|
||||||
|
"license": "GPL-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"ps-tree": "^1.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/through": {
|
||||||
|
"version": "2.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||||
|
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/to-regex-range": {
|
"node_modules/to-regex-range": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
@ -4699,9 +4761,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.6.2",
|
"version": "5.4.5",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
|
||||||
"integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==",
|
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
|
@ -4712,9 +4774,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "6.19.8",
|
"version": "5.26.5",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
|
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/unique-filename": {
|
"node_modules/unique-filename": {
|
||||||
|
|
12
package.json
12
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "dsr",
|
"name": "dsr",
|
||||||
"version": "1.11.0",
|
"version": "1.8.7",
|
||||||
"description": "Discord Video Sharing",
|
"description": "Discord Video Sharing",
|
||||||
"main": "./dist/main.js",
|
"main": "./dist/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -21,20 +21,18 @@
|
||||||
"@electron-forge/maker-zip": "^7.4",
|
"@electron-forge/maker-zip": "^7.4",
|
||||||
"ffmpeg-static": "^5.2",
|
"ffmpeg-static": "^5.2",
|
||||||
"ffprobe-static": "^3.1",
|
"ffprobe-static": "^3.1",
|
||||||
"typescript": "^5.6"
|
"terminate": "^2.6",
|
||||||
|
"typescript": "^5.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron-forge/cli": "^7.4",
|
"@electron-forge/cli": "^7.4",
|
||||||
"@types/ffprobe-static": "^2.0",
|
"@types/ffprobe-static": "^2.0",
|
||||||
"electron": "^32.1"
|
"electron": "^30.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"forge": {
|
"forge": {
|
||||||
"packagerConfig": {
|
"packagerConfig": {
|
||||||
"icon": "./image/icon.ico",
|
"icon": "./image/icon.ico"
|
||||||
"asar": {
|
|
||||||
"unpack": "**/node_modules/*-static/**"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"makers": [
|
"makers": [
|
||||||
{
|
{
|
||||||
|
|
159
src/main.ts
159
src/main.ts
|
@ -1,19 +1,18 @@
|
||||||
import { app, BrowserWindow, dialog, ipcMain, Notification } from "electron";
|
import { app, BrowserWindow, dialog, ipcMain, Notification } from "electron";
|
||||||
import { statSync, copyFileSync } from "fs";
|
import { statSync } from "fs";
|
||||||
import {
|
import {
|
||||||
deleteFile,
|
deleteFile,
|
||||||
deleteTwoPassFiles,
|
deleteTwoPassFiles,
|
||||||
execute,
|
execute,
|
||||||
getNewFilename,
|
getNewFilename,
|
||||||
getVideoDuration,
|
getVideoDuration,
|
||||||
getNumberOfAudioTracks,
|
|
||||||
printAndDevTool,
|
printAndDevTool,
|
||||||
processes,
|
processes,
|
||||||
} from "./utils/misc";
|
} from "./utils/misc";
|
||||||
import path = require("path");
|
import path = require("path");
|
||||||
|
import ffmpegPath = require("ffmpeg-static");
|
||||||
|
|
||||||
import ffmpeg = require("ffmpeg-static");
|
const kill = require("terminate");
|
||||||
const ffmpegPath = `${ffmpeg}`.replace("app.asar", "app.asar.unpacked");
|
|
||||||
|
|
||||||
let error = false;
|
let error = false;
|
||||||
|
|
||||||
|
@ -22,12 +21,11 @@ const moviesFilter = {
|
||||||
extensions: ["mp4", "mkv"],
|
extensions: ["mp4", "mkv"],
|
||||||
};
|
};
|
||||||
|
|
||||||
const metadataAudioSize = 3;
|
|
||||||
const metadataAudio = `-metadata:s:a:0 title="System sounds and microphone" \
|
const metadataAudio = `-metadata:s:a:0 title="System sounds and microphone" \
|
||||||
-metadata:s:a:1 title="System sounds" \
|
-metadata:s:a:1 title="System sounds" \
|
||||||
-metadata:s:a:2 title="Microphone"`;
|
-metadata:s:a:2 title="Microphone"`;
|
||||||
|
|
||||||
const shareOpt = "-movflags +faststart";
|
const extraArgs = "-movflags +faststart";
|
||||||
|
|
||||||
/** Register a new error */
|
/** Register a new error */
|
||||||
const registerError = (win: BrowserWindow, err: string) => {
|
const registerError = (win: BrowserWindow, err: string) => {
|
||||||
|
@ -52,11 +50,6 @@ const createWindow = () => {
|
||||||
return win;
|
return win;
|
||||||
};
|
};
|
||||||
|
|
||||||
// For notification on Windows
|
|
||||||
if (process.platform === "win32") {
|
|
||||||
app.setAppUserModelId(app.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ready to create the window */
|
/* Ready to create the window */
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
const win = createWindow();
|
const win = createWindow();
|
||||||
|
@ -85,27 +78,67 @@ app.whenReady().then(() => {
|
||||||
const getFilename = (filepath: string) => path.parse(filepath).base;
|
const getFilename = (filepath: string) => path.parse(filepath).base;
|
||||||
|
|
||||||
/** Merge all audios track of a video into one
|
/** Merge all audios track of a video into one
|
||||||
* In case video doesn't have exactly two audio streams, silently pass */
|
* In case video have only one track, silently pass */
|
||||||
const mergeAudio = async (file: string) => {
|
const mergeAudio = async (file: string) => {
|
||||||
const tmpFile = getNewFilename(file, "TMP_");
|
const tmpFile = getNewFilename(file, "TMP_");
|
||||||
let outFile;
|
let outFile;
|
||||||
|
|
||||||
let audioTracks = getNumberOfAudioTracks(file);
|
// One track for the video
|
||||||
|
let nbTracks = 1;
|
||||||
|
|
||||||
switch (audioTracks.length) {
|
// Merge 2 audio
|
||||||
case 2:
|
// See: https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a2stereostereo
|
||||||
// Merge 2 audio
|
await execute(
|
||||||
// See: https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a2stereostereo
|
`"${ffmpegPath}" -y \
|
||||||
await execute(
|
-i "${file}" \
|
||||||
`"${ffmpegPath}" -y \
|
-filter_complex "[0:a]amerge=inputs=2[a]" -ac 2 -map 0:v -map "[a]" \
|
||||||
-i "${file}" \
|
-c:v copy \
|
||||||
-filter_complex "[0:a]amerge=inputs=2[a]" -ac 2 -map 0:v -map "[a]" \
|
"${tmpFile}"`
|
||||||
-c:v copy \
|
)
|
||||||
"${tmpFile}"`
|
.catch(async (e) => {
|
||||||
);
|
if (
|
||||||
|
`${e}`.includes(
|
||||||
|
"Cannot find a matching stream for unlabeled input pad 1 on filter"
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
// Only one audio in the file
|
||||||
|
outFile = getNewFilename(file, "(nomerge) ");
|
||||||
|
nbTracks += 1;
|
||||||
|
|
||||||
|
// Do a copy
|
||||||
|
await execute(`"${ffmpegPath}" -y \
|
||||||
|
-i "${file}" \
|
||||||
|
-codec copy \
|
||||||
|
${extraArgs} \
|
||||||
|
"${outFile}"`).catch((e) => registerError(win, e));
|
||||||
|
|
||||||
|
// We throw an error since we do not want to merge any audio
|
||||||
|
return Promise.resolve("skip");
|
||||||
|
} else if (`${e}`.includes("matches no stream")) {
|
||||||
|
// No audio in the file
|
||||||
|
outFile = getNewFilename(file, "(noaudio) ");
|
||||||
|
|
||||||
|
// Do a copy
|
||||||
|
await execute(`"${ffmpegPath}" -y \
|
||||||
|
-i "${file}" \
|
||||||
|
-codec copy \
|
||||||
|
${extraArgs} \
|
||||||
|
"${outFile}"`).catch((e) => registerError(win, e));
|
||||||
|
|
||||||
|
// We throw an error since we do not want to merge any audio
|
||||||
|
return Promise.resolve("skip");
|
||||||
|
} else {
|
||||||
|
// Error handling
|
||||||
|
registerError(win, e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(async (val) => {
|
||||||
|
if (val == "skip") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
outFile = getNewFilename(file, "(merged audio) ");
|
outFile = getNewFilename(file, "(merged audio) ");
|
||||||
|
nbTracks += 3;
|
||||||
// Add merged audio as first position to original video and make it default
|
// Add merged audio as first position to original video and make it default
|
||||||
// About disposition: https://ffmpeg.org/ffmpeg.html#Main-options
|
// About disposition: https://ffmpeg.org/ffmpeg.html#Main-options
|
||||||
// Also rename all tracks accordingly to what they are
|
// Also rename all tracks accordingly to what they are
|
||||||
|
@ -115,23 +148,13 @@ app.whenReady().then(() => {
|
||||||
-map 0 -map 1:a -c:v copy \
|
-map 0 -map 1:a -c:v copy \
|
||||||
-disposition:a 0 -disposition:a:0 default \
|
-disposition:a 0 -disposition:a:0 default \
|
||||||
${metadataAudio} \
|
${metadataAudio} \
|
||||||
|
${extraArgs} \
|
||||||
"${outFile}"`
|
"${outFile}"`
|
||||||
).catch((e) => registerError(win, e));
|
).catch((e) => registerError(win, e));
|
||||||
|
|
||||||
// Delete the temporary video file
|
// Delete the temporary video file
|
||||||
deleteFile(tmpFile);
|
deleteFile(tmpFile);
|
||||||
|
});
|
||||||
audioTracks = getNumberOfAudioTracks(outFile);
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// Other cases: no merge needed
|
|
||||||
outFile = getNewFilename(file, "(nomerge) ");
|
|
||||||
|
|
||||||
// Do a copy
|
|
||||||
copyFileSync(file, outFile);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
const duration = getVideoDuration(outFile);
|
const duration = getVideoDuration(outFile);
|
||||||
const stats = statSync(outFile);
|
const stats = statSync(outFile);
|
||||||
|
@ -140,7 +163,7 @@ app.whenReady().then(() => {
|
||||||
title: outFile,
|
title: outFile,
|
||||||
size: stats.size / 1024 / 1024,
|
size: stats.size / 1024 / 1024,
|
||||||
duration,
|
duration,
|
||||||
audioTracks,
|
nbTracks,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -148,11 +171,9 @@ app.whenReady().then(() => {
|
||||||
const reduceSize = async (
|
const reduceSize = async (
|
||||||
file: string,
|
file: string,
|
||||||
bitrate: number,
|
bitrate: number,
|
||||||
audioTracks: number[]
|
nbTracks: number
|
||||||
) => {
|
) => {
|
||||||
const audioBitrate = Math.ceil(
|
const audioBitrate = 400; // keep some room
|
||||||
audioTracks.reduce((sum, current) => current + sum, 0)
|
|
||||||
);
|
|
||||||
let videoBitrate = bitrate - audioBitrate;
|
let videoBitrate = bitrate - audioBitrate;
|
||||||
|
|
||||||
const finalFile = getNewFilename(file, "Compressed - ");
|
const finalFile = getNewFilename(file, "Compressed - ");
|
||||||
|
@ -160,8 +181,8 @@ app.whenReady().then(() => {
|
||||||
// Trash the output, depends on the platform
|
// Trash the output, depends on the platform
|
||||||
const nul = process.platform === "win32" ? "NUL" : "/dev/null";
|
const nul = process.platform === "win32" ? "NUL" : "/dev/null";
|
||||||
|
|
||||||
// Mapping of tracks for FFMPEG, adding 1 for the video stream
|
// Mapping of tracks for FFMPEG
|
||||||
const mappingTracks = Array(audioTracks.length + 1)
|
const mappingTracks = Array(nbTracks)
|
||||||
.fill("-map 0:")
|
.fill("-map 0:")
|
||||||
.map((str, index) => {
|
.map((str, index) => {
|
||||||
return str + index;
|
return str + index;
|
||||||
|
@ -172,21 +193,13 @@ app.whenReady().then(() => {
|
||||||
let hwAcc = "";
|
let hwAcc = "";
|
||||||
|
|
||||||
const argv = process.argv;
|
const argv = process.argv;
|
||||||
if (argv.includes("/nvenc_h264")) {
|
if (argv.includes("/nvenc")) {
|
||||||
// Use NVenc H.264
|
// Use NVenc
|
||||||
codec = "h264_nvenc";
|
codec = "h264_nvenc";
|
||||||
hwAcc = "-hwaccel cuda";
|
hwAcc = "-hwaccel cuda";
|
||||||
}
|
|
||||||
|
|
||||||
if (argv.includes("/nvenc_h265")) {
|
// Increase video bitrate
|
||||||
// Use NVenc H.265
|
videoBitrate = Math.floor(videoBitrate * 1.7);
|
||||||
codec = "hevc_nvenc";
|
|
||||||
hwAcc = "-hwaccel cuda";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (argv.includes("/h265")) {
|
|
||||||
// Use H.265 encoder
|
|
||||||
codec = "libx265";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compress the video
|
// Compress the video
|
||||||
|
@ -201,9 +214,8 @@ app.whenReady().then(() => {
|
||||||
-i "${file}" \
|
-i "${file}" \
|
||||||
-c:v ${codec} -b:v ${videoBitrate}k -pass 2 -c:a copy \
|
-c:v ${codec} -b:v ${videoBitrate}k -pass 2 -c:a copy \
|
||||||
${mappingTracks} -f mp4 \
|
${mappingTracks} -f mp4 \
|
||||||
-profile:v main \
|
${metadataAudio} \
|
||||||
${audioTracks.length === metadataAudioSize ? metadataAudio : ""} \
|
${extraArgs} \
|
||||||
${shareOpt} \
|
|
||||||
"${finalFile}"`
|
"${finalFile}"`
|
||||||
).catch((e) => registerError(win, e));
|
).catch((e) => registerError(win, e));
|
||||||
|
|
||||||
|
@ -216,26 +228,6 @@ app.whenReady().then(() => {
|
||||||
return finalFile;
|
return finalFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Move metadata at the begenning of the file */
|
|
||||||
const moveMetadata = async (file: string, nbTracks: number) => {
|
|
||||||
const finalFile = getNewFilename(file, "Broadcastable - ");
|
|
||||||
|
|
||||||
// Optimize for streaming
|
|
||||||
await execute(
|
|
||||||
`"${ffmpegPath}" -y \
|
|
||||||
-i "${file}" \
|
|
||||||
-map 0 -codec copy \
|
|
||||||
${shareOpt} \
|
|
||||||
${nbTracks === metadataAudioSize ? metadataAudio : ""} \
|
|
||||||
"${finalFile}"`
|
|
||||||
).catch((e) => registerError(win, e));
|
|
||||||
|
|
||||||
// Delete the old video file
|
|
||||||
deleteFile(file);
|
|
||||||
|
|
||||||
return finalFile;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Context bridge */
|
/* Context bridge */
|
||||||
ipcMain.handle("argv", () => process.argv);
|
ipcMain.handle("argv", () => process.argv);
|
||||||
ipcMain.handle("allowedExtensions", () => moviesFilter);
|
ipcMain.handle("allowedExtensions", () => moviesFilter);
|
||||||
|
@ -244,11 +236,8 @@ app.whenReady().then(() => {
|
||||||
ipcMain.handle("mergeAudio", (_, file: string) => mergeAudio(file));
|
ipcMain.handle("mergeAudio", (_, file: string) => mergeAudio(file));
|
||||||
ipcMain.handle(
|
ipcMain.handle(
|
||||||
"reduceSize",
|
"reduceSize",
|
||||||
(_, file: string, bitrate: number, audioTracks: number[]) =>
|
(_, file: string, bitrate: number, nbTracks: number) =>
|
||||||
reduceSize(file, bitrate, audioTracks)
|
reduceSize(file, bitrate, nbTracks)
|
||||||
);
|
|
||||||
ipcMain.handle("moveMetadata", (_, file: string, nbTracks: number) =>
|
|
||||||
moveMetadata(file, nbTracks)
|
|
||||||
);
|
);
|
||||||
ipcMain.handle("exit", () => (error ? {} : app.quit()));
|
ipcMain.handle("exit", () => (error ? {} : app.quit()));
|
||||||
ipcMain.handle("confirmation", (_, text: string) => confirmation(text));
|
ipcMain.handle("confirmation", (_, text: string) => confirmation(text));
|
||||||
|
@ -256,7 +245,7 @@ app.whenReady().then(() => {
|
||||||
|
|
||||||
app.on("window-all-closed", () => {
|
app.on("window-all-closed", () => {
|
||||||
processes.forEach((process) => {
|
processes.forEach((process) => {
|
||||||
process.stdin.write("q");
|
kill(process.pid);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.quit();
|
app.quit();
|
||||||
|
|
|
@ -13,10 +13,8 @@ contextBridge.exposeInMainWorld("internals", {
|
||||||
ipcRenderer.invoke("getFilename", filepath),
|
ipcRenderer.invoke("getFilename", filepath),
|
||||||
askFiles: () => ipcRenderer.invoke("askFiles"),
|
askFiles: () => ipcRenderer.invoke("askFiles"),
|
||||||
mergeAudio: (file: string) => ipcRenderer.invoke("mergeAudio", file),
|
mergeAudio: (file: string) => ipcRenderer.invoke("mergeAudio", file),
|
||||||
reduceSize: (file: string, bitrate: number, audioTracks: number[]) =>
|
reduceSize: (file: string, bitrate: number, nbTracks: number) =>
|
||||||
ipcRenderer.invoke("reduceSize", file, bitrate, audioTracks),
|
ipcRenderer.invoke("reduceSize", file, bitrate, nbTracks),
|
||||||
moveMetadata: (file: string, nbTracks: number) =>
|
|
||||||
ipcRenderer.invoke("moveMetadata", file, nbTracks),
|
|
||||||
exit: () => ipcRenderer.invoke("exit"),
|
exit: () => ipcRenderer.invoke("exit"),
|
||||||
confirmation: (text: string) => ipcRenderer.invoke("confirmation", text),
|
confirmation: (text: string) => ipcRenderer.invoke("confirmation", text),
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,14 +11,13 @@ let internals: {
|
||||||
title: string;
|
title: string;
|
||||||
duration: number;
|
duration: number;
|
||||||
size: number;
|
size: number;
|
||||||
audioTracks: number[];
|
nbTracks: number;
|
||||||
}>;
|
}>;
|
||||||
reduceSize: (
|
reduceSize: (
|
||||||
file: string,
|
file: string,
|
||||||
bitrate: number,
|
bitrate: number,
|
||||||
audioTracks: number[]
|
nbTracks: number
|
||||||
) => Promise<string>;
|
) => Promise<string>;
|
||||||
moveMetadata: (file: string, nbTracks: number) => Promise<string>;
|
|
||||||
confirmation: (text: string) => Promise<void>;
|
confirmation: (text: string) => Promise<void>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,16 +55,13 @@ const getFiles = async () => {
|
||||||
/** Returns maximum allowed size for files in MB */
|
/** Returns maximum allowed size for files in MB */
|
||||||
const fetchMaxSize = async () => {
|
const fetchMaxSize = async () => {
|
||||||
const argv = await internals.argv();
|
const argv = await internals.argv();
|
||||||
if (argv.includes("/nitrobasic")) {
|
if (argv.includes("/nitro")) {
|
||||||
// Nitro Basic user
|
|
||||||
return 50;
|
|
||||||
} else if (argv.includes("/nitro")) {
|
|
||||||
// Nitro user
|
// Nitro user
|
||||||
return 500;
|
return 500;
|
||||||
} else {
|
|
||||||
// Free user
|
|
||||||
return 10;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Free user
|
||||||
|
return 25;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Either replace the message, or add some info */
|
/** Either replace the message, or add some info */
|
||||||
|
@ -135,15 +131,7 @@ const main = async () => {
|
||||||
finalTitle = await internals.reduceSize(
|
finalTitle = await internals.reduceSize(
|
||||||
newFile.title,
|
newFile.title,
|
||||||
bitrate,
|
bitrate,
|
||||||
newFile.audioTracks
|
newFile.nbTracks
|
||||||
);
|
|
||||||
} else {
|
|
||||||
updateMessage(`\nPréparation pour le partage...`, true, Mode.Append);
|
|
||||||
|
|
||||||
// Move the metadata to make it playable before everything is downloaded
|
|
||||||
finalTitle = await internals.moveMetadata(
|
|
||||||
newFile.title,
|
|
||||||
newFile.audioTracks.length
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
|
import ffprobe = require("ffprobe-static");
|
||||||
import child_process = require("child_process");
|
import child_process = require("child_process");
|
||||||
import path = require("path");
|
import path = require("path");
|
||||||
import { BrowserWindow } from "electron";
|
import { BrowserWindow } from "electron";
|
||||||
import { existsSync, unlink } from "fs";
|
import { existsSync, unlink } from "fs";
|
||||||
|
|
||||||
import ffprobe = require("ffprobe-static");
|
|
||||||
const ffprobePath = ffprobe.path.replace("app.asar", "app.asar.unpacked");
|
|
||||||
|
|
||||||
export const processes: child_process.ChildProcess[] = [];
|
export const processes: child_process.ChildProcess[] = [];
|
||||||
|
|
||||||
/** Create a new filename from the OG one */
|
/** Create a new filename from the OG one */
|
||||||
|
@ -16,20 +14,11 @@ export const getNewFilename = (ogFile: string, part: string) => {
|
||||||
|
|
||||||
/** Return the duration of a video in second */
|
/** Return the duration of a video in second */
|
||||||
export const getVideoDuration = (file: string) => {
|
export const getVideoDuration = (file: string) => {
|
||||||
const command = `"${ffprobePath}" -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "${file}"`;
|
const command = `"${ffprobe.path}" -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "${file}"`;
|
||||||
const durationString = child_process.execSync(command).toString().trim();
|
const durationString = child_process.execSync(command).toString().trim();
|
||||||
return parseFloat(durationString);
|
return parseFloat(durationString);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Return the number of audio tracks */
|
|
||||||
export const getNumberOfAudioTracks = (file: string): number[] => {
|
|
||||||
const command = `"${ffprobePath}" -v error -show_entries stream=bit_rate -select_streams a -of json "${file}"`;
|
|
||||||
const result = child_process.execSync(command, { encoding: "utf8" });
|
|
||||||
return JSON.parse(result).streams.map(
|
|
||||||
(v: { bit_rate: string }) => Number(v.bit_rate) / 1000
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Print an error to the console and open the dev tool panel */
|
/** Print an error to the console and open the dev tool panel */
|
||||||
export const printAndDevTool = (win: BrowserWindow, err: string) => {
|
export const printAndDevTool = (win: BrowserWindow, err: string) => {
|
||||||
win.webContents.openDevTools();
|
win.webContents.openDevTools();
|
||||||
|
|
Loading…
Reference in a new issue