
Recherche avancée
Autres articles (56)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Activation de l’inscription des visiteurs
12 avril 2011, parIl est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (7774)
-
FFMPEG command runs forever even on using timelimit
21 décembre 2017, par t6nandMostly I use a java code to run FFMPEG bash commands for watermarking a logo on video. I am using the following FFmpeg command to overlay an image on video. I have observed that at times for some random videos, the process keeps on running even after the timelimit assigned to it expires. At times it’s more than a day or couple of days until not directly killed using
kill -9 pid
:ffmpeg -timelimit 900 -y -i
input_video
-i logoImage -filter_complex "[0:v]scale=trunc(iw/2)*2:trunc(ih/2)*2[even] ;[1:v][even]scale2ref=iw*0.25 :(iw*0.25)*(0.46446702)[2nd][ref] ;[ref][2nd]overlay=(main_w-overlay_w) :(main_h-overlay_h)"
-c:v libx264 -b:v 300K -crf 28 -preset slow outputVideoBut this command never completes even on using
-timelimit
flag at times for some videos.I have observed that for such processes output from
ps aux|grep ffmpeg
yeilds in something like :ubuntu 16620 0.6 6.7 1595044 515392 ? Sl Dec20 12:05
ffmpeg -timelimit 900 -y -i
input_video
-i logoImage -filter_complex "[0:v]scale=trunc(iw/2)*2:trunc(ih/2)*2[even] ;[1:v][even]scale2ref=iw*0.25 :(iw*0.25)*(0.46446702)[2nd][ref] ;[ref][2nd]overlay=(main_w-overlay_w) :(main_h-overlay_h)"
-c:v libx264 -b:v 300K -crf 28 -preset slow outputVideoIt indicates that this process is in interruptible sleep state i.e. waiting for an event to complete. On using
sudo strace -p 16620
to trace which system call is this process hung up on it results in something like :Process 16620 attached write(2, "frame= 4121 fps= 10 q=33.0 size="...,
99i.e. it’s stuck writing to a file.
What could be the reason for this problem ?
And is there any other way to kill FFMPEG process which overshoots desired time limit ? -
How do I connect two GIFs to play one after another in Python ?
9 novembre 2022, par AndrewIf I have two GIFs, GIF 1 being 10 seconds long and GIF 2 being 5 seconds long, is there a way to connect them so the final GIF is a total of 15 seconds long ?


Would I have to loop through each frame of both the GIFs with
imageio.mimread()
and output, once all the frames are read in memory ?

Or is there another way by knowing the start and end times and shifting it ?


Edit :
The solution presented by FirefoxMetzger is extremely Pythonic, ideal if you do not wish to install other software / packages like gifsicle.


import imageio.v3 as iio
import numpy as np

frames = np.vstack([
 iio.imread("imageio1.gif"),
 iio.imread("imageio2.gif"),
])

# get duration each frame is displayed
iio.imwrite("imageio_combined.gif", frames)



This completes in 15.6 seconds for two GIFs, each containing 100 frames.


However, if runtime is important, I recommend gifsicle :


gifsicle(
 sources=["imageio1.gif", "imageio2.gif"], # or just omit it and will use the first source provided.
 destination="imageio3.gif",
 options=["--optimize=2", "--threads=2", "--no-conserve-memory"]
)



This completes in 4.8 seconds, which is three times as fast.


-
Run ffmpeg once but get multiple screenshots
9 novembre 2017, par user779159I get a screenshot from a remote video file using ffmpeg with a command like
ffmpeg -ss $TIME -i $URL -frames:v 1 -filter:v $FILTER file.jpg
(-ss
comes before-i
for fast seeking https://trac.ffmpeg.org/wiki/Seeking).$FILTER
is how I want to transform the screenshot, like cropping/resizing. In this case it’s"crop=iw-5:ih-5, scale=100:100:force_original_aspect_ratio=increase, crop=100:100"
)If I want to get 3 screenshots, at 3 seconds, 5 seconds, and 14 seconds, I need to run this command 3 separate times, passing 3, 5, and 14 as
$TIME
. But is it possible to run the command once but have it output multiple screenshot files for the different times ?And would ffmpeg do that in a way where it would make the round-trip remote request just 1 time instead of 3 ? In that case it would be more efficient. If not, then maybe it’s better to make the 3 requests separately since I could do it in parallel.