To cut flv video using php

2019-04-16 02:39发布

问题:

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

Thanks in Advance

回答1:

@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

replace -vcodec copy to -vcodec flv



标签: php ffmpeg exec