使用php剪切flv视频 [英] To cut flv video using php
问题描述
我正在尝试提供30秒高级视频的预览(用户必须支付才能完全观看)。所以我想在上传这些视频时创建30秒的视频文件。我使用ffmpeg如下,但是它不起作用。
I am trying to provide a preview of 30 seconds of premium videos (users have to pay to watch it completely). So I want to create a video file of 30 seconds at the time of uploading these videos. I used ffmpeg as below, but it is not working.
ffmpeg -ss 00:00:00.0 -t 00:00:30.0 -i input.flv -acodec copy -vcodec copy -async 1 output.flv
ffmpeg -ss 00:00:00.0 -t 00:00:30.0 -i input.flv -acodec copy -vcodec copy -async 1 output.flv
感谢提前
推荐答案
p> @shinod,我已经在我的电脑上测试过了。这是工作。
@shinod, I have tested on my pc. this is work.
ffmpeg -ss 00:00:00.01 -t 00:00:30.00 -i input.flv -acodec copy -vcodec flv -async 1 output.flv
将 -vcodec copy
替换为 -vcodec flv
这篇关于使用php剪切flv视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!