1
votes

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
"it is not working" is not an error description.Pekka
It is not working means it is not creating the file and the code after that line is working correctly. So I couldn't find the error.shin
Besides, this is not actually a PHP question... ^_^fresskoma
You should show the PHP code you are using, and provide some more detail about your environment.Pekka
I have used ffmpeg code as below exec("ffmpeg -sameq -ss 00:00:00.0 / -t 00:00:30.0 -i '/home/tut2pr8c/public_html/video_flv/$new_video_file_name' /home/tut2pr8c/public_html/video_flv/$file_id"."_PREMIUM_PREVIEW.flv");shin

1 Answers

3
votes

@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