
Recherche avancée
Médias (1)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
Autres articles (73)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (6930)
-
ffmpeg Python Subprocess Error returned non-zero exit status 1
21 avril 2019, par Varda ElberethSo I have a line here that is meant to dump frames from a movie via python and ffmpeg.
subprocess.check_output([ffmpeg, "-i", self.moviefile, "-ss 00:01:00.000 -t 00:00:05 -vf scale=" + str(resolution) + ":-1 -r", str(framerate), "-qscale:v 6", self.processpath + "/" + self.filetitles + "-output%03d.jpg"])
And currently it’s giving me the error :
'CalledProcessError: Command ... returned non-zero exit status 1'
The command python SAYS it’s running is :
'['/var/lib/openshift/id/app-root/data/programs/ffmpeg/ffmpeg', '-i', u'/var/lib/openshift/id/app-root/data/moviefiles/moviename/moviename.mp4', '-ss 00:01:00.000 -t 00:00:05 -vf scale=320:-1 -r', '10', '-qscale:v 6', '/var/lib/openshift/id/app-root/data/process/moviename/moviename-output%03d.jpg']'
But when I run the following command via ssh...
'/var/lib/openshift/id/app-root/data/programs/ffmpeg/ffmpeg' -i '/var/lib/openshift/id/app-root/data/moviefiles/moviename/moviename.mp4' -ss 00:01:00.000 -t 00:00:05 -vf scale=320:-1 -r 10 -qscale:v 6 '/var/lib/openshift/id/app-root/data/process/moviename/moviename-output%03d.jpg'
It works just fine. What am I doing wrong ? I think I’m misunderstanding the way subprocess field parsing works...
-
fragmented mp4 javascript converting
7 juin 2013, par user816004I wanted to know if there is a way to convert regular mp4 to a fragmented mp4 via javascript. (like mp4box does) Is it efficient enough (not suppose to be a complicated task) ? did anyone write something like this ?
to make it harder, can it be on the fly ? meaning I will not download the whole mp4 from the server but download in parts and convert it into fragments compatible with fragmented mp4 and mpeg-dash - I'm trying to overcome to problem to not have to use 2 different file types to play a video or do mp4box on all my library in advance.Regardless, is it possible to convert from h.264 compatible files with different containers (mov, flv etc.) to fragmented without a server ? meaning do it in the browser with javascript somehow ?
appreciate the help,
Yug -
Dealing with long conversion times on nginx, ffmpeg and Ruby on Rails
19 avril 2013, par GraemeI have developed a Ruby on Rails-based app which allows users to upload videos to one of our local servers (Ubunto 10.04 LTS). The server uses nginx.
Through the paperclip-ffmpeg gem, videos are converted to mp4 format using the ffmpeg library.
Everything appears to be working fine in production, except Rails' own 500 page (not the customised version I have provided - but that's a different issue) is displayed whenever certain videos are uploaded. Otherwise, videos are being converted as expected.
Having done a bit of investigation, I think the default 500 page is being displayed because a 502 error has occurred. I think what is happening, having uploaded the videos locally, is that some videos are taking an extensive amount of time to convert, and that an interruption is occurring on the server (I'm not a server expert by any means).
Using the excellent Railscasts episode on deployment, I use Capistrano to deploy the app. Here's the
unicorn.rb
file :root = "XXXXXXX"
working_directory root
pid "#{root}/tmp/pids/unicorn.pid"
stderr_path "#{root}/log/unicorn.log"
stdout_path "#{root}/log/unicorn.log"
listen "/tmp/unicorn.XXXXXXXXX.sock"
worker_processes 2
timeout 200And here's the
nginx.conf
file. Note thatclient_max_body_size
has been set to a fairly hefty 4Gb ! :upstream unicorn {
server unix:/tmp/unicorn.XXXXXXXXX.sock fail_timeout=0;
}
server {
listen 80 default deferred;
root XXXXXXXXX;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_read_timeout 600;
proxy_redirect off;
proxy_pass http://unicorn;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}So, my question is...how could I edit (either of) the above two files to deal with the extensive time that certain videos take to convert through ffmpeg - possibly up to an hour, 2 hours or even more ?
Should I extend
timeout
in the former and/orkeepalive_timeout
in the latter - or is there a more efficient way (given that I've no idea how long certain videos will take to convert) ?Or, is there possibly a more significant issue I should consider - e.g. the amount of memory in the server ?
I'm not an nginx/server expert, so any advice would be useful (particularly where to put extra lines of code) - however, as the rest of the app just "works", I'm not keen to make a huge amount of changes !