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.
Just
ffmpeg -i source.flv output.mp4should be enough, it will use default codecs for mp4. Can you paste the ffmpeg response to the above command?