Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (80)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (12342)

  • vf_colorspace : Add support for full range yuv

    26 août 2016, par Vittorio Giovara
    vf_colorspace : Add support for full range yuv
    

    Whenever a full range video is input, since the YUVJ* formats are not
    listed as supported for this filter, a range reduction takes place
    through the auto-inserted format filter, forcing the conversion to
    operate on a limited range,

    However the filter handles full range videos perfectly fine, so adding
    support to YUVJ* formats will allow skipping a conversion step, while
    providing completely identical results.

    Signed-off-by : Vittorio Giovara <vittorio.giovara@gmail.com>
    Reviewed-by : "Ronald S. Bultje" <rsbultje@gmail.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavfilter/vf_colorspace.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 / Avconv video playback problems - black or green tint

    21 octobre 2014, par scottpaterson

    I am using FFmpeg / Avconv to convert a raw video file to a MP4 or AVI. Both FFmpeg and Avconv have the same problem.

    • The output video, both MP4 or AVI, play 100% percent perfect on Linux Mint in the default video player.

    • On Windows in WMP the MP4 plays, but the video is black, and the AVI plays and shows video but it has a green tint. On Windows in Quicktime both formats video is black.

    Here is the command I am using :

    avconv -i /home/scott/Desktop/out.wav -f rawvideo -pix_fmt rgb32 -s:v 540x240 -i
    /home/scott/Desktop/out.raw -c:v libx264 -strict -2 -preset ultrafast -b:v 160k  
    /home/scott/Dropbox/code/out.avi
    • I have spent a lot of time messing with the -pix_fmt and trying different pixel format, so far rgb32 returns the best results.

    • I have also tried -sws_flags options such as lanczos+accurate_rnd - but this did not help.

    How can I get this to play the same in all video players ?

    Thanks !