Reputation: 3463
I am using fileuploader.js
to upload a video file. Now i want to convert the video format to .mp4
. I have used ffmpeg
and php
to convert the video to .mp4
after upload. The sample segment i used is
$converted = "uploads/".$uniqid.".mp4"; //$uniqid is the id for the video after upload
$cmd = "$ffmpeg -i $sourceUrl -f mp4 $converted"; //$sourceUrl is the path of the video
I have tried to convert .flv
video file to .mp4
format and it does but the problem is i cannot see the video only hear the sound after converting. Is the conversion line used in $cmd
incorrect. Please help.
Upvotes: 0
Views: 3003
Reputation: 2017
Just ffmpeg -i source.flv output.mp4
should be enough, it will use default codecs for mp4. Can you paste the ffmpeg response to the above command?
Upvotes: 1