dte49889 2015-12-08 06:41
浏览 289

FFMPEG图像调整大小不起作用

FFmpeg version 0.6.5 is installed on my web server.

In my website mp4 videos allowed to upload, that part is done. Now i am working on create a thumbnail of the video and then resize it.

The following links are I referred.

https://trac.ffmpeg.org/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video

https://trac.ffmpeg.org/wiki/Scaling%20(resizing)%20with%20ffmpeg

This is the command i used to create a thumbnail from video, this command is working.

$cmd = "ffmpeg -i test.mp4 -ss 0 -vframes 1 out.png";

After creating the thumbnail, I tried the following the command to resize it, but this is not working.

$cmd = 'ffmpeg -i out.png -vf scale=210:-1 output_320x240.png';

And Some other commands i have tried

$cmd = "ffmpeg -ss 10 -i test.mp4 -vframes 1 -filter scale=-1:150,crop=200:150 output.jpg";

$cmd = "ffmpeg -itsoffset -1 -i test.mp4 -vframes 1 -filter:v scale=280:-1 output.jpg";

In my localhost I used the following command to create thumbnail and resize in a single command, but this is also not working in the server.

$ffmpeg = 'C:\\ffmpeg\\bin\\ffmpeg';
$video = 'test.mp4';
$cmd = "$ffmpeg -itsoffset -1 -i $video -vframes 1 -filter:v scale=\"210:-1\"  thumbnail.png";

Thanks to all

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 vmware exsi重置后登不上
    • ¥15 易盾点选的cb参数怎么解啊
    • ¥15 MATLAB运行显示错误,如何解决?
    • ¥15 c++头文件不能识别CDialog
    • ¥15 Excel发现不可读取的内容
    • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
    • ¥20 yolov5自定义Prune报错,如何解决?
    • ¥15 电磁场的matlab仿真
    • ¥15 mars2d在vue3中的引入问题
    • ¥50 h5唤醒支付宝并跳转至向小荷包转账界面