
Recherche avancée
Médias (10)
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (62)
-
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 ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)
Sur d’autres sites (7230)
-
Optimizing conversion of video files to texture-atlas
7 novembre 2017, par Malu05I am working on some code that converts a video file into a 1d texture atlas (a single JPG file containing all of the frames stacked on top of each other).
I do this by reading in the frames using FFMPEG’s image2pipe, and read the pipe into a 3d numpy array. Then use numpy’s concatenate function to add them on top of each other.
The code itself works fine, but it is somewhat slow. In this example 100 frames of a video takes roughly 15-20 seconds.Reading the frames into the pipe is somewhat fast, but reading from the pipe, converting to array and concatenating takes some time.
I am not too familiar with ways to optimize numpy array handling, but
I expect that I might be doing something very inefficient here but i can’t seem to spot it. Is there anything i can do to make this process faster ?import subprocess as sp
import numpy
import datetime
import matplotlib.pyplot as plt #Only for test plotting.
FFMPEG_BIN = "ffmpeg" #link to the ffmpeg executeable
#Number of images in the texture-atlas
images = 100
for x in range(0,images): #Loop for each frame to read
res = [596,336,3] #The output format
#Setup the command for reading 1 frame in the video.
command = [ FFMPEG_BIN,
'-ss', '%s'%(x),
'-i', '340114063.mp4',
'-f', 'image2pipe',
'-vframes', '1',
'-vf','scale=%s:%s'%(res[0],res[1]),
'-pix_fmt', 'rgb24',
'-vcodec', 'rawvideo', '-']
pipe = sp.Popen(command, stdout = sp.PIPE,stderr=sp.PIPE, bufsize=-1)
#Read out the image data from the pipe
raw_image = pipe.stdout.read(res[0]*res[1]*res[2])
#Convert to numpy array
image = numpy.fromstring(raw_image, dtype='uint8')
#Clear the pipe
pipe.stdout.flush()
if x>0:
#Add the image below the last image(s) so that they form a 1d texture atlas
image = numpy.concatenate((last_image,image), axis=0)
last_image = image
#not needed, just for plotting example.
image = image.reshape((res[1]*images,res[0],res[2]))
imgplot = plt.imshow(image)
plt.savefig('foo.png') -
avfilter/ddagrab : create secondary xor mouse texture
8 octobre 2023, par Timo Rothenpieler -
avfilter/ddagrab : only use acquired texture on valid updates
9 février 2024, par Timo Rothenpieler