quasarstream / PHP-FFmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg

Home Page:https://www.quasarstream.com/op/php/ffmpeg-streaming?u=php-ff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error splitting the argument list: Option not found

askinucuncu opened this issue · comments

the code i use;

$config = [
'ffmpeg.binaries' => '/usr/bin/ffmpeg',
'ffprobe.binaries' => '/usr/bin/ffprobe',
'timeout' => 3600,
'ffmpeg.threads' => 12,
];

	$log = new Logger('FFmpeg_Streaming');
	$log->pushHandler(new StreamHandler('/var/log/ffmpeg-streaming.log')); // path to log file

	$ffmpeg = FFMpeg::create($config, $log);

	$video = $ffmpeg->open(public_path("**")."/video.mp4");

	$video->dash()
->setAdaption('id=0,streams=v id=1,streams=a')
->x264()
->autoGenerateRepresentations()
->save(public_path("**"));

the error i got;

ffmpeg failed to execute command '/usr/bin/ffmpeg' '-y' '-i' '/var/www/vhosts/.com/..com///video.mp4' '-c:v' 'libx264' '-c:a' 'aac' '-bf' '1' '-keyint_min' '25' '-g' '250' '-sc_threshold' '40' '-use_timeline' '1' '-use_template' '1' '-init_seg_name' 'video_init_$RepresentationID$.$ext$' '-media_seg_name' 'video_chunk_$RepresentationID$_$Number%05d$.$ext$' '-seg_duration' '10' '-hls_playlist' '0' '-f' 'dash' '-adaptation_sets' 'id=0,streams=v id=1,streams=a' '-map' '0' '-s:v:0' '256x144' '-b:v:0' '1251k' '-map' '0' '-s:v:1' '426x240' '-b:v:1' '1460k' '-map' '0' '-s:v:2' '640x360' '-b:v:2' '1752k' '-map' '0' '-s:v:3' '854x480' '-b:v:3' '2190k' '-map' '0' '-s:v:4' '1280x720' '-b:v:4' '2920k' '-map' '0' '-s:v:5' '1920x1080' '-b:v:5' '4381k' '-strict' '-2' '-threads' '12' '/var/www/vhosts/.com/.*.com//**/video.mpd': Error Output: ffmpeg version 3.4.9 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Unrecognized option 'seg_duration'. Error splitting the argument list: Option not found

Your FFmpeg version is too old(ffmpeg version 3.4.9). Update the FFmpeg run it again