Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually add ffmpeg and ffprobe #805

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
/remote
/.idea

/ffmpeg/ffmpeg
/ffmpeg/ffprobe

/ffmpeg/ffmpeg.exe
/ffmpeg/ffprobe.exe

*.js
*.js.map
*.log
Expand Down
4 changes: 4 additions & 0 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"!tslint.json"
],
"extraResources": [
{
"from": "ffmpeg",
"to": "ffmpeg"
},
{
"from": "src/assets/icons/mac/touch-bar",
"to": "assets"
Expand Down
4 changes: 3 additions & 1 deletion node/main-extract.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { app } from "electron";

/**
* This file contains all the logic for extracting:
* first thumbnail,
Expand Down Expand Up @@ -25,7 +27,7 @@ const fs = require('fs');
import * as path from 'path';
const spawn = require('child_process').spawn;

const ffmpegPath = require('ffmpeg-static').replace('app.asar', 'app.asar.unpacked');
const ffmpegPath: string = app.isPackaged ? './resources/ffmpeg/ffmpeg' : './ffmpeg/ffmpeg';

import { GLOBALS } from './main-globals';

Expand Down
6 changes: 5 additions & 1 deletion node/main-support.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { app } from "electron"

/*
* This whole file is meant to contain only PURE functions
*
Expand All @@ -12,7 +14,9 @@ import { GLOBALS } from './main-globals'; // TODO -- eliminate dependence on `GL
import * as path from 'path';

const exec = require('child_process').exec;
const ffprobePath = require('@ffprobe-installer/ffprobe').path.replace('app.asar', 'app.asar.unpacked');

const ffprobePath: string = app.isPackaged ? './resources/ffmpeg/ffprobe' : './ffmpeg/ffprobe';

const fs = require('fs');
const hasher = require('crypto').createHash;
import type { Stats } from 'fs';
Expand Down
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading