
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 (97)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)
Sur d’autres sites (5818)
-
ffmpeg progess bar not giving percent
3 décembre 2014, par BrettHi im trying to create a java program that shows the percent of a ffmpeg command , Im not sure where i am going wrong.
Its keeps giving me these results
run :
Total duration : 857.44 seconds.
Progress : 0.85%
Progress : 1.76%
Progress : 2.79%
Progress : 3.93%
Progress : 5.04%
Progress : 6.21%
Progress : 6000.27%
Progress : 6001.29%
Progress : 6002.46%
Progress : 6003.58%
Progress : 6004.59%
Progress : 6005.70%
Progress : 6006.77%
Progress : 12000.86%
Progress : 12001.97%
Progress : 12002.97%
Progress : 12004.03%
Progress : 12005.15%
Progress : 12006.27%
Progress : 18000.34%
Progress : 18001.46%
Progress : 18002.29%
Progress : 18003.41%
Progress : 18004.41%
Progress : 18005.50%
Progress : 18006.55%
Progress : 24000.52%
Progress : 24001.62%
Progress : 24002.74%
Progress : 24003.69%
Progress : 24004.76%
Progress : 24005.88%
Progress : 24006.94%
Progress : 30001.01%
Progress : 30002.16%
Progress : 30003.24%
Progress : 30004.25%
Progress : 30005.37%
Progress : 30006.44%
Progress : 36000.56%
Progress : 36001.60%
Progress : 36002.69%
Progress : 36003.73%
Progress : 36004.81%
Progress : 36005.93%
Progress : 42000.05%
Progress : 42001.18%
Progress : 42002.30%
Progress : 42003.41%
Progress : 42004.50%
Progress : 42005.60%
Progress : 42006.72%
Progress : 48000.84%
Progress : 48001.96%
Progress : 48003.08%
Progress : 48004.18%
Progress : 48005.09%
Progress : 48006.16%
Progress : 54000.22%
Progress : 54001.15%
Progress : 54002.20%
Progress : 54003.30%
Progress : 54004.42%
Progress : 54005.49%
Progress : 54006.38%
Progress : 60000.45%
Progress : 60001.57%
Progress : 60002.55%
Progress : 60003.64%
Progress : 60004.66%
Progress : 60005.62%
Progress : 60006.72%
Progress : 66000.67%
Progress : 66001.73%
Progress : 66002.75%
Progress : 66003.61%
Progress : 66004.71%
Progress : 66005.82%
Progress : 66006.81%
Progress : 72000.67%
Progress : 72001.73%
Progress : 72002.80%
Progress : 72003.87%
Progress : 72004.81%
Progress : 72005.71%
Progress : 72006.69%
Progress : 78000.73%
Progress : 78001.82%
Progress : 78002.91%
Progress : 78003.91%
Progress : 78004.98%
Progress : 78005.88%
Progress : 78006.49%
Progress : 84000.37%
Progress : 84001.12%
Progress : 84002.04%
BUILD SUCCESSFUL (total time : 49 seconds)But the file is created , i don’t know why im getting 0.00% any help would be awsome
..
It also complains some imports a not being used here are the imports.here is my code
import java.io.IOException;
import java.util.Scanner;
import static java.util.logging.Level.parse;
import java.util.regex.Pattern;
import javafx.util.Duration;
import static javax.management.Query.lt;
/**
*
* @author brett
*/
public class MashMeUp {
public static void main(String[] args) throws IOException {
ProcessBuilder pb = new ProcessBuilder("ffmpeg", "-i", "C:\\Users\\brett\\Documents\\Telegraph_Road.mp4", "C:\\Users\\brett\\Documents\\out.mp4");
// ProcessBuilder pb = new ProcessBuilder(args);
final Process p = pb.start();
// create a new thread to get progress from ffmpeg command , override
// it's run method, and start it!
new Thread() {
public void run() {
Scanner sc = new Scanner(p.getErrorStream());
// Find duration
Pattern durPattern = Pattern.compile("(?<=Duration: )[^,]*");
String dur = sc.findWithinHorizon(durPattern, 0);
if (dur == null) {
throw new RuntimeException("Could not parse duration.");
}
String[] hms = dur.split(":");
double totalSecs = Integer.parseInt(hms[0]) * 3600
+ Integer.parseInt(hms[1]) * 60
+ Double.parseDouble(hms[2]);
System.out.println("Total duration: " + totalSecs + " seconds.");
// Find time as long as possible.
Pattern timePattern = Pattern.compile("(?<=time=)[\\d:.]*");
// TODO make regex that works with ffmpeg static build
String match;
String[] matchSplit;
while (null != (match = sc.findWithinHorizon(timePattern, 0))) {
matchSplit = match.split(":");
double progress = Double.parseDouble(matchSplit[2]) / totalSecs + Integer.parseInt(matchSplit[0]) * 3600 + Integer.parseInt(matchSplit[1]) * 60;
System.out.printf("Progress: %.2f%%%n", progress * 100);
}
}
}.start();
}
} -
Matplotlib : Live animation works fine but displays a blank plot when being saved
18 juillet 2017, par Loïc PoncinI made a little forest fire animation. My code is at the end of the question.
Here is some information before I ask my question :
- No tree :
forest[i,j] = 0
- A tree :
forest[i,j] = 1
- A tree on fire :
forest[i,j] = 2
Basically what happens is that
constructforest
creates a 2 dimensional array calledforest
of size n by m with a probability of tree occupancy called p. After thatsetonfire
sets on fire theforest
and while theforest
can burnspreadfire
spread the fire.When I run
forestfire
with thePython prompt
or theIPython prompt
I get a nice animation but when I go check the video file that I saved I only see a blank plot.I did some research, I found many questions about this issue but none of the advice I read was helpful :
- matplotlib animation produces a blank
- Matplotlib animation not working in IPython Notebook (blank plot)
- Animation from matplotlib not working in spyder
- Spyder Python Animation not working
Can someone tell me what is going on please ?
forestfire.py
from random import random
import numpy as np
import matplotlib.pylab as plt
import matplotlib.colors as mcolors
import matplotlib.animation as animation
def hazard(p):
r=random()
assert p>=0 and p<=1
return r <= p
def constructforest(n,m,p):
forest = np.zeros((n,n))
for i in xrange(n):
for j in xrange(m):
if hazard(p):
forest[i,j] = 1
return forest
def setfire(forest,i,j):
forest[i,j] = 2
return forest
def spreadfire(forest):
n,m=forest.shape
c = np.copy(forest)
for i in xrange(n):
for j in xrange(m):
if c[i,j] == 1:
Y, X = xrange(max(0,i-1),min(n,i+2)), xrange(max(0,j-1),min(m,j+2))
for y in Y:
for x in X:
if c[y,x] == 2:
forest[i,j] = 2
return forest
def canburn(forest):
n,m=forest.shape
c = np.copy(forest)
for i in xrange(n):
for j in xrange(m):
if c[i,j] == 1:
Y, X = xrange(max(0,i-1),min(n,i+2)), xrange(max(0,j-1),min(m,j+2))
for y in Y:
for x in X:
if c[y,x] == 2:
return True
return False
def forestfire(forest):
fig, ax = plt.subplots()
movie = []
# Colormap
red, green, blue = [(1,0,0,1)], [(0,1,0,1)], [(0,0,1,1)]
colors = np.vstack((blue, green, red))
mycmap = mcolors.LinearSegmentedColormap.from_list('my_colormap', colors)
# Initialization
k = 0
forest = spreadfire(forest)
im = plt.imshow(forest, animated=True, cmap = mycmap, interpolation="none", origin='lower')
movie.append([im])
# Fire propagation
while canburn(forest):
k += 1
print k
forest = spreadfire(forest)
im = plt.imshow(forest, animated=True, cmap = mycmap, interpolation="none", origin='lower')
movie.append([im])
return animation.ArtistAnimation(fig, movie, blit=True, repeat_delay=100)
ani = forestfire(setfire(constructforest(101,101,0.4),50,50))
ani.save("forestfire_test.mp4", writer = 'ffmpeg', fps=5, dpi=500)EDIT
As requested by @Y.Luo by @ImportanceOfBeingErnest in the comments I downgraded matplotlib to 2.0.0 and I changed the framerate of the animation but
forestfire_test.mp4
still displays a blank plot. - No tree :
-
Revision 104961 : déclencher un événement quand le js qui gère afficher_si est chargé. ...
11 juin 2018, par bystrano@… — Logdéclencher un événement quand le js qui gère afficher_si est chargé.
Cela permet p.ex. de se brancher dessus pour n’afficher le formulaire qu’une
fois le js chargé et d’éviter ainsi un flash des saisies masquées quand le
chargement de la page prend un peu de temps.