Not Solved [How To?] gif to webm or mp4
#4
Not Solved
upload.attachemnt.php

function upload_attachment($attachment, $update_attachment=false)

.
.
.

//when gif file 

$filename = "post_".$mybb->user['uid']."_".TIME_NOW."_".md5(random_str()).".attach";
$filename = preg_replace('"\.attach$"', '.mp4', $filename);	
	
	
$ffmpeg = "/usr/bin/ffmpeg";
$gifFile = $attachment['tmp_name'];
		

$output = $mybb->settings['uploadspath']."/".$month_dir."/".$filename;

$cmd = "$ffmpeg -i $gifFile -movflags faststart -pix_fmt yuv420p -vf \"scale=trunc(iw/2)*2:trunc(ih/2)*2\" $output";	
exec($cmd);   
$attachment['name'] = $output;
.
.
.
function upload_file($file, $path, $filename="")
{
.
.
//$moved = @move_uploaded_file($file['tmp_name'], $path."/".$filename);
.
.
}


ffmpeg works.

make 7M gif file to 300KB mp4 file.

*I am using imgur, but I want to upload file directly to my server.
Reply


Messages In This Thread
gif to webm or mp4 - by Amen4747 - 2018-08-24, 03:07 PM
RE: gif to webm or mp4 - by Serpius - 2018-08-24, 08:58 PM
RE: gif to webm or mp4 - by Wires - 2018-08-25, 05:39 AM
RE: gif to webm or mp4 - by Amen4747 - 2018-08-25, 01:26 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)