
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (58)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)
Sur d’autres sites (7538)
-
PHP & FFMPEG running on AWS worker finishes 2/3 of operations properly then fails
1er novembre 2016, par jreikesI have a PHP application (using the Laravel 5.3 framework) that performs several operations on video after upload (transcoding, thumbnail generation, etc.). Everything works great locally. But it works a little differently in AWS and that seems to be causing problems.
In AWS, uploads go to S3, then the EC2 workers pull those files into a local temp folder, perform about 8 operations with FFMPEG via
shell_exec()
(storing the results into the temp folder), then transfer the finished files back to S3. The first 6 operations (which are related to transcoding) finish properly. The last 2 operations (which create thumbnails) usually fail (about 1/10 times I test it, the whole thing works — inexplicably).I have a
WorkingCopy
class to give me relative and fully qualified paths, as needed, and to automatically delete temp files after completion. I also have aColdStroage
class to handle the S3 data. All 8 FFMPEG operations are structured the same way using this class.In trying to troubleshoot the problem, I tried running the FFMPEG thumbnail generation via SSH and found that it was failing. It’s this error :
[image2 @ 0x2e43320] Could not open file : path/filename.png
av_interleaved_write_frame(): Input/output errorhttps://trac.ffmpeg.org/wiki/Errors explains that this happens when the destination folder doesn’t exist. But, while testing via SSH, I was getting this error even when the destination folder existed. If I
CHMOD 777
the destination folder, the operation completes successfully via SSH.Seems simple enough, right ? Thing is, my
WorkingCopy
class creates the temp folder withmkdir($folderName, 0777, true)
— so the folders should already be 777. They actually don’t appear to be truly 777 when I check them via SSH, but still — why do the first 6 operations work ? Just to be sure this wasn’t the issue, I added aCHMOD
to my script just before thumbnail creation and it still failed.Here’s one more weird thing... If I comment out those last two FFMPEG operations, then transcoding (the preceding operation) fails. Based on that, I thought maybe the file system needs a moment to finish writing the FFMPEG output before proceeding, so I added
sleep(5)
before the end of the script. It still doesn’t work.I can’t share the full code publicly, but here’s the general format of the FFMPEG calls
$pathForLargeThumbnails = 'large_thumbnails';
$thumbnailLargeWorkingCopy = new WorkingCopy($pathForLargeThumbnails);
$thumbnailLarge = new ColdStorage($pathForLargeThumbnails);
$shellErrors .= shell_exec(
"/usr/local/bin/ffmpeg/ffmpeg"
. " -loglevel error"
. " -i " . "\"" . $originalVideoStream->fullPath . "\""
. " -y"
. " -vf thumbnail -frames:v 1"
. " \"" . $thumbnailLargeWorkingCopy->fullPath . "\""
);
$thumbnailLarge->put($thumbnailLargeWorkingCopy->get());Anyone know why this succeeds 6 times and then fails twice at the end ?
-
FFMPEG return No such file or directory when running by cronJob
23 décembre 2015, par salinaI’m trying to convert a video to MP4 .The problem is if I run the page manually it convert the video but If cron job runs the page to convert the video it returns this :
ffmpeg version 0.11 Copyright (c) 2000-2012 the FFmpeg developers built on Nov 19 2015 08:42:01 with gcc 4.4.7 20120313 (Red Hat 4.4.7-16) configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvpx --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-libtheora libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 vids_temp/147770505972365.mp4: No such file or directory
this is the line I use for converting :
$command = "$this->ffmpegAddress -i $this->input -y -c:v libx264 $outPut 2>&1";
Why does it return :
vids_temp/147770505972365.mp4: No such file or directory
if I run it by cronjob ?Thanks
-
Using ffmpeg via Popen running extremely slow in python
30 décembre 2016, par lawI’m writing a script that batch processes video in python. Basically, it takes a .dv file turns it into .avi and the captures only the audio in .wav format. Command line use of ffmpeg on a mac terminal executes on the order of a second or so. But when I use Popen to run the same code from within python, each file takes multiple minutes. Not sure why...I think I may be using Popen inappropriately. Code listed below :
command1 = ['ffmpeg', '-i', input_name, '-y', '-vcodec', 'h264', 'temp.avi']
command2 = ['ffmpeg', '-i', 'temp.avi', '-ab', '160k', '-ac', '44100', '-vn', outfile]
proc1 = subprocess.Popen(command1, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
proc1.communicate()
print "Converted to avi"
proc2 = subprocess.Popen(command2, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
proc2.communicate()
print "Wavefile extracted"