mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Fix transcoding errors in readonly docker containers
ffmpeg seems to create some temporary files in the cwd. When PeerTube is run in a read-only docker container, this causes all transcoding to fail. As a workaround, we set the cwd to the configured tmp dir.
This commit is contained in:
parent
e0f31bc9ce
commit
313921b50f
3 changed files with 7 additions and 6 deletions
|
@ -270,7 +270,8 @@ type TranscodeOptions =
|
|||
function transcode (options: TranscodeOptions) {
|
||||
return new Promise<void>(async (res, rej) => {
|
||||
try {
|
||||
let command = ffmpeg(options.inputPath, { niceness: FFMPEG_NICE.TRANSCODING })
|
||||
// we set cwd explicitly because ffmpeg appears to create temporary files when trancoding which fails in read-only file systems
|
||||
let command = ffmpeg(options.inputPath, { niceness: FFMPEG_NICE.TRANSCODING, cwd: CONFIG.STORAGE.TMP_DIR })
|
||||
.output(options.outputPath)
|
||||
|
||||
if (options.type === 'quick-transcode') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue