4
它可以在一行中運行cropdetect和crop並從視頻中獲取大拇指嗎?ffmpeg從cropdetect獲取價值
像這樣
ffmpeg -ss 1 -i 0.flv -vf cropdetect=24:16:0,crop=w:h:x:y -vcodec mjpeg -vframes 1 -an -f rawvideo -s 240x180 0.jpg
或許需要在2線,第一次運行cropdetect,比運行農作物運行,並生成視頻縮略圖,但以這種方式,我需要從cropdetect值?
嗯,不能得到在$ cropvalue作物價值......在PHP IM運行這段代碼,但是當在COMAND在線即時通訊IM運行獲得價值 –
歐凱,即時發現解決方案..感謝反正 –
我只是創建這樣 功能'function crop($ id){$ d = shell_exec(「ffmpeg -i $ id -t 1 -vframes 1 -ss 50 -vf cropdetect -f null - 2>&1 | awk'/ crop/{return $ NF} '| tail -1「); $ array = explode('crop =',$ d); $ cropvalue = $ array [1]; $ cropvalue ='crop ='。$ cropvalue; return $ cropvalue; }' and im im new call'crop(「111.mp4」)' –