
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (83)
-
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. -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (7242)
-
Saving the openGL context as a video output
16 septembre 2016, par activatedgeekI am currently trying to save the animation made in
openGL
to a video file. I have tried usingopenCV
’svideowriter
but to no advantage. I have successfully been able to generate a snapshot and save it asbmp
using theSDL
library. If I save all snapshots and then generate the video usingffmpeg
, that is like collecting 4 GB worth of images. Not practical.
How can I write video frames directly during rendering ?
Here the code i use to take snapshots when I require :void snapshot(){
SDL_Surface* snap = SDL_CreateRGBSurface(SDL_SWSURFACE,WIDTH,HEIGHT,24, 0x000000FF, 0x0000FF00, 0x00FF0000, 0);
char * pixels = new char [3 *WIDTH * HEIGHT];
glReadPixels(0, 0,WIDTH, HEIGHT, GL_RGB, GL_UNSIGNED_BYTE, pixels);
for (int i = 0 ; i <height>pixels) + snap->pitch * i, pixels + 3 * WIDTH * (HEIGHT-i - 1), WIDTH*3 );
delete [] pixels;
SDL_SaveBMP(snap, "snapshot.bmp");
SDL_FreeSurface(snap);
}
</height>I need the video output. I have discovered that
ffmpeg
can be used to create videos from C++ code but have not been able to figure out the process. Please help !EDIT : I have tried using
openCV
CvVideoWriter
class but the program crashes ("segmentation fault
") the moment it is declared.Compilation shows no errors ofcourse. Any suggestions to that ?SOLUTION FOR PYTHON USERS (Requires
Python2.7
,python-imaging
,python-opengl
,python-opencv
, codecs of format you want to write to, I am onUbuntu 14.04 64-bit
) :def snap():
pixels=[]
screenshot = glReadPixels(0,0,W,H,GL_RGBA,GL_UNSIGNED_BYTE)
snapshot = Image.frombuffer("RGBA",W,H),screenshot,"raw","RGBA",0,0)
snapshot.save(os.path.dirname(videoPath) + "/temp.jpg")
load = cv2.cv.LoadImage(os.path.dirname(videoPath) + "/temp.jpg")
cv2.cv.WriteFrame(videoWriter,load)Here
W
andH
are the window dimensions (width,height). What is happening is I am using PIL to convert the raw pixels read from theglReadPixels
command into aJPEG
image. I am loading that JPEG into theopenCV
image and writing to the videowriter. I was having certain issues by directly using the PIL image into the videowriter (which would save millions of clock cycles ofI/O
), but right now I am not working on that.Image
is aPIL
modulecv2
is apython-opencv
module. -
Saving the openGL context as a video output
2 juin 2023, par psiyumI am currently trying to save the animation made in
openGL
to a video file. I have tried usingopenCV
'svideowriter
but to no advantage. I have successfully been able to generate a snapshot and save it asbmp
using theSDL
library. If I save all snapshots and then generate the video usingffmpeg
, that is like collecting 4 GB worth of images. Not practical.
How can I write video frames directly during rendering ?
Here the code i use to take snapshots when I require :


void snapshot(){
SDL_Surface* snap = SDL_CreateRGBSurface(SDL_SWSURFACE,WIDTH,HEIGHT,24, 0x000000FF, 0x0000FF00, 0x00FF0000, 0);
char * pixels = new char [3 *WIDTH * HEIGHT];
glReadPixels(0, 0,WIDTH, HEIGHT, GL_RGB, GL_UNSIGNED_BYTE, pixels);

for (int i = 0 ; i <height>pixels) + snap->pitch * i, pixels + 3 * WIDTH * (HEIGHT-i - 1), WIDTH*3 );

delete [] pixels;
SDL_SaveBMP(snap, "snapshot.bmp");
SDL_FreeSurface(snap);
}
</height>



I need the video output. I have discovered that
ffmpeg
can be used to create videos from C++ code but have not been able to figure out the process. Please help !


EDIT : I have tried using
openCV
CvVideoWriter
class but the program crashes ("segmentation fault
") the moment it is declared.Compilation shows no errors ofcourse. Any suggestions to that ?


SOLUTION FOR PYTHON USERS (Requires
Python2.7
,python-imaging
,python-opengl
,python-opencv
, codecs of format you want to write to, I am onUbuntu 14.04 64-bit
) :


def snap():
 pixels=[]
 screenshot = glReadPixels(0,0,W,H,GL_RGBA,GL_UNSIGNED_BYTE)
 snapshot = Image.frombuffer("RGBA",W,H),screenshot,"raw","RGBA",0,0)
 snapshot.save(os.path.dirname(videoPath) + "/temp.jpg")
 load = cv2.cv.LoadImage(os.path.dirname(videoPath) + "/temp.jpg")
 cv2.cv.WriteFrame(videoWriter,load)




Here
W
andH
are the window dimensions (width,height). What is happening is I am using PIL to convert the raw pixels read from theglReadPixels
command into aJPEG
image. I am loading that JPEG into theopenCV
image and writing to the videowriter. I was having certain issues by directly using the PIL image into the videowriter (which would save millions of clock cycles ofI/O
), but right now I am not working on that.Image
is aPIL
modulecv2
is apython-opencv
module.

-
Commercial avi decoder for iOS [closed]
31 janvier 2013, par pawelqusCan you recommend any commercial 3-party library for decoding AVI files in iOS App ? There are many apps in the AppStore that can to do that. I don't want to use ffmpeg because of the legal issues.