This is my code using ffmpeg i want to have video thumbnail but im not familiar in ffmpeg can someone know the error i got.
[swscaler @ 0x7ff8da028c00] depre
I just change the path of the destination of the image:
# path of image on the server
$image = '/users/xx/xxxx/sample/upload/image.jpg';
Then used the following:
# $ffmpeg - path of ffmpeg on the server
# $video_url - path of the video file on the server
shell_exec($tmp = "$ffmpeg -i $video_url -pix_fmt yuvj422p -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1");
According to ffmpeg forum this can be ignored when called from the command line and i always ignored it. One thing you can try (test with a dummy file PLEASE) is to add -pix_fmt yuvj422p
to your last line so it look like this:
shell_exec($tmp = "$ffmpeg -i $video_url -pix_fmt yuvj422p -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1");
As i said, test it please as i cannot guaratee the results but as far as i'm concerned i'Ve used ffmpeg thousand of times and everything looks just fine even with the warning.
https://lists.ffmpeg.org/pipermail/ffmpeg-user/2014-February/020151.html
Afaict, the warning is primarily meant for library users, ffmpeg users should not be affected.
OK, will just ignore it then.