
Recherche avancée
Autres articles (43)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)
Sur d’autres sites (6286)
-
How to get 20 screenshots from a video with tile or mosiac effect ffmpeg ?
2 octobre 2019, par NaneI am trying to get 20(Will take screens at 5%, 10%, 15%, 20%,.., of the video) screenshot which will be arranged in a single image like this Link
I found this command but it is taking screenshot based on frames like 1000 I want to get evenly distributed 20 screenshots of the entire video
ffmpeg -ss 00:00:10 -i movie.avi -frames 1 -vf "select=not(mod(n\,1000)),scale=320:240,tile=2x3" out.png
-
Evolution #4391 : Squelettes de la dist : améliorer le markup et passer à BEM
18 octobre 2019, par RastaPopoulos ♥Cela fait mal mal d’années que ça a changé, moi perso je préfère 1000 fois le truc à jour, c’est bien plus carré : ya UN caractère dédié à séparer les mots d’une même entité ("-" : mon-super-module) et UN caractère dédié à séparer les concepts BEM, block, element et modifier ("_" : mon-super-module__item_alt). Plus de mélange, c’est bien plus cohérent.
(Et ici on n’est pas dans un éditeur de code, normalement tout ça on le lit en monospace, donc ya pas de gros soucis à voir le nombre de caractères.) -
ffmpeg not returning duration, cant play video until complete. Stream images 2 video via PHP
17 février 2014, par John JI am real struggling with ffmpeg. I am trying to convert images to video, I have an ip camera which I am recording from. The recordings are mjpegs 1 frame per image.
I am trying to create a script in php so I can recreate a video from date to date, this requires inputting the images via image2pipe and then creating the video.
The trouble is, ffmpeg does return the duration and start stats, so I have no way of working out when the video is done or what percentage is done. The video won't play until its finished, and its not a very good UE.
Any ideas of how I can resolve this, the video format can be anything I am open to suggestions.
PHP :
//Shell command
exec('cat /image/dir/*.jpg | ffmpeg -y -c:v mjpeg -f image2pipe -r 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart myvids/vidname.mp4 1>vidname.txt 2>&1')
//This is loaded via javascript when the video is loaded (which is failing due to stats being wrong
$video_play = "<video width="\"320\"" height="\"240\"" src="\"myvids/vidname.mp4\"" type="\"video/mp4\"\" controls="\"controls\"" preload="\"none\""></video>";Javascript :
//Javascript to create the loop until video is loaded
<code class="echappe-js"><script><br />
$(document).ready(function() {<br />
var loader = $("#clip_load").percentageLoader();<br />
$.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh<br />
var interval = setInterval(updateProgress,1000);<br />
function updateProgress(){ $.get( "&#39;.base_url().&#39;video/getVideoCompile_Process?l=&#39;.$vid_name.&#39;-output.txt&amp;t=per", function( data ) { if(data=>\&#39;100\&#39;){ $("#clip_load").html(\&#39;&#39;.$video_play.&#39;\&#39;); clearInterval(interval); }else{loader.setProgress(data); } }); }<br />
});<br />
</script>PHP (page is called via javascript :
//This is the script which returns the current percentage
$logloc = $this->input->get('l');
$content = @file_get_contents($logloc);
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);
if ($this->input->get('t')=='per'){
echo $progress;
}else{
echo "Duration: " . $duration . "<br />";
echo "Current Time: " . $time . "<br />";
echo "Progress: " . $progress . "%";}
}else{ echo "cannot locate";}Thanks