
Recherche avancée
Autres articles (96)
-
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 (...) -
(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 (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (8985)
-
Is there a way to save a matplotlib animation as a video (with ffmpeg) so that the last frame is held for N seconds ?
2 décembre 2020, par janlukeI'm using FFMpegWriter to save a matplotlib animation as a video. I'd like to hold the last frame for some seconds at the end of the video.


As a workaround, one could modify the animation itself by repeating the last frame for a number of extra steps. This number of steps can be computed as a function of the desired "hold duration" and the interval/fps of the animation.


Nonetheless, I'd like to know if there's a cleaner way to do the same without artificially modifying the animation itself and using instead some extra arguments for the writer (which uses ffmpeg in my case). Unfortunately I don't know much of ffmpeg so I'd like to have some help.


Thank you.


-
avcodec/mpeg12dec : parse A53 caption data embedded in SCTE-20 user data
15 mars 2017, par Aman Gupta -
PIL image save causes FFMPEG to fail
6 janvier 2023, par XorgonI have been attempting to convert some videos using FFMPEG with image2pipe using PIL. I have found that when the frame is particularly simple (such as all one colour), it causes FFMPEG to fail with the following message :


[image2pipe @ 000001785b599bc0] Could not find codec parameters for stream 0 (Video: none, none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2pipe, from 'pipe:':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: none, none, 24 tbr, 24 tbn, 24 tbc
Output #0, mp4, to '<your filepath="filepath" here="here">/test.mp4':
Output file #0 does not contain any stream
</your>


The minimum code I have found to reproduce this is as follows :


import numpy as np
from subprocess import Popen, PIPE
from PIL import Image

output_file = "<your filepath="filepath" here="here">/test.mp4"

p = Popen(['ffmpeg',
 '-y', # Overwrite files
 '-f', 'image2pipe', # Input format
 '-r', '24', # Framerate
 '-i', '-', # stdin
 '-c:v', 'libx264', # Codec
 '-preset', 'slow',
 '-crf', f'18', # H264 Constant Rate Factor (quality, lower is better)
 output_file], stdin=PIPE)

# This one works
# vid = np.random.randint(0, 255, (10, 64, 64)) # Create a 64x64 'video' with 10 frames of random noise

# This one does not
vid = np.full((10, 64, 64), 129) # Create a 64x64 'video' with 10 frames of pure grey

for frame in vid:
 im = Image.fromarray(np.uint8(frame))
 im.save(p.stdin, 'JPEG')

p.stdin.close()
p.wait()
</your>


Notably, if I do the same thing with a randomly generated series of frames (commented as "This one works" in the script above), it will output fine.


One workaround I have found so far is to replace 'JPEG' with 'PNG' in the
im.save(...)
call. However, I would be interested in understanding what causes it to fail with JPEG.