Recherche avancée

Médias (1)

Mot : - Tags -/blender

Autres articles (35)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains 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 ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (6792)

  • avfilter/vf_ciescope : Fix undefined behavior in rgb_to_xy() with black

    5 juin 2021, par Michael Niedermayer
    avfilter/vf_ciescope : Fix undefined behavior in rgb_to_xy() with black
    

    Fixes : floating point division by 0
    Fixes : undefined behavior in handling NaN
    Fixes : Ticket 8268

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavfilter/vf_ciescope.c
  • moviepy black border around png when compositing into an MP4

    27 août 2022, par OneWorld

    compositing a png into an MP4 video creates a black border around the edge.

    &#xA;

    This is using moviepy 1.0.0

    &#xA;

    Code below reproduces the MP4 with the attached red text png.

    &#xA;

    enter image description here

    &#xA;

    import numpy as np&#xA;import moviepy.editor as mped&#xA;def composite_txtpng_on_colour():&#xA;    bg_color = mped.ColorClip(size=[400, 300], color=np.array([0, 255, 0]).astype(np.uint8),&#xA;                          duration=2).set_position((0, 0))&#xA;    text_png_postition = [5, 5]&#xA;    text_png = mped.ImageClip("./txtpng.png", duration=3).set_position((text_png_postition))&#xA;&#xA;    canvas_size = bg_color.size&#xA;    stacked_clips = mped.CompositeVideoClip([bg_color, text_png], size=canvas_size).set_duration(2)&#xA;    stacked_clips.write_videofile(&#x27;text_with_black_border_video.mp4&#x27;, fps=24)&#xA;&#xA;composite_txtpng_on_colour()&#xA;

    &#xA;

    The result is an MP4 that can be played in VLC player. A screenshot of the black edge can be seen below :-

    &#xA;

    enter image description here

    &#xA;

    Any suggestions to remove the black borders would be much appreciated.

    &#xA;

    Update : It looks like moviepy does a blit instead of alpha compositing.

    &#xA;

    def blit(im1, im2, pos=None, mask=None, ismask=False):&#xA;    """ Blit an image over another.  Blits ``im1`` on ``im2`` as position ``pos=(x,y)``, using the&#xA;    ``mask`` if provided. If ``im1`` and ``im2`` are mask pictures&#xA;    (2D float arrays) then ``ismask`` must be ``True``.&#xA;    """&#xA;    if pos is None:&#xA;        pos = [0, 0]&#xA;&#xA;    # xp1,yp1,xp2,yp2 = blit area on im2&#xA;    # x1,y1,x2,y2 = area of im1 to blit on im2&#xA;    xp, yp = pos&#xA;    x1 = max(0, -xp)&#xA;    y1 = max(0, -yp)&#xA;    h1, w1 = im1.shape[:2]&#xA;    h2, w2 = im2.shape[:2]&#xA;    xp2 = min(w2, xp &#x2B; w1)&#xA;    yp2 = min(h2, yp &#x2B; h1)&#xA;    x2 = min(w1, w2 - xp)&#xA;    y2 = min(h1, h2 - yp)&#xA;    xp1 = max(0, xp)&#xA;    yp1 = max(0, yp)&#xA;&#xA;    if (xp1 >= xp2) or (yp1 >= yp2):&#xA;        return im2&#xA;&#xA;    blitted = im1[y1:y2, x1:x2]&#xA;&#xA;    new_im2 = &#x2B;im2&#xA;&#xA;    if mask is None:&#xA;        new_im2[yp1:yp2, xp1:xp2] = blitted&#xA;    else:&#xA;        mask = mask[y1:y2, x1:x2]&#xA;        if len(im1.shape) == 3:&#xA;            mask = np.dstack(3 * [mask])&#xA;        blit_region = new_im2[yp1:yp2, xp1:xp2]&#xA;        new_im2[yp1:yp2, xp1:xp2] = (1.0 * mask * blitted &#x2B; (1.0 - mask) * blit_region)&#xA;    &#xA;    return new_im2.astype(&#x27;uint8&#x27;) if (not ismask) else new_im2&#xA;

    &#xA;

    and so, Rotem is right.

    &#xA;

    new_im2[yp1:yp2, xp1:xp2] = (1.0 * mask * blitted &#x2B; (1.0 - mask) * blit_region)&#xA;

    &#xA;

    is

    &#xA;

    (alpha * img_rgb &#x2B; (1.0 - alpha) * bg)&#xA;

    &#xA;

    and this is how moviepy composites. And this is why we see black at the edges.

    &#xA;

  • ffmpeg video encode add artefacts on very dark scenes (near to black)

    10 juin 2021, par Marco999

    I have many videos ripped from blu ray (h.264).

    &#xA;

    I don't have sufficient space to store all videos and I like to re-encode all video with hevc codec (h.265) and keep similar quality (not exactly the some) but with a good compromise.

    &#xA;

    I have tried this command :

    &#xA;

    ffmpeg.exe -hide_banner -hwaccel nvdec -hwaccel_device 0 -vsync 0 -i "title00.mkv" -c:s copy -an  -c copy -c:v:0 hevc_nvenc -profile:v main10 -pix_fmt p010le  -rc-lookahead 32 -spatial-aq 1 -aq-strength 12  -cq 30 -qmin 1 -qmax 30 -b:v:0 10M -maxrate:v:0 20M -gpu 0  title00_nvidia_no_audio.mkv&#xA;

    &#xA;

    the quality is excellent and is very close to original, but on the very dark scenes (near to black) there are visible artefacts.

    &#xA;

    To solve the problem I have tried this changes without get any improvement :

    &#xA;

    -cq 25 -qmin 1 -qmax 25 &#xA;&#xA;-spatial-aq 1 -aq-strength 4&#xA;

    &#xA;

    For some strange reason seem that if I decrease the -cq from 30 to 25 the artefacts are more visible.

    &#xA;

    I general I'am satasfied about the quality result but before start the encoding I like to understand if there is a way to reduce/remove these artefacts on very dark scenes.

    &#xA;

    Any tips ?

    &#xA;

    Thanks !

    &#xA;