
Recherche avancée
Autres articles (67)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (10117)
-
Converting AWS Polly Audio Stream with fluent-ffmpeg
27 juillet 2017, par JoelI am trying to convert an audio stream from Amazon AWS Polly in Node.js using fluent-ffmpeg. The documentation says that I can convert a stream, which is what the output of Polly provides, but I am getting an "Invalid input" error.
polly.synthesizeSpeech(pollyParams, function (err, data) {
if (err) {
console.log(err)
} else {
console.log('Audio')
console.log(data)
ffmpeg().input(data.AudioStream).inputOptions(['-ac 2', '-codec:a libmp3lame', '-b:a 48k', '-ar 16000'])
}Results in :
AudioStream : }
2017-07-27T14:07:09.335Z dd75614c-72d4-11e7-b7cd-5d4425c782fc Error : Invalid input
at FfmpegCommand.proto.mergeAdd.proto.addInput.proto.input (/var/task/node_modules/fluent-ffmpeg/lib/options/inputs.js:34:15)I know the output from Polly is a valid audio stream, because I am able to save it to an S3 bucket. I would prefer to convert the stream before saving to S3, rather than saving it, picking it up from S3, converting it, and then saving it again.
Thanks for your help !
-
Install ffmpeg on elastic beanstalk using ebextensions config
27 mai 2023, par user3581244I'm attempting to install an up to date version of ffmpeg on an elastic beanstalk instance on amazon servers. I've created my config file and added these container_commands :



container_commands:
 01-ffmpeg:
 command: wget -O/usr/local/bin/ffmpeg http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-03-05.tar.gz
 leader_only: false
 02-ffmpeg:
 command: tar -xzf /usr/local/bin/ffmpeg
 leader_only: false
 03-ffmpeg:
 command: ln -s /usr/local/bin/ffmpeg /usr/bin/ffmpeg
 leader_only: false




Command 01 and 03 seems to work perfectly but 02 doesn't seem to work so ffmpeg doesn't unzip. Any ideas what the issue might be ?



Thanks,
Helen


-
PHP : Convert file with FFMPEG and upload to S3 using shell_exec() and aws cli tools
18 septembre 2017, par andreaemI need a script that handle the upload of a video file from
dropzone.js
, convert tom4v
then generate 5 thumbnails using the name of file appending-(number)
to each jpg file (eg :file-1.jpg
,file-2.jpg
,file-3.jpg
etc) and finally upload to s3 using shell_script (or maybe if there is a better way to do this).Recap
- Upload file in a temp dir
- Convert file to
.m4v
- Generate 5 thumbnails from video
- Upload the converted video to Amazon S3
- Delete local video file
Here is my code, at the moment I don’t know where the file goes and nothing seems to be uploaded to Amazon S3 (doing the upload in command-line works, so the credentials are ok).
Dropzone.js
$("#dZUpload").dropzone({
url: "/ajax/admin/admin.acceptVideo.php",
maxFilesize: 200,
renameFile: new Date,
acceptedFiles: "video/*",
addRemoveLinks: true,
success: function (file, response) {
var imgName = response; file.previewElement.classList.add("dz-success");
console.log("Successfully uploaded :" + imgName);
$('#form_video').val(file);
},
error: function (file, response) {file.previewElement.classList.add("dz-error");
}
}).autoDiscover = false;
Dropzone.prototype.defaultOptions.dictRemoveFile = "Rimuovi file";
Dropzone.on("addedfile", function(file) {
var cancelLink = Dropzone.createElement('<a>Cancel upload</a>');
file.previewElement.appendChild(cancelLink);
cancelLink.addEventListener("click", function(e) {
e.preventDefault();
myDropzone.cancelUpload(file);
});
});PHP
$target_dir = "/var/www/html/example.com/web/temp/";
$target_file = $target_dir . basename($_FILES["file"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"])) {
$check = getimagesize($_FILES["file"]["tmp_name"]);
if($check !== false) {
echo "File is a video - " . $check["mime"] . ".";
$uploadOk = 1;
} else {
echo "File is not an image.";
$uploadOk = 0;
}
}
// Check if file already exists
if (file_exists($target_file)) {
echo "Sorry, file already exists.";
$uploadOk = 0;
}
// Check file size
if ($_FILES["fileToUpload"]["size"] > 200000000) {
echo "Sorry, your file is too large.";
$uploadOk = 0;
}
// Allow certain file formats
if($imageFileType != "mp4" && $imageFileType != "mov" && $imageFileType != "avi" && $imageFileType != "m4v" ) {
echo "Sorry, only MP4 MOV AVI M4V files are allowed.";
$uploadOk = 0;
}
// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
echo "Sorry, your file was not uploaded.";
// if everything is ok, try to upload file
} else {
if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) {
S3Up(VideoConvert(basename( $_FILES["file"]["name"]),random_int('1','9999')));
echo "The file ". basename( $_FILES["file"]["name"]). " has been uploaded.";
} else {
echo "Sorry, there was an error uploading your file.";
}
}
function VideoConvert($video, $id) {
shell_exec('ffmpeg -i ' . $video . ' /var/www/html/example.com/web/temp/' . $id . '.m4v');
for ($i=0;$i <= 5;$i++) {
shell_exec('ffmpeg -i ' . $video .' -vf "select=gte(n\,' . $i .'00)" -vframes 1 ' .$id . '-' . $i. '.jpg');
}
return '/var/www/html/example.com/web/temp/' . $id . '.m4v';
}
function S3Up($video) {
shell_exec('aws s3 cp ' . $video .' s3://example-video/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers');
sleep(1);
//shell_exec('rm '. $video);
}Here is my error.log line relating to s3 upload :
error.log
example.mp4: No such file or directory
Traceback (most recent call last):
File "/usr/local/bin/aws", line 19, in <module>
import awscli.clidriver
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 17, in <module>
import botocore.session
File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 26, in <module>
import botocore.credentials
File "/usr/local/lib/python2.7/dist-packages/botocore/credentials.py", line 22, in <module>
from dateutil.parser import parse
ImportError: No module named dateutil.parser
</module></module></module></module>How can I improve this ? I’ve tried using aws php api but got some problems with credentials, cli tools don’t have.
Behavior
At the moment
dropzone.js
stop uploading at 50% if I put a file of 8 MB, php maxUploadSize directive is set to 201M, php upload temp folder is inside the site root directory and permissions set to 7777. File where uploaded if I put a smallest file of 200Kb but don’t convert and make a 0 byte file.