Common issues you might run into with this package, and how to fix them.
Error:
Error: shaka-streamer binary not found
Solution:
Install via pip:
python3 -m pip install shaka-streamer
Verify installation:
python3 -m pip show shaka-streamer
Configure in .env:
STREAMER_BINARY=shaka-streamer
Error:
Permission denied: /var/www/html/storage/app/streamer/temp
Solution:
Create directory:
mkdir -p storage/app/streamer/temp
chmod 755 storage/app/streamer/temp
Set proper ownership:
sudo chown -R www-data:www-data storage/app/streamer/temp
Or configure alternate path in config/streamer.php:
'temporary_files_root' => storage_path('app/streamer/temp'),
Error:
No space left on device
Solution:
Check disk space:
df -h storage/app/streamer/temp
Clean up old temporary files:
find storage/app/streamer/temp -mtime +7 -delete
Configure to use alternative disk:
STREAMER_TEMPORARY_FILES_ROOT=/mnt/alternate-disk/streamer-temp
Error:
InsufficientStorageException: Insufficient storage space in [/dev/shm]: 31457280 bytes free, 1073741824 bytes required.
Unlike "No space left on device" above, this error is thrown before packaging starts, by a deliberate pre-flight check (see Storage space guards). Nothing ran yet, so there's nothing to clean up.
Solution:
temporary_files_root or cache_files_root is a size-limited mount
(e.g. a tmpfs), free up space or make it bigger.STREAMER_TEMPORARY_MIN_FREE /
STREAMER_CACHE_MIN_FREE (in bytes; 0 disables the check).Error:
The process timed out
Solution:
Increase timeout in .env:
STREAMER_TIMEOUT=28800 # 8 hours
Check server PHP configuration:
php -r "echo ini_get('max_execution_time');"
Adjust if necessary:
set_time_limit(0); // Unlimited for CLI
Error:
Log channel not working
Solution:
Verify logging is enabled:
STREAMER_LOG_CHANNEL=streamer
Ensure channel exists in config/logging.php:
'channels' => [
'streamer' => [
'driver' => 'daily',
'path' => storage_path('logs/streamer.log'),
'level' => 'debug',
'days' => 14,
],
],
Check directory permissions:
chmod 755 storage/logs
Check that your configuration is correct:
php artisan streamer:info
For more detailed information:
STREAMER_LOG_CHANNEL=streamer
APP_DEBUG=true
Reset the configuration cache:
php artisan config:clear
php artisan cache:clear
Check that the streamer binary can actually run:
use Foxws\Streamer\Support\ShakaStreamer;
$driver = ShakaStreamer::create();
$version = $driver->getVersion();
echo "Streamer Version: {$version}";
If the problem doesn't go away:
storage/logs/streamer.logphp artisan tinker