
Recherche avancée
Autres articles (47)
-
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) (...)
-
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
Diogene : création de masques spécifiques de formulaires d’édition de contenus
26 octobre 2010, parDiogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
A quoi sert ce plugin
Création de masques de formulaires
Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)
Sur d’autres sites (6800)
-
ffmpeg : Create a fake shadow below alpha channel webm/png sequence
6 mai 2021, par Beneos BattlemapsPurpose : I'd like to render out animated 3D meshes as png sequence to use them as animated tokens for virtual tabletop games. To make the mesh looks more natural I'd like to create a fake show beneath the actual token.


Problem : I have a png sequence
1
(as well as a webm file created with ffmpet out of this png sequence if it makes it easier) with alpha channel. To create the webm I use :
ffmpeg -framerate 24 -f image2 -i Idle_Top.%04d.png -c:v libvpx-vp9 -crf 25 -pix_fmt yuva420p Idle_Top.webm
(If its relevant). I'd like to render out the png sequence to a webm file that have the current images as well as the transparent shadow beneath the token combined.

Possible workflow : I think a good way to achieve the wanted shadow effect is to use the alpha channel image as a mask on a black picture with the same resolution as the source image
2
. Then you have a complete black version of the image. Then you need to place this image beneath the colored image and make a offset of 10px left and 10px down to create the ilusion of perspective3
. At the end the black image below the colored image must have a transparency as well ( 30% visibility should be enough)4
.



Assets : I've put the webm file and the png files on my gDrive https://drive.google.com/drive/folders/1wznGaPwhKc2UyPpSZBSISa1gs3oixsHR?usp=sharing


Though I work with ffmpeg on a regular basis I have no clue where to start. Can you please help me out with this interesting problem ?


Best regards
Ben


-
avutil/cpu_internal : Fix check for SSE2SLOW
15 juin 2022, par Andreas Rheinhardtavutil/cpu_internal : Fix check for SSE2SLOW
For SSE2 and SSE3, there are four states that the two flags
involved (AV_CPU_FLAG_SSE[23] and AV_CPU_FLAG_SSE[23]SLOW) can convey.
When ordered from worst to best they are :
1. both flags unset (SSE[23] unavailable)
2. the slow flag set, the ordinary flag unset (this is designed
for cases where SSE2 is available, but so slow that MMX(EXT)/SSE
code is usually faster)
3. both flags set (SSE2 is available, but there might be scenarios
where MMX(EXT)/SSE code is faster)
4. the ordinary flag set, the slow flag unset (this is the normal case)The ordinary macros for checking cpuflags return true
in the latter two cases ; the fast macros only return true for
the latter case. Yet the macros to check for slow currently
only return true in case three.This seems unintended. In fact, the only uses of the slow macros
are all of the form
if (EXTERNAL_SSE2(cpu_flags) || EXTERNAL_SSE2_SLOW(cpu_flags))
where the check for EXTERNAL_SSE2_SLOW is completely redundant.
Even more importantly, it is not what was intended. Before
6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0, the checks passed
in cases 2 to 4. Said commit changed this to something that
only passes for the third case. Commits
7fb758cd8ed08e4a37f10e25003953d13c68b8cd and
c1913064e38cb338039f29c280a0dacc3fd1e451 restored the old behaviour,
yet merging 4efab89332ea39a77145e8b15562b981d9dbde68 (in commit
ac774cfa571734c49c26e2d3387adccff8957ff8) broke this again
by changing it to what it is now.*This commit changes the macros to make the slow macros check
whether a specific instruction is supported, even if slow.
This restores the intended meaning to all uses of the SLOW macros
and is generally more natural.* : Libav only checks for EXTERNAL_SSE2_SLOW, i.e. for the third case
only.Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
FFMPEG macroblock coordinates
27 janvier 2014, par user3177342I have a foreign code that prints motion vectors.
for the video 360x440 it looks likeframe 6, 23 x 28
9 8 ; 0 -1
26 19 ; -1 0
24 22 ; 1 0
frame 7, 23 x 28
13 10 ; 0 -1
1 12 ; 0 -1
frame 8, 23 x 28
9 7 ; 0 -1
3 12 ; 0 -1
3 15 ; -1 0
frame 9, 23 x 28
27 9 ; 0 1the code is
const int mb_width = (ctx->width + 15) / 16;
const int mb_height = (ctx->height + 15) / 16;
const int mb_stride = mb_width + 1;
const int mv_sample_log2 = 4 - pict->motion_subsample_log2;
const int mv_stride = (mb_width << mv_sample_log2) + (ctx->codec_id == CODEC_ID_H264 ? 0 : 1);
const int quarter_sample = (ctx->flags & CODEC_FLAG_QPEL) != 0;
const int shift = 1 + quarter_sample;
printf("frame %d, %d x %d\n", index, mb_height, mb_width);
for (int mb_y = 0; mb_y < mb_height; mb_y++) {
for (int mb_x = 0; mb_x < mb_width; mb_x++) {
const int mb_index = mb_x + mb_y * mb_stride;.....
now it make smome calculation and prints its vecttorsif (IS_8X8(pict->mb_type[mb_index])) {
for (int i = 0; i < 4; i++) {
int xy = (mb_x*2 + (i&1) + (mb_y*2 + (i>>1))*mv_stride) << (mv_sample_log2-1);
int dx = (pict->motion_val[direction][xy][0]>>shift);
int dy = (pict->motion_val[direction][xy][1]>>shift);
// printf("_________________8x8\n");
print_vector(mb_x, mb_y, dx, dy);
}
} else if (IS_16X8(pict->mb_type[mb_index])) {
for (int i = 0; i < 2; i++) {
int xy = (mb_x*2 + (mb_y*2 + i)*mv_stride) << (mv_sample_log2-1);
int dx = (pict->motion_val[direction][xy][0]>>shift);
int dy = (pict->motion_val[direction][xy][1]>>shift);
if (IS_INTERLACED(pict->mb_type[mb_index]))
dy *= 2;
// printf("_________________16x8\n");
print_vector(mb_x, mb_y, dx, dy);
}
} else if (IS_8X16(pict->mb_type[mb_index])) {
for (int i = 0; i < 2; i++) {
int xy = (mb_x*2 + i + mb_y*2*mv_stride) << (mv_sample_log2-1);
int dx = (pict->motion_val[direction][xy][0]>>shift);
int dy = (pict->motion_val[direction][xy][1]>>shift);
if (IS_INTERLACED(pict->mb_type[mb_index]))
dy *= 2;
// printf("_________________8x16\n");
print_vector(mb_x, mb_y, dx, dy);
}
} else {
int xy = (mb_x + mb_y*mv_stride) << mv_sample_log2;
int dx = (pict->motion_val[direction][xy][0]>>shift);
int dy = (pict->motion_val[direction][xy][1]>>shift);
//printf("_________________16x16\n");
print_vector(mb_x, mb_y, dx, dy);
}360/23 is not natural digit. I am trying to find out the screen coordinates of that macroblocks with motion vectors