
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (16)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...)
Sur d’autres sites (5557)
-
avutil : add ROI (Region Of Interest) data struct and bump version
10 janvier 2019, par Guo, Yejunavutil : add ROI (Region Of Interest) data struct and bump version
The encoders such as libx264 support different QPs offset for different MBs,
it makes possible for ROI-based encoding. It makes sense to add support
within ffmpeg to generate/accept ROI infos and pass into encoders.Typical usage : After AVFrame is decoded, a ffmpeg filter or user's code
generates ROI info for that frame, and the encoder finally does the
ROI-based encoding.The ROI info is maintained as side data of AVFrame.
Signed-off-by : Guo, Yejun <yejun.guo@intel.com>
Signed-off-by : Derek Buitenhuis <derek.buitenhuis@gmail.com> -
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.


-
In FFmpeg, using -filter_complex, how can I overlay and blend at the same time ?
20 avril 2023, par Kristian BoruffMy code works to combine three videos, resize the videos to 1920X1080, resize the watermark to the correct size, and then overlays the watermark to the lower left hand side. Then converts to the intended codecs for Youtube.
My question is how do I Blend at the same time using the -filter_complex workflow ?
Currently, I have the following workflow that does everything but set the opacity



ffmpeg -y -i fancy movie.mov -i logo.png -i in.mov -i out.mov -c:v libx264 -crf 18 -b:v 50000k -preset veryfast -tune film -profile:v high -x264opts cabac=1:keyint=16:bframes=2:keyint_min=15 -c:a libvo_aacenc -ab 128K -ar 48000 -filter_complex "[0:0] scale=1920X1080 [main]; [2:0] scale=1920X1080 [start]; [3:0] scale=1920X1080 [end]; [start] [2:1] [main] [0:1] [end] [3:1] concat=n=3:v=1:a=1 [prog]; [1:0] scale=480:90 [wm]; [prog] [wm] overlay=36:main_h-overlay_h-45" fart.mp4




I'm trying to add "blend=all_opacity=0.7" in the last step so the watermark will screen against the background. If I just add



[prog] [wm] overlay=36:main_h-overlay_h-45, blend=all_mode='overlay':all_opacity=0.7" fart.mp4




I get the error, Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_blend_6



If I try a semicolon instead,



[prog] [wm] overlay=36:main_h-overlay_h-45; blend=all_mode='overlay':all_opacity=0.7




I get the error, Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_blend_6 which makes me think that it's expecting something like [input 1] [input 2] blend command [output]. The problem is that I need it to overlay and blend.



I tried simplifying the code to just test if the blend operation was working properly.



ffmpeg -i test.mp4 -i logo.png -filter_complex "[0:0] scale=1920x1080 [wm]; [1:0] scale=1920x1080 [prog], [wm][prog] blend=all_mode='overlay':all_opacity=0.7" fart.mp4




I got the error First input link top parameters (size 1920x1080, SAR 1:1) do not match the corresponding second input link bottom parameters (1920x1080, SAR 243:80)
Failed to configure output pad on Parsed_blend_2



So, in addition to the trouble with combining of filters, I'm also having an issue with resizing the watermark as FFMpeg sees it as a different aspect ratio than the other videos.



This is my second day with FFmpeg, so any help would be appreciated.



I'm currently working with FFMpeg version N-61061-gf34cceb