public function handle()
{
$lowBitrateFormat = (new X264())->setKiloBitrate(500);
FFMpeg::openUrl($this->video->url) //https://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4
->exportForHLS()
->toDisk('public')
->addFormat($lowBitrateFormat)
->save($this->video->id . 'm3u8');
$this->video->update([
'converted_for_streaming_at' => Carbon::now(),
]);
}
Error ffmpeg failed to execute command C:\FFmpeg\bin\ffmpeg.EXE -y -threads 12 -i "http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4" -map 0 -vcodec libx264 -b:v 500k -g 48 -hls_playlist_type vod -hls_time 10 -hls_segment_filename "C:/xampp/htdocs/my-server/storage/app/public/37mp4_0_500_"^%"05d.ts" -master_pl_name temporary_segment_playlist_0.m3u8 -acodec aac -b:a 128k "C:/xampp/htdocs/my-server/storage/app/public/37mp4_0_500.m3u8": Error Output: Error in GnuTLS initialization: Failed to acquire random data. ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev6, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 [tcp @ 00000214eb7d3840] Failed to resolve hostname commondatastorage.googleapis.com: A non-recoverable error occurred http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4: I/O error