
Recherche avancée
Autres articles (97)
-
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. -
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 (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (8142)
-
Matomo will now pay researchers 5,000 USD for a critical security vulnerability
7 mai 2020, par Matomo Core Team -
Displaying an AVFrame on the screen with SDL 2.0
22 septembre 2013, par jsp99I am working on some code with the help of this tutorial and using the latest development libraries of ffmpeg and SDL. I am stuck at the point where I have to display the decoded frame (AVFrame) on the screen. I am inclined to do the above task i.e, Displaying the AVFrame on screen using the latest API of SDL 2.0 (Using Renderers and Textures alongside the usage of SDL_Window). Frankly speaking, I am not an expert in SDL_Renderer, SDL_Texture and the functions associated with them. But I am reading the documentation in the official site of SDL 2.0 and working my way through them.
Is there a way to do the following using SDL 2.0 API :
-
Convert the native frame format to a flavour of YUV and display it.
(OR)
-
If it is possible, display the frame without having to convert it from native format.
I want to do the above using Renderers and Textures. There doesn't seem to be an easy way to work with them.
Can anyone guide me through the steps to do the above tasks ?
PS : Though I have not explicitly tried it, I came across some ways to display AVFrame on the screen by converting the AVFrame format(native) to RGB. But I do not want the native frame format (which is mostly YUV) to RGB conversion, as it is computationally expensive.
Converting between formats is done by sws_scale()
-
-
Why the output of the ffmpeg-python doesn't match the image shape ?
9 novembre 2019, par Swi JasonI used the
ffmpeg-python
module to convert video to images. Specifically, I used the code provided by the official git repo offfmpeg-python
, as belowout, _ = (
ffmpeg
.input(in_filename)
.filter('select', 'gte(n,{})'.format(frame_num))
.output('pipe:', vframes=1, format='image2', vcodec='mjpeg')
.run(capture_stdout=True)
)
im = np.frombuffer(out, 'uint8')
print(im.shape[0]/3/1080)
# 924.907098765432The original video is of size (1920, 1080) and pix_fmt ’yuv420p’, but the outputs of the above code is not 1920.
I have figured out by myself that the output of ffmpeg.run() is not a decoded image array, but a byte string encoded by JPEG format. To restore the image into a numpy array, simply use the cv2.imdecode() function. For example,
im = cv2.imdecode(im, cv2.IMREAD_COLOR)
However, I can’t use
opencv
on my embeded Linux system. So my question now is that, can I get numpy output fromffmpeg-python
directly, without the need of converting it by opencv ?