
Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (72)
-
Le profil des utilisateurs
12 avril 2011, parChaque 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, parAccé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 (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (6148)
-
Does FFmpeg video filter(eq filter) color correction work same as function sws_setColorspaceDetails ?
25 octobre 2019, par Jahwan OhI’m need to use color filter with two different implementation.
first one is using the function below. with conversiondouble m_brightness = -0.18;
double m_contrast = 1.45;
double m_saturation = 1.2;
SwsContext *swsctx = sws_getCachedContext(NULL, vStreams[1]->codec->width, vStreams[1]->codec->height, vStreams[1]->codec->pix_fmt, dst_width, dst_height, dst_pix_fmt, SWS_BICUBIC, NULL, NULL, NULL);
int *inv_table, srcrange, *table, dstrange, b, c, s;
sws_getColorspaceDetails(swsctx, &inv_table, &srcrange, &table, &dstrange, &b, &c, &s);
b = int((1 << 16) * m_brightness);
c = int(c * m_contrast);
s = int(s * m_saturation);
ret = sws_setColorspaceDetails(swsctx, table, srcrange, inv_table, dstrange, b, c, s);and the other one is using FFmpeg -vf eq color correction on command line.
ffmpeg -i original.jpg -vf "eq=brightness=-0.18:contrast=1.45:saturation=1.2" -c:a copy original_filter.jpg
the problem is that I need to have a same result(filtered) with this two tools. with just same brightness/contrast/saturation parameters, it showed different result, so I tried to convert these parameter between these two tools.
I thought these two color correction work same reading the link below. I’ve tried to convert the swscale filter parameter to ffmpeg -vf eq filter parameter based on the link, but it seems it is not a conversion between them.
but, it is more like a conversion of m_brightness <—> b.(in the code I’ve attached)
https://github.com/google/sagetv/blob/71d122229105e164cd410fafed2a5e7483869913/third_party/mplayer/libmpcodecs/vf_scale.c#L393you can see the each results with different parameter.
https://drive.google.com/drive/folders/181_LhkvpB4XbEf05_ecuLoy5nSSEcRiX?usp=sharing
How can I convert the parameters so that it produce same filtered result ? or is it totally different algorithm ?
-
FFMPEG Replacing black color fragments with alpha channel transparency
31 décembre 2017, par kostya572I have
file.mov
video. It has a lot of blank black color fragments that have different durations.I need to replace black color fragments that show up for more than 5 seconds with transparency. Is that possible to add some alpha channel for that purpose ?
Comment to Mulvya’s answer :
Amazing solution. With #2 section everything ok.
With #1 section I created this code :
output=$(ffprobe -f lavfi -i "movie=file.mov,blackdetect=d=3.5" -show_entries tags=lavfi.black_start,lavfi.black_end -of compact=p=0 -v 0|awk '!/^$/')
echo $outputusing
awk '!/^$/'
to remove empty lines.Here is the output I get :
tag:lavfi.black_start
repeats with same value several times, not having right structure with closingtag:lavfi.black_end
If I change
blackdetect=d=3.5
to other value, for exapled=10
, it outputs the same result asd=3.5
. How could I solve this issue having righttag:lavfi.black_start
,tag:lavfi.black_end
synthax with correct greppingd=
value ? -
FFMPEG Determine average color of an area of a video
12 novembre 2019, par Naved KhanI have a use case where I’d want to insert one of two watermarks - one designed for a dark-ish background, the other for a light background into a video. Let’s say that I’d want to do this on the top right corner of the video.
How do I determine the average color of the top right section of the video ? Post this, how do I determine which watermark to use by looking at the average color ?
I have a solution right now where I am taking equally spaced screenshots and then measuring the average color, but it’s excruciatingly slow, especially for longer videos.
# Calculate average color
black_distances = []
white_distances = []
movie = FFMPEG::Movie.new(video_file)
(0..movie.duration / 10).each do |second|
# extract a frame
filename = "tmp/watermark/#{SecureRandom.uuid}.jpg"
movie.screenshot filename.to_s, seek_time: second
# analyse frame for color distance
frame = MiniMagick::Image.open(filename)
frame.crop('20%x20%+80%+0')
frame.resize('1x1')
pixel = frame.get_pixels.flatten
distance_from_black = Math.sqrt(((black[0] - pixel[0])**2 + (black[1] - pixel[1])**2 + (black[2] - pixel[2])**2))
distance_from_white = Math.sqrt(((white[0] - pixel[0])**2 + (white[1] - pixel[1])**2 + (white[2] - pixel[2])**2))
black_distances.push distance_from_black
white_distances.push distance_from_white
File.delete(filename) if File.exist?(filename)
end
average_black_distance = black_distances.reduce(:+).to_f / black_distances.size
average_white_distance = white_distances.reduce(:+).to_f / white_distances.sizeI am also confused about how to use the resulting
average_black_distance
andaverage_white_distance
to determine which watermark to use.