
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (89)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (6575)
-
ffmpeg - Making a Clean WAV file
24 septembre 2016, par EdwardI’m looking to batch convert a number of files to audio files using
ffmpeg
for a game calledStar Wars: Jedi Knight: Dark Forces II
. The problem I’m having is thatffmpeg
seems to be doing something that does so thatJedi Knight
can’t play the sound file.Jedi Knight
accepts plain oldPCM
WAV
files of various ranges, from 5khz to 96khz, 8 and 16 bit, mono and stereo. This sounds plain and simple. Except for that if one were to create aWAV
file usingMS Sound Recorder
,Jedi Knight
could not play it. Speculation was that it added something extra to header or something. But it can play aWAV
file created byAudacity
,GoldWave
orModPlug Tracker
to name a few.So why not
ffmpeg
? Am I using the wrong codec or params ? I took an original sound file from the game and performed the following :ffmpeg -i "orig_thrmlpu2.wav" -f wav -acodec pcm_s16le -ar 22050 -ac 1 "ffmpeg_thrmlpu2.wav"
The
ffmpeg
version does not play in the game.ffprobe
shows that theffmpeg
version has someMetadata
which theoriginal
doesn’t have. What params should I use to try and get the sameWAV
format as the original ? Mind you,-ar
,-ac
andbits
aren’t the important parts.Here are the files for you to examine : http://www.edwardleuf.org/Games/JK/thrmlpu2.zip
-
Send SDL frame to another process and display it
18 septembre 2016, par Amit_shI am trying to send a frame to another process in order to display it. I’m using dranger tutorial02.
I was thinking to serialize the SDL_Overlay struct to bytes after the call to sws_scale, send it to the other process, deserialize it and call SDL_DisplayYUVOverlay to display it.
Do you think this is my best choice ?
If so, I’m having hard time serializing this struct.. here’s the code :
size_t size_of_Overlay(SDL_Overlay *bmp) {
/*
* typedef struct {
*
* Uint32 format;
* int w, h;
* int planes;
* Uint16 *pitches;
* Uint8 **pixels;
* Uint32 hw_overlay:1; <- can I ignore it? cant point to a bit-field..
*
* } SDL_Overlay;
*/
// w,h,planes format pitches pixels
return sizeof(int)*3 + sizeof(Uint32) + sizeof(Uint16)*bmp->w + sizeof(Uint8)*bmp->h*3;
}
void overlay_to_buf(SDL_Overlay* bmp, char* buf) {
if(!bmp || !buf) {
perror("overlay_to_buf");
exit(1);
}
memcpy(buf, &bmp->format, sizeof(Uint32));
buf += sizeof(Uint32);
memcpy(buf, &bmp->w, sizeof(int));
buf += sizeof(int);
memcpy(buf, &bmp->h, sizeof(int));
buf += sizeof(int);
memcpy(buf, &bmp->planes, sizeof(int));
buf += sizeof(int);
memcpy(buf, bmp->pitches, sizeof(Uint16)*bmp->w);
buf += sizeof(Uint16)*bmp->w;
memcpy(buf, bmp->pixels[0], sizeof(Uint8)*bmp->h);
buf += sizeof(Uint8)*bmp->h;
memcpy(buf, bmp->pixels[1], sizeof(Uint8)*bmp->h);
buf += sizeof(Uint8)*bmp->h;
memcpy(buf, bmp->pixels[2], sizeof(Uint8)*bmp->h);
buf += sizeof(Uint8)*bmp->h;
}
void buf_to_overlay(SDL_Overlay *bmp, char* buf) {
if(!bmp || !buf) {
perror("buf_to_overlay");
exit(1);
}
memcpy(&bmp->format, buf, sizeof(Uint32));
buf += sizeof(Uint32);
memcpy(&bmp->w, buf, sizeof(int));
buf += sizeof(int);
memcpy(&bmp->h, buf, sizeof(int));
buf += sizeof(int);
memcpy(&bmp->planes, buf, sizeof(int));
buf += sizeof(int);
bmp->pitches = (Uint16*)malloc(sizeof(Uint16)*bmp->w);
memcpy(bmp->pitches, buf, sizeof(Uint16)*bmp->w);
buf += sizeof(Uint16)*bmp->w;
bmp->pixels[0] = (Uint8*)malloc(sizeof(Uint8)*bmp->h);
memcpy(bmp->pixels[0], buf, sizeof(Uint8)*bmp->h);
buf += sizeof(Uint8)*bmp->h;
bmp->pixels[1] = (Uint8*)malloc(sizeof(Uint8)*bmp->h);
memcpy(bmp->pixels[1], buf, sizeof(Uint8)*bmp->h);
buf += sizeof(Uint8)*bmp->h;
bmp->pixels[2] = (Uint8*)malloc(sizeof(Uint8)*bmp->h);
memcpy(bmp->pixels[2], buf, sizeof(Uint8)*bmp->h);
buf += sizeof(Uint8)*bmp->h;
} -
cuvid : Implement flush to support seeking in media players
4 septembre 2016, par Philip Langdalecuvid : Implement flush to support seeking in media players
Right now, if we attempt to use cuvid in a media player and then
try to seek, the decoder will happily pass out whatever frames were
already in flight before the seek.There is both the output queue in our code and some number of frames
within the cuvid decoder that need to be accounted for.cuvid doesn’t support flush, so our only choice is to do a brute-force
re-creation of the decoder, which also implies re-creating the parser,
but this is fine.The only subtlty is that there is sanity check code in decoder
initialisation that wants to make sure the HWContextFrame hasn’t already
been initialised. This is a fair check to do at the beginning but not
after a flush, so it has to be made conditional.Signed-off-by : Philip Langdale <philipl@overt.org>
Signed-off-by : Timo Rothenpieler <timo@rothenpieler.org>