I have problems with FFmpeg and Intel QuickSync. If I start my ffmpeg command from shell it works correctly. But if I want to start the same ffmpeg command from an cronjob I get Failure with quicksync
My command is:
/bin/ffmpeg -vsync passthrough -copytb 1 -hwaccel qsv -probesize 5000000 -analyzeduration 16000000 -c:v hevc_qsv -recv_buffer_size 67108864 -i source -filter_complex "[v:0]hwdownload,format=pix_fmts=nv12[format:0]; [format:0]cvdelogo=filename=file:buffer_queue_size=150:detect_interval=25:score_min=0.4:scale_min=0.75:scale_max=1.25:padding_left=10:padding_right=10:padding_top=10:padding_bottom=10[cvdelogo]; [cvdelogo]split=outputs=1[hwupload:0]; [hwupload:0]hwupload=extra_hw_frames=10[map:v:0]" -map [map:v:0] -c:v h264_qsv -flags:v +global_header+cgop -preset:v veryfast -g 250 -b:v:0 6200k -maxrate:v:0 6200k -bufsize:v:0 6200k -map a:0 -c:a copy -f hls -hls_flags delete_segments -hls_time 10 -hls_list_size 6 output.m3u8
If I run that on terminal everything works. But if I want to start it from php with shell_exec
command over an cronjob I get this failure:
[AVHWDeviceContext @ 0x2cc7b80] Failed to initialise VAAPI connection: -1 (unknown libva error). Error creating a QSV device
I don't know why FFmpeg is not founding the vaapi device from cronjob, pls help me out of this issue.
Thanks