mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-25 03:33:14 +01:00
Upgrade ffmpeg to 4.4.1
except mac Remove ffmpeg-ffprobe-static, use scripts instead https://github.com/flathub/no.mifi.losslesscut/pull/11
This commit is contained in:
parent
0ba15d0ee4
commit
98da22e8dc
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -52,9 +52,17 @@ jobs:
|
||||
mkdir -p ~/.appstoreconnect/private_keys/
|
||||
echo '${{ secrets.api_key }}' > ~/.appstoreconnect/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
|
||||
|
||||
- name: Download custom ffmpeg for Mac
|
||||
- name: Download ffmpeg for Mac
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
run: yarn download-ffmpeg
|
||||
run: yarn download-ffmpeg-mac
|
||||
|
||||
- name: Download ffmpeg for Windows
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
run: yarn download-ffmpeg-windows
|
||||
|
||||
- name: Download ffmpeg for Linux
|
||||
if: startsWith(matrix.os, 'linux')
|
||||
run: yarn download-ffmpeg-linux
|
||||
|
||||
- name: Build/release Electron app
|
||||
uses: samuelmeuli/action-electron-builder@v1
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,4 +5,4 @@ build
|
||||
icon-build
|
||||
icns-build
|
||||
doc
|
||||
/ffmpeg-mac
|
||||
/ffmpeg
|
||||
|
33
package.json
33
package.json
@ -9,7 +9,9 @@
|
||||
"scripts": {
|
||||
"start": "concurrently -k \"cross-env BROWSER=none PORT=3001 DISABLE_ESLINT_PLUGIN=true react-scripts start\" \"wait-on http://localhost:3001 && electron .\"",
|
||||
"icon-gen": "mkdirp icon-build && svg2png src/icon.svg -o ./icon-build/app-512.png -w 512 -h 512 && mkdirp icns-build && icon-gen -i src/icon.svg -o ./icns-build --icns --icns-sizes 512,1024 && mkdirp build-resources/appx && npx svg2png src/icon.svg --output=build-resources/appx/StoreLogo.png --width=50 --height=50 && npx svg2png src/icon.svg --output=build-resources/appx/Square150x150Logo.png --width=300 --height=300 && npx svg2png src/icon.svg --output=build-resources/appx/Square44x44Logo.png --width=44 --height=44 && npx svg2png src/icon.svg --output=build-resources/appx/Wide310x150Logo.png --width=620 --height=300",
|
||||
"download-ffmpeg": "mkdir -p ffmpeg-mac && wget https://github.com/mifi/ffmpeg-build-script/releases/download/n4.3.1/ffmpeg -O ffmpeg-mac/ffmpeg && wget https://github.com/mifi/ffmpeg-build-script/releases/download/n4.3.1/ffprobe -O ffmpeg-mac/ffprobe && chmod +x ffmpeg-mac/ffmpeg && chmod +x ffmpeg-mac/ffprobe",
|
||||
"download-ffmpeg-mac": "mkdir -p ffmpeg/darwin && cd ffmpeg/darwin && wget https://github.com/mifi/ffmpeg-build-script/releases/download/n4.3.1/ffmpeg -O ffmpeg && wget https://github.com/mifi/ffmpeg-build-script/releases/download/n4.3.1/ffprobe -O ffprobe && chmod +x ffmpeg && chmod +x ffprobe",
|
||||
"download-ffmpeg-linux": "mkdir -p ffmpeg/linux && cd ffmpeg/linux && wget https://github.com/mifi/ffmpeg-builds/releases/download/4.4.1/ffmpeg-release-amd64-static.tar.xz -O ffmpeg.xz && tar xvf ffmpeg.xz && mv ffmpeg-4.4.1-amd64-static/{ffmpeg,ffprobe} ./",
|
||||
"download-ffmpeg-windows": "npx shx mkdir -p ffmpeg/win32 && cd ffmpeg/win32 && npx download-cli https://github.com/mifi/ffmpeg-builds/releases/download/4.4.1/ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4.zip --out . --filename ffmpeg.zip && 7z x ffmpeg.zip && npx shx mv ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4/bin/ffmpeg.exe ./ && npx shx mv ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4/bin/ffprobe.exe ./",
|
||||
"build": "yarn icon-gen && react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject",
|
||||
@ -97,7 +99,6 @@
|
||||
"electron-store": "5.1.1",
|
||||
"electron-unhandled": "^3.0.2",
|
||||
"execa": "^5.0.0",
|
||||
"ffmpeg-ffprobe-static": "4.3.1-rc.2",
|
||||
"file-type": "^12.4.0",
|
||||
"fs-extra": "^8.1.0",
|
||||
"github-api": "^3.2.2",
|
||||
@ -130,9 +131,7 @@
|
||||
"buildResources": "build-resources"
|
||||
},
|
||||
"files": [
|
||||
"build/**/*",
|
||||
"!node_modules/ffmpeg-ffprobe-static/ffmpeg",
|
||||
"!node_modules/ffmpeg-ffprobe-static/ffprobe"
|
||||
"build/**/*"
|
||||
],
|
||||
"asar": {
|
||||
"smartUnpack": false
|
||||
@ -156,11 +155,11 @@
|
||||
],
|
||||
"extraResources": [
|
||||
{
|
||||
"from": "ffmpeg-mac/ffmpeg",
|
||||
"from": "ffmpeg/darwin/ffmpeg",
|
||||
"to": "ffmpeg"
|
||||
},
|
||||
{
|
||||
"from": "ffmpeg-mac/ffprobe",
|
||||
"from": "ffmpeg/darwin/ffprobe",
|
||||
"to": "ffprobe"
|
||||
}
|
||||
],
|
||||
@ -280,8 +279,14 @@
|
||||
"appx"
|
||||
],
|
||||
"extraResources": [
|
||||
"node_modules/ffmpeg-ffprobe-static/ffmpeg.exe",
|
||||
"node_modules/ffmpeg-ffprobe-static/ffprobe.exe"
|
||||
{
|
||||
"from": "ffmpeg/win32/ffmpeg.exe",
|
||||
"to": "ffmpeg.exe"
|
||||
},
|
||||
{
|
||||
"from": "ffmpeg/win32/ffprobe.exe",
|
||||
"to": "ffprobe.exe"
|
||||
}
|
||||
],
|
||||
"icon": "icon-build/app-512.png",
|
||||
"fileAssociations": [
|
||||
@ -390,8 +395,14 @@
|
||||
"linux": {
|
||||
"executableName": "losslesscut",
|
||||
"extraResources": [
|
||||
"node_modules/ffmpeg-ffprobe-static/ffmpeg",
|
||||
"node_modules/ffmpeg-ffprobe-static/ffprobe"
|
||||
{
|
||||
"from": "ffmpeg/linux/ffmpeg",
|
||||
"to": "ffmpeg"
|
||||
},
|
||||
{
|
||||
"from": "ffmpeg/linux/ffprobe",
|
||||
"to": "ffprobe"
|
||||
}
|
||||
],
|
||||
"icon": "icon-build/app-512.png",
|
||||
"target": [
|
||||
|
@ -5,7 +5,7 @@ import moment from 'moment';
|
||||
import i18n from 'i18next';
|
||||
import Timecode from 'smpte-timecode';
|
||||
|
||||
import { getOutPath, isDurationValid, getExtensionForFormat, isMac, isWindows } from './util';
|
||||
import { getOutPath, isDurationValid, getExtensionForFormat, isMac, isWindows, platform } from './util';
|
||||
|
||||
const execa = window.require('execa');
|
||||
const { join } = window.require('path');
|
||||
@ -21,17 +21,10 @@ export function getFfCommandLine(cmd, args) {
|
||||
}
|
||||
|
||||
function getFfPath(cmd) {
|
||||
// Testing non-mac setup on mac:
|
||||
// return `node_modules/ffmpeg-ffprobe-static/${cmd}`;
|
||||
|
||||
if (isMac) {
|
||||
return isDev ? `ffmpeg-mac/${cmd}` : join(window.process.resourcesPath, cmd);
|
||||
}
|
||||
|
||||
const exeName = isWindows ? `${cmd}.exe` : cmd;
|
||||
return isDev
|
||||
? `node_modules/ffmpeg-ffprobe-static/${exeName}`
|
||||
: join(window.process.resourcesPath, `node_modules/ffmpeg-ffprobe-static/${exeName}`);
|
||||
|
||||
if (isDev) return `ffmpeg/${platform}/${exeName}`;
|
||||
return join(window.process.resourcesPath, exeName);
|
||||
}
|
||||
|
||||
export const getFfmpegPath = () => getFfPath('ffmpeg');
|
||||
|
@ -5,6 +5,7 @@ export async function loadMifiLink() {
|
||||
try {
|
||||
// In old versions: https://mifi.no/losslesscut/config.json
|
||||
const resp = await axios.get('https://losslesscut.mifi.no/config.json');
|
||||
// const resp = await axios.get('http://localhost:8080/config-dev.json');
|
||||
return resp.data;
|
||||
} catch (err) {
|
||||
return undefined;
|
||||
|
@ -147,7 +147,7 @@ export const isStoreBuild = isMasBuild || isWindowsStoreBuild;
|
||||
|
||||
export const isDurationValid = (duration) => Number.isFinite(duration) && duration > 0;
|
||||
|
||||
const platform = os.platform();
|
||||
export const platform = os.platform();
|
||||
|
||||
export const isWindows = platform === 'win32';
|
||||
export const isMac = platform === 'darwin';
|
||||
|
68
yarn.lock
68
yarn.lock
@ -1194,16 +1194,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-10.1.0.tgz#f0950bba18819512d42f7197e56c518aa491cf18"
|
||||
integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==
|
||||
|
||||
"@derhuerst/http-basic@^8.2.0":
|
||||
version "8.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@derhuerst/http-basic/-/http-basic-8.2.1.tgz#11e3964cf1f2fb40806f9a0fff0c451bb7526093"
|
||||
integrity sha512-Rmn7qQQulw2sxJ8qGfZ7OuqMWuhz8V+L5xnYKMF5cXVcYqmgWqlVEAme90pF7Ya8OVhxVxLmhh0rI2k6t7ITWw==
|
||||
dependencies:
|
||||
caseless "^0.12.0"
|
||||
concat-stream "^1.6.2"
|
||||
http-response-object "^3.0.1"
|
||||
parse-cache-control "^1.0.1"
|
||||
|
||||
"@develar/schema-utils@~2.6.5":
|
||||
version "2.6.5"
|
||||
resolved "https://registry.yarnpkg.com/@develar/schema-utils/-/schema-utils-2.6.5.tgz#3ece22c5838402419a6e0425f85742b961d9b6c6"
|
||||
@ -1946,11 +1936,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e"
|
||||
integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==
|
||||
|
||||
"@types/node@^10.0.3":
|
||||
version "10.17.56"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.56.tgz#010c9e047c3ff09ddcd11cbb6cf5912725cdc2b3"
|
||||
integrity sha512-LuAa6t1t0Bfw4CuSR0UITsm1hP17YL+u82kfHGrHUWdhlBtH7sa7jGY5z7glGaIj/WDYDkRtgGd+KCjCzxBW1w==
|
||||
|
||||
"@types/node@^12.0.12":
|
||||
version "12.20.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.7.tgz#1cb61fd0c85cb87e728c43107b5fd82b69bc9ef8"
|
||||
@ -2474,13 +2459,6 @@ adjust-sourcemap-loader@3.0.0:
|
||||
loader-utils "^2.0.0"
|
||||
regex-parser "^2.2.11"
|
||||
|
||||
agent-base@6:
|
||||
version "6.0.2"
|
||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
|
||||
integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
|
||||
dependencies:
|
||||
debug "4"
|
||||
|
||||
aggregate-error@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a"
|
||||
@ -3638,7 +3616,7 @@ case-sensitive-paths-webpack-plugin@2.3.0:
|
||||
resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.3.0.tgz#23ac613cc9a856e4f88ff8bb73bbb5e989825cf7"
|
||||
integrity sha512-/4YgnZS8y1UXXmC02xD5rRrBEu6T5ub+mQHLNRj0fzTRbgdBYhsNo2V5EqwgqrExjxsjtF/OpAKAMkKsxbD5XQ==
|
||||
|
||||
caseless@^0.12.0, caseless@~0.12.0:
|
||||
caseless@~0.12.0:
|
||||
version "0.12.0"
|
||||
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
|
||||
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
|
||||
@ -4670,13 +4648,6 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
|
||||
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
debug@^3.1.1, debug@^3.2.6:
|
||||
version "3.2.7"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
|
||||
@ -4684,6 +4655,13 @@ debug@^3.1.1, debug@^3.2.6:
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
|
||||
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
debug@^4.3.2:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
|
||||
@ -6051,16 +6029,6 @@ fd-slicer@~1.1.0:
|
||||
dependencies:
|
||||
pend "~1.2.0"
|
||||
|
||||
ffmpeg-ffprobe-static@4.3.1-rc.2:
|
||||
version "4.3.1-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/ffmpeg-ffprobe-static/-/ffmpeg-ffprobe-static-4.3.1-rc.2.tgz#f12d865d5a5ff3ced1128175e23403f099a4f0ad"
|
||||
integrity sha512-8PfynXZOHxCNI3R/8MBYeNqpGQt8JYOK6YwW8UFQ1CatpQ9ELBxXjFWsWUvqBc4raooUi9O6JyXVHgb40QQvhw==
|
||||
dependencies:
|
||||
"@derhuerst/http-basic" "^8.2.0"
|
||||
env-paths "^2.2.0"
|
||||
https-proxy-agent "^5.0.0"
|
||||
progress "^2.0.3"
|
||||
|
||||
figgy-pudding@^3.5.1:
|
||||
version "3.5.2"
|
||||
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
|
||||
@ -7053,13 +7021,6 @@ http-proxy@^1.17.0:
|
||||
follow-redirects "^1.0.0"
|
||||
requires-port "^1.0.0"
|
||||
|
||||
http-response-object@^3.0.1:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810"
|
||||
integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==
|
||||
dependencies:
|
||||
"@types/node" "^10.0.3"
|
||||
|
||||
http-signature@~1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
|
||||
@ -7074,14 +7035,6 @@ https-browserify@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
|
||||
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
|
||||
|
||||
https-proxy-agent@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
|
||||
integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==
|
||||
dependencies:
|
||||
agent-base "6"
|
||||
debug "4"
|
||||
|
||||
human-signals@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
|
||||
@ -9894,11 +9847,6 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.5:
|
||||
pbkdf2 "^3.0.3"
|
||||
safe-buffer "^5.1.1"
|
||||
|
||||
parse-cache-control@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e"
|
||||
integrity sha1-juqz5U+laSD+Fro493+iGqzC104=
|
||||
|
||||
parse-entities@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8"
|
||||
|
Loading…
Reference in New Issue
Block a user