
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (20)
-
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (4555)
-
PHP - Read and write the same file hangs
2 février 2016, par AdracatI’m trying to use FFMPEG to make some works with video on the server, and something I need to do is to get the progress of the process.
I searched a little and I found this solution which tells to write the log into a file and then reading and parsing it.
The problem
What is driving me crazy is that I tell FFMPEG - with
exec
- (process A) to write the log into a file, but when I try to read it - withfile_get_contents()
- (process B) it does not show the contents until process A is finished (or interrupted the PHP script).So, when process A finishes or it says "PHP script timeout", then I can read the file as times as I want, refreshing the page (process B) and showing the contents at the time.
What I’ve tried
I’ve tried to use
fopen()
to create the file withw
,w+
anda
parameters, using - and without using -fclose()
. I’ve tried to use alsoflock()
just in case it gets faster to read to process B if it knows it’s already locked and does not have to wait, but then FFMPEG is not able to write into the file.I’ve searched for multithreading too, but I think there must be an easier and simpler way.
I’ve used also CURL and HTTP context, as this link suggests, but no luck.
I’ve tried, too, to use PHP-FFMPEG but it’s not supporting the last FFMPEG version, so I cannot use it.
When I said before "(or interrupted the PHP script)" is because I tried to wait and, when PHP got a timeout, process B worked alright and the file was still updating.
The code
Process A (fileA.php)
exec('ffmpeg -y -i input_file.mp4 output_file.avi 2> C:\Full\Path\To\File\log.txt 1>&2');
Process B (fileB.php)
$content = file_get_contents($file);
if($content){
//get duration of source
preg_match("/Duration: (.*?), start:/", $content, $matches);
$rawDuration = $matches[1];
//rawDuration is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawDuration));
$duration = floatval($ar[0]);
if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;
//get the time in the file that is already encoded
preg_match_all("/time=(.*?) bitrate/", $content, $matches);
$rawTime = array_pop($matches);
//this is needed if there is more than one match
if (is_array($rawTime)){$rawTime = array_pop($rawTime);}
//rawTime is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawTime));
$time = floatval($ar[0]);
if (!empty($ar[1])) $time += intval($ar[1]) * 60;
if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;
//calculate the progress
$progress = round(($time/$duration) * 100);
echo "Duration: " . $duration . "<br />";
echo "Current Time: " . $time . "<br />";
echo "Progress: " . $progress . "%";
}The process
I just open
fileA.php
on a Chrome tab and, after a few seconds, I openfileB.php
on another Chrome tab (and it stays as loading).What I need
I need to be able to load the file and show the information I want to show while the file is being written (by
exec
andFFMPEG
or other PHP scripts), so I can update the progress percentage with some AJAX calls.Extra information
At this point, I’m using PHP 5.4 on a IIS 7.5 with Windows 7 Professional.
Thank you everyone for your time, help and patience !
Best regards.
-
Evolution #4720 : [css vars] Utiliser nos variables CSS dans le thème de l’espace privé
27 avril 2021Ah oui bien les astuces à base de —spip-is-ltr.
Pour compléter sur le sujet des propriétés de positionnement, dans le futur, pour avoir le support complet quelque soit la direction (horizontale ou verticale) il faudra définir le writing-mode : https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode
Valeur qu’il faudrait pouvoir récupérer en fonction du code de langue, donc.
D’après ce que j’ai compris, en son absence ça se repose sur la direction du document (dir="rtl"), donc c’est bon pour les langues à l’horizontale.Bref, on a donc pris un peu d’avance et commencé à utiliser tout de suite des variables CSS.
Le choix s’est fait un peu tout seul : ça simplifie énormément la tâche, surtout en l’absence de préprocesseur, et ça permet d’unifier et maintenir plus facilement tous les composants.Par contre avant de poursuivre, il faudrait peut-être faire un petit point d’étape, voir rédiger des guidelines pour ne pas assister à une hyper-inflation de ces variables, et qu’elles ne soient pas utilisées à tord et à travers dans tous les sens.
La règle que j’ai suivie jusqu’à présent :
- Des variables globales
--spip-xxx
, de portée générale et utilisables partout : couleurs, propriétés de texte, arrondis des blocs, gouttières, etc. - Et pour chaque composant, quelques variables qui lui sont propres :
--composant-xxx
. À quelques exceptions près, elles ne devraient pas être utilisées en dehors. J’essaie de limiter le nombre en général, une dizaine au max (sauf pour les boutons, un cas spécial).
Enfin, il y a 2 variables globales bien importantes qu’il va falloir mettre au point : ce sont celles qui définissent les gouttières horizontales et verticales. Importantes cas après, chaque composant se basera dessus pour ses propres besoins, et au final on aura des espacements bien harmonisés et facilement contrôlables.
Il peut s’agit d’une mesure arbitraire, mais en général pour la gouttière horizontale on prend l’équivalent d’une hauteur de ligne, c’est à dire
font-size * line-height
à la racine du document.
Je l’ai ajoutée en prévision (spip-spacing-y
), sauf que pour l’instant elle est pas trop utilisable : le font-size qu’on reçoit dans l’env est pas celui qui est utilisé sur le body, donc ça fausse toutes les mesures. Le font-size du body est redéfini plusieurs fois d’affilée, c’est le bordel. Bref, encore des choses à mettre au point. - Des variables globales
-
Listes des utilisateurs
3 août 2018Bonjour,
J’utilise Inscription3 pour nombreux de mes sites associatifs, et je dois dire que cela me rends un fier service ;)
Je souhaite vous signaler un problème gênant sur mes sites (SPIP 3.2.1) et Inscriptions 3 (3.6.10) sur un hébergement PHP 7 , je signale que sur PHP 5.6, ca ne bronche pas ;)Il s’agit de l’affichage du tableau des utilisateurs dans la page /ecrire/ ?exec=inscription3_adherents
-
Fatal error : Uncaught Error : [] operator not supported for strings in /plugins/auto/inscription3/v3.6.10/inscription3_pipelines.php :45
-
Stack trace :
-
#0 /ecrire/inc/utils.php(199) : inscription3_i3_exceptions_des_champs_auteurs_elargis(’’)
-
#1 /tmp/cache/charger_pipelines.php(1821) : minipipe(’inscription3_i3...’, ’’)
-
#2 /ecrire/inc/utils.php(265) : execute_pipeline_i3_exceptions_des_champs_auteurs_elargis(’’) #3 /ecrire/public/composer.php(92) : eval()’d code(21) : pipeline(’i3_exceptions_d...’, ’’)
-
#4 /ecrire/public/parametrer.php(128) : html_c82499a2fcaabaa96c6e17846b3e8fb5(Array, Array)
-
#5 /ecrire/public/assembler.php(314) : public_parametrer_dist(’prive/table_adh...’, Array, ’c3dff9893db4337...’, NULL)
-
#6 /srv/data/web/vhos in /plugins/auto/inscription3/v3.6.10/inscription3_pipelines.php on line 45
Je tiens à signaler que j’utilise beaucoup de champs extras... Et que même si j’apprécie énormément que ce plugin (Champs extra) soit pris en charge, je note malgré tout un certain nombre de point à améliorer de ce côté la, je pourrais les lister si vous le souhaitez.
Merci d’avance pour votre assistance !
Cordialement,
Jul -