
Recherche avancée
Médias (1)
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
Autres articles (104)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)
Sur d’autres sites (10367)
-
x86/scale : fix xmm register count for hscale*_sse2
9 juin 2014, par James Almer -
Is there a simple way to create 8 or 16 bit grayscale videos using matplotlib ?
19 avril 2022, par user18544920I have been reading for 3 days however still can't quite wrap my head around how to do the following. We have been asked to produce a simulation video from matplotlib to evaluate a programme that only accepts u8 or u16 grayscale videos. I have managed to produce the required animated scatterplot using the following code, however only know how to convert to grayscale using the second chunk of code in CV2 that results in a lot of compression.


I would get marked down for both the heavy compression and not doing it within the animation code, however I don't know of a way to do it during the animation code.


Animation code


pixelx = 250 # length of x for resulting movie in pixels
pixely = 250 # length of y for resulting movie in pixels
fig2d = plt.figure(figsize=(pixelx/72, pixely/72), dpi=72)
ax2d = fig2d.add_axes([0,0,1,1])
ax2d.set_axis_off()
scatter2d = ax2d.scatter([], [], s=(pixelx*particle.rad/Env.X)**2, marker='o', edgecolors='none', c='#000000', cmap='gray')
ax2d.set_aspect('auto')
ani2d = FuncAnimation(fig2d, update2d, frames=(duration * fps), init_func=initial2d, blit=False, interval=1000/fps,
 repeat=True)
ani2d.save('x.avi', writer='ffmpeg', fps=fps, dpi=72)



RGB to grayscale code


import cv2
source = cv2.VideoCapture('x.avi')
frame_width = int(source.get(3))
frame_height = int(source.get(4))
size = (frame_width, frame_height)
result = cv2.VideoWriter('xG.avi',
 cv2.VideoWriter_fourcc(*'MJPG'), 200, size, 0)
while True:

 ret, img = source.read()

 gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

 result.write(gray)

 cv2.imshow("frame", gray)

 key = cv2.waitKey(1)
 if key == ord("q"):
 break

cv2.destroyAllWindows()
source.release()



Any help would be greatly apprciated


-
lavfi/drawtext : add fontcolor_expr option
4 juillet 2014, par Andrey Utkin