
Recherche avancée
Autres articles (86)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5848)
-
Overlaying one video on another one and making black pixels or green pixels transparent
30 décembre 2017, par kostya572I found great answer here : https://stackoverflow.com/a/38581696/2337706
It works only for black pixels. The result is not perfect. I guess if change the overlay background color to other color, e.g. green, red, blue the results would be better. How can I change the other background color ?
Here is my working code :
ffmpeg -y \
-i video.webm -i overlay.mov \
-filter_complex " \
[0:v]setpts=PTS-STARTPTS[base]; \
[1:v]crop=iw:0.50*ih,setpts=PTS-STARTPTS+0/TB, \
format=yuva420p,colorchannelmixer=aa=0.7[overlay]; \
[base][overlay]overlay=x=(W-w)/2:y=0[v]" \
-map "[v]" -map 0:a -c:a copy -c:v libvpx-vp9 -lossless 1 -threads 4 -quality realtime \
-speed 8 -tile-columns 6 -frame-parallel 1 -vsync 2 -shortest output.webmOr need result (if impossible first with good quality) :
Thank you, sorry for the frequent questions on ffpmpeg topic.
-
Why can I not change the number of frames (nframes) in a gganimate animation ? SOLVED
26 décembre 2022, par GekinI have produced an animation per gganimate and rendered it per ffmpeg. It works just fine, but only, if I do not change the number of frames. If I do set the number of frames, I get this error message :


nframes and fps adjusted to match transition
Error parsing framerate 8,4. 
Error: Rendering with ffmpeg failed



I produced the gganim
MonthlyAveragePrecipitationMap
the following way :

options(scipen = 999, OutDec = ",")

MonthlyAveragePrecipitationMap = ggplot(MonthlyAverageExtremePrecipitation) + 
 geom_path(data = map_data("world","Germany"),
 aes(x = long, y = lat, group = group)) +
 coord_fixed(xlim = c(6,15),
 ylim = c(47,55)) + 
 geom_point(aes(x=lon, y=lat, 
 colour = ShareOfExtremePrecipitationEvents,
 group = MonthOfYear),
 size = 3) + 
 scale_color_gradient(low="blue", high="yellow") + 
 xlab("Longitude (degree)") +
 ylab("Latitude (degree)") + 
 theme_bw() +
 transition_manual(frames = MonthOfYear) + 
 labs(title = '{unique(MonthlyAverageExtremePrecipitation$MonthOfYear)[as.integer(frame)]}', 
 color = paste0("Share of Extreme Precipitation Events \namong all Precipitation Events")) 



I call the animation the following way :


animate(MonthlyAveragePrecipitationMap,
 nframes = 300,
 renderer =
 ffmpeg_renderer(
 format = "auto",
 ffmpeg = NULL,
 options = list(pix_fmt = "yuv420p")))




I used this exact code just a few days ago and it worked fine.


Has someone had similar experiences ?
Thanks in advance.


EDIT : Problem solved.


- 

- Problem : Changing the decimal seperator from
.
to,
peroptions(dec=",")
- Solution : Changing the decimal seperator locally within the axis scaling per function.






- Problem : Changing the decimal seperator from
-
How can I simply replace the colors using the color masks on this image and then save it ? With RGBA channels as example
31 août 2020, par karl-policeSo I got this GIF here :




As you can see, it has Red, Green and Blue in it. And it also has a full transparency in it. This was composed together with FFMPEG out of images that looked exactly like that.




Then, with FFMPEG I "decomposed" the RGB and Alpha channels using the filter "extractplanes".


The gallery of that, in correct order starting from up to down, can be found here :




I am not sure if this actually helps me or if I'm supposed to decompose them. Because apperantly now, after decomposing them, I'm supposed to modify them, but I'm not really sure how. It's like how do I modify the red channel that only has black and white, so all at the end, will match to the specified HEX color that I want it to be to.




Now, my question is. How do I exactly make the color changing happen ? Can I do this simply with JavaScript ? Is it possible to do with FFMPEG, if possible without ImageMagicks ? Maybe a programming language where not much installation is needed to do that ?


What I understood is that. These channels basically contain values from 0 to 255 with black and white. I think the "brightness" is that what 0 and 255. So something inbetween, would be like grey.


So basically, like we do (255,0,0) for red. In these channels, if I want red somewhere I need to put one fully white pixel on the red channel and on all the other channels, there has to be a fully black pixel.


That's the concept. Now is the question, how can I do this ?




At the end I want to make it look like the colors this one has, as example :




This is from a game. So basically that's how it looks like in the game. And the game files only use these RGBA template sprites.




I asked a similar question here : How to change colors of an image using RGBA and more channels independently of their color


But somehow, I might didn't seem to explain it that well.




I made a thing here to test around with things. I guess that's nearly close, but the lines are kinda weird. jsfiddle.net/qsgazubk