Skip to content

Commit

Permalink
Separate temporary disk for processing HLS exports (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet authored May 12, 2022
1 parent 842db73 commit c117899
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,14 @@ jobs:

- name: Execute tests
run: vendor/bin/phpunit --stop-on-error --stop-on-failure --order-by random
if: matrix.os == 'ubuntu-20.04'
env:
FFMPEG_TEMPORARY_FILES_ROOT: ${{ github.workspace }}
FFMPEG_TEMPORARY_ENCRYPTED_HLS: /dev/shm

- name: Execute tests
run: vendor/bin/phpunit --stop-on-error --stop-on-failure --order-by random
if: matrix.os == 'windows-2019'
env:
FFMPEG_TEMPORARY_FILES_ROOT: ${{ github.workspace }}
FFMPEG_TEMPORARY_ENCRYPTED_HLS: ${{ github.workspace }}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All Notable changes to `pbmedia/laravel-ffmpeg` will be documented in this file

## 8.1.0 - 2022-05-12

- You may now specify a separate temporary disk for processing HLS exports.

## 8.0.2 - 2022-05-12

- Fix for getting the previous exception while it doesn't exist.

## 8.0.1 - 2022-02-22

- The configured temporary directory is now passed to the underlying driver.
Expand Down
2 changes: 2 additions & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@
'log_channel' => env('LOG_CHANNEL', 'stack'), // set to false to completely disable logging

'temporary_files_root' => env('FFMPEG_TEMPORARY_FILES_ROOT', sys_get_temp_dir()),

'temporary_files_encrypted_hls' => env('FFMPEG_TEMPORARY_ENCRYPTED_HLS', env('FFMPEG_TEMPORARY_FILES_ROOT', sys_get_temp_dir())),
];
4 changes: 3 additions & 1 deletion src/Exporters/EncryptsHLSSegments.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ public function withEncryptionKey($key, $filename = 'secret.key'): self
$this->encryptionIV = bin2hex(static::generateEncryptionKey());

$this->encryptionKeyFilename = $filename;
$this->encryptionSecretsRoot = app(TemporaryDirectories::class)->create();
$this->encryptionSecretsRoot = (new TemporaryDirectories(
config('laravel-ffmpeg.temporary_files_encrypted_hls', sys_get_temp_dir())
))->create();

return $this;
}
Expand Down

0 comments on commit c117899

Please sign in to comment.