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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
    • ¥20 cad图纸,chx-3六轴码垛机器人
    • ¥15 移动摄像头专网需要解vlan
    • ¥20 access多表提取相同字段数据并合并
    • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
    • ¥20 Java-Oj-桌布的计算
    • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
    • ¥20 有人知道这种图怎么画吗?
    • ¥15 pyqt6如何引用qrc文件加载里面的的资源
    • ¥15 安卓JNI项目使用lua上的问题