Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cravnmore's avatar

Laravel FFmpeg package and FFMPEG log channel

Trying to figure out how to output the ffmpeg log info to a different channel other than laravel.log

The config/ laravel-ffmpeg file only seems to have 'enable_logging' => false, as an option. Looking to send the output to a ffmpeg channel that create a ffmpeg.log file for it

0 likes
1 reply
LaryAI's avatar
LaryAI
AI
Best Answer
Level 58

You can create a custom log channel in Laravel and then configure the Laravel FFmpeg package to use that channel for logging. Here are the steps:

  1. Create a new log channel in your config/logging.php file. For example, you can add the following code to create a new channel called ffmpeg:
'channels' => [
    // ...
    'ffmpeg' => [
        'driver' => 'single',
        'path' => storage_path('logs/ffmpeg.log'),
        'level' => 'debug',
    ],
],
  1. Update your config/laravel-ffmpeg.php file to use the new ffmpeg channel for logging. Set the log_channel option to ffmpeg, like this:
'enable_logging' => true,
'log_channel' => 'ffmpeg',
  1. That's it! Now, when you use the Laravel FFmpeg package, it will log all output to the ffmpeg.log file in your storage/logs directory.

Note: Make sure that the storage/logs directory is writable by your web server.

Please or to participate in this conversation.