mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +00:00
Fix ffmpeg binary resolution
This commit is contained in:
parent
d589168e73
commit
d0410ed244
@ -8,8 +8,9 @@ RUN apt install -y --no-install-recommends git
|
||||
RUN apt install -y --no-install-recommends ssh
|
||||
RUN apt install -y --no-install-recommends curl
|
||||
RUN apt install -y --no-install-recommends nscd
|
||||
RUN apt install -y --no-install-recommends bash
|
||||
RUN apt install -y --no-install-recommends which
|
||||
RUN apt install -y --no-install-recommends ca-certificates
|
||||
RUN apt install -y --no-install-recommends ffmpeg
|
||||
|
||||
# Create workdir
|
||||
RUN mkdir -p /comty-server
|
||||
@ -41,6 +42,12 @@ RUN /comty-server/nginx-bin -v
|
||||
RUN chmod -R 777 /comty-server
|
||||
RUN chown -R node:node /comty-server
|
||||
|
||||
# Install manual server dependencies
|
||||
RUN mkdir -p /root/.local/bin
|
||||
RUN "/comty-server/scripts/installLatestFfmpeg.sh"
|
||||
RUN mv /root/.local/bin/ffmpeg /bin/ffmpeg
|
||||
RUN mv /root/.local/bin/ffprobe /bin/ffprobe
|
||||
|
||||
# Set user to node
|
||||
USER node
|
||||
|
||||
|
@ -57,6 +57,10 @@ export class FFMPEGLib extends EventEmitter {
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!bin) {
|
||||
return reject("No binary provided")
|
||||
}
|
||||
|
||||
const process = child_process.exec(
|
||||
`${bin} ${args}`,
|
||||
{
|
||||
|
@ -108,9 +108,9 @@ export default class MultiqualityHLSJob extends FFMPEGLib {
|
||||
fs.mkdirSync(outputPath, { recursive: true })
|
||||
}
|
||||
|
||||
try {
|
||||
const inputProbe = await Utils.probe(this.params.input)
|
||||
|
||||
try {
|
||||
const result = await this.ffmpeg({
|
||||
args: cmdStr,
|
||||
cwd: outputPath,
|
||||
|
@ -105,9 +105,9 @@ export default class SegmentedAudioMPDJob extends FFMPEGLib {
|
||||
fs.mkdirSync(outputPath, { recursive: true })
|
||||
}
|
||||
|
||||
try {
|
||||
const inputProbe = await Utils.probe(this.params.input)
|
||||
|
||||
try {
|
||||
const ffmpegResult = await this.ffmpeg({
|
||||
args: segmentationCmd,
|
||||
onProcess: (process) => {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import path from "node:path"
|
||||
import fs from "node:fs"
|
||||
|
||||
import Upload from "@shared-classes/Upload"
|
||||
|
Loading…
x
Reference in New Issue
Block a user