
Recherche avancée
Autres articles (59)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...)
Sur d’autres sites (6341)
-
How to create movie screenshot by ffmpeg in an amazon S3 path
5 décembre 2019, par user2004082I tried to create using ffmpeg a video screenshot from a remote video url in heroku console. Below is how I generated a movie instance and can see also an empty ready to be written file at S3. But the last line movie.screenshot is not working and generates this error :
FFMPEG::Error: Failed encoding.Errors: no output file created
Here is the code
s3 = Aws::S3::Resource.new(region: 'us-west-1')
bucket = s3.bucket("ruby-sample-kb-#{SecureRandom.uuid}")
bucket.create
object = bucket.object('ex-vid-test-kb.jpg')
object.put(acl: "public-read-write")
path = object.public_url
movie = FFMPEG::Movie.new("https://www.googleapis.com/download/storage/v1/b/seppoav/o/3606137_51447286560__56BAF29C-05CB-4223-BAE6-655DF2236321.MOV?generation=1492780072394755&alt=media")
movie.screenshot(path, :seek_time => 2)I also tried the following line just if it should be written via put. What am I missing here ?
object.put(acl: "public-read", body: movie.screenshot(path, :seek_time => 2))
-
SIGSEGV from ffmpeg on Amazon Lambda
1er août 2024, par SergeTrying out Amazon Lambda / nodejs 8. My goal is to launch ffmpeg, generate a short clip and upload it to S3 bucket.



I created the function following the image resize tutorial. Edited the code to get output from simple linux commands like
ls
orcat /proc/cpuinfo
- all works.


Now, added the ffmpeg binary for i686 - ffmpeg static build by JohnVan Sickle (thanks !). Changed the code to launch simple ffmpeg command that is supposed to create sa 2-seconds small video clip.



That fails, according to logs, with the signal
SIGSEGV
returned to the "close" event handler of child_process.spawn()


As far as I understand, this could be caused by the ffmpeg binary incompatibility with the static build. Or by some mistake in my code.



Several npm modules rely on the static builds from johnvansickle.com/ffmpeg and there are no such issues filed on their github. Maybe there's some other mistake I made ?



Should I compile ffmpeg myself under Amazon Linux AMI
amzn-ami-hvm-2017.03.1.20170812-x86_64-gp2
which is under the hood of AWS Lambda ?




upd. Launched EC2 t2.micro instance from the same AMI, downloaded the same ffmpeg static build, and it works just fine from the command line. Now I doubt that it is a compilation issue.



Also tried copying ffmpeg executable to
/tmp/ffmpeg
andchmod 755
just to make sure.
Running simpleffmpeg --help
command viachild_process.execSync()
returns "Error : Command failed : /tmp/ffmpeg —help"




const join = require('path').join;
const tmpdir = require('os').tmpdir;
const process = require('process');
const fs = require('fs');
const spawn = require('child_process').spawn;
const exec = require('child_process').exec;

const async = require('async');
const AWS = require('aws-sdk');
const util = require('util');

process.env['PATH'] = process.env['PATH'] + ':' + process.env['LAMBDA_TASK_ROOT'];


const tempDir = process.env['TEMP'] || tmpdir();
const filename = join(tempDir, 'test.mp4');
const s3 = new AWS.S3();


exports.handler = function(event, context, callback) {
 var dstBucket = srcBucket + "resized";
 var dstKey = "render-test.mp4";

 async.waterfall([
 function transform(next) {
 var args = [
 '-filter_complex',
 '"testsrc=r=25:s=640x480:d=3"',
 '-an',
 '-y',
 '-hide_banner',
 '-c:v', 'libx264',
 filename,
 ];

 console.log("Will launch ffmpeg");
 const childProcess = spawn('ffmpeg', args);

 childProcess.on('close', function(e) {
 console.log('ffmpeg close event: ' + JSON.stringify(arguments));
 next();
 });

 console.log("After launched ffmpeg");
 },

 function upload(next) {
 ...
 }
 ], function (err) {
 ...
 });
};



-
PHP - Upload video convert mp4 and upload to Amazon S3
31 octobre 2019, par Kadir GeçitI’m using amazon s3 as video storage for my website. I’m having problems for some videos. black screen or sound problems etc.
I want to convert the video to mp4 format after uploading the video to my server and then upload it to amazon. Is it possible with FFMPEG ?
I’m using this code for uploading files now :
$file1 = $_FILES['file']['name'];
$videoFileType = strtolower(pathinfo($file1,PATHINFO_EXTENSION));
$file_name = sprintf('%s_%s', uniqid(),uniqid().".".$videoFileType);
$temp_file_location = $_FILES["file"]["tmp_name"];
require 'application/libraries/Amazon/aws-autoloader.php';
$s3 = new Aws\S3\S3Client([
'region' => $amazon_region,
'version' => 'latest',
'credentials' => [
'key' => $amazon_key,
'secret' => $amazon_secret,
]
]);
$result = $s3->putObject([
'Bucket' => $amazon_bucket,
'Key' => $file_name,
'SourceFile' => $temp_file_location,
'ACL' => 'public-read',
'CacheControl' => 'max-age=3153600',
]);
$filepath = $result['ObjectURL'] . PHP_EOL;
echo json_encode([
'status' => 'ok',
'path' => $filepath
]);