0
ffmpegを使ってビデオからサムネイルを取得しました。今すぐサムネイルがルートフォルダのプロジェクトディレクトリに保存されていますが、そのフォルダを特定のフォルダに移動します。どうやってするか?私は、次を使用してサムネイルを得ました...サムネイルを移動してcodeigniterのフォルダを指定する方法
<!DOCTYPE html>
<html>
<body>
<form action="upld.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload" name="submit">
</form>
<?php
if(isset($_POST['submit'])){
$ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg";
$videoFile = $_FILES["fileToUpload"]["tmp_name"];
$imageFile = "4.jpg";
$size = "120*90";
$getFromSecond = 5;
$cmd = "$ffmpeg -i $videoFile -an -ss $getFromSecond -s $size $imageFile";
if(!shell_exec($cmd)){
echo "Thumbnail created";
} else {
echo "error while Thumbnail creating";
}
}
?>
</body>
</html>