
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (22)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (3929)
-
ffmpeg video encode add artefacts on very dark scenes (near to black)
10 juin 2021, par Marco999I have many videos ripped from blu ray (h.264).


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.


I have tried this command :


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



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


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


-cq 25 -qmin 1 -qmax 25 

-spatial-aq 1 -aq-strength 4



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


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.


Any tips ?


Thanks !


-
moviepy black border around png when compositing into an MP4
27 août 2022, par OneWorldcompositing a png into an MP4 video creates a black border around the edge.


This is using moviepy 1.0.0


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




import numpy as np
import moviepy.editor as mped
def composite_txtpng_on_colour():
 bg_color = mped.ColorClip(size=[400, 300], color=np.array([0, 255, 0]).astype(np.uint8),
 duration=2).set_position((0, 0))
 text_png_postition = [5, 5]
 text_png = mped.ImageClip("./txtpng.png", duration=3).set_position((text_png_postition))

 canvas_size = bg_color.size
 stacked_clips = mped.CompositeVideoClip([bg_color, text_png], size=canvas_size).set_duration(2)
 stacked_clips.write_videofile('text_with_black_border_video.mp4', fps=24)

composite_txtpng_on_colour()



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




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


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


def blit(im1, im2, pos=None, mask=None, ismask=False):
 """ Blit an image over another. Blits ``im1`` on ``im2`` as position ``pos=(x,y)``, using the
 ``mask`` if provided. If ``im1`` and ``im2`` are mask pictures
 (2D float arrays) then ``ismask`` must be ``True``.
 """
 if pos is None:
 pos = [0, 0]

 # xp1,yp1,xp2,yp2 = blit area on im2
 # x1,y1,x2,y2 = area of im1 to blit on im2
 xp, yp = pos
 x1 = max(0, -xp)
 y1 = max(0, -yp)
 h1, w1 = im1.shape[:2]
 h2, w2 = im2.shape[:2]
 xp2 = min(w2, xp + w1)
 yp2 = min(h2, yp + h1)
 x2 = min(w1, w2 - xp)
 y2 = min(h1, h2 - yp)
 xp1 = max(0, xp)
 yp1 = max(0, yp)

 if (xp1 >= xp2) or (yp1 >= yp2):
 return im2

 blitted = im1[y1:y2, x1:x2]

 new_im2 = +im2

 if mask is None:
 new_im2[yp1:yp2, xp1:xp2] = blitted
 else:
 mask = mask[y1:y2, x1:x2]
 if len(im1.shape) == 3:
 mask = np.dstack(3 * [mask])
 blit_region = new_im2[yp1:yp2, xp1:xp2]
 new_im2[yp1:yp2, xp1:xp2] = (1.0 * mask * blitted + (1.0 - mask) * blit_region)
 
 return new_im2.astype('uint8') if (not ismask) else new_im2



and so, Rotem is right.


new_im2[yp1:yp2, xp1:xp2] = (1.0 * mask * blitted + (1.0 - mask) * blit_region)



is


(alpha * img_rgb + (1.0 - alpha) * bg)



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


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