Im getting error “deprecated pixel format used, make sure you did set range correctly using ffmpeg”.. can someone check my code below?

前端 未结 2 1039
闹比i
闹比i 2020-12-17 09:49

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         


        
2条回答
  •  独厮守ぢ
    2020-12-17 10:04

    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");  
    

提交回复
热议问题