
Advanced search
Medias (91)
-
Collections - Formulaire de création rapide
19 February 2013, by
Updated: February 2013
Language: français
Type: Picture
-
Les Miserables
4 June 2012, by
Updated: February 2013
Language: English
Type: Text
-
Ne pas afficher certaines informations : page d’accueil
23 November 2011, by
Updated: November 2011
Language: français
Type: Picture
-
The Great Big Beautiful Tomorrow
28 October 2011, by
Updated: October 2011
Language: English
Type: Text
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 October 2011, by
Updated: October 2011
Language: English
Type: Text
-
Rennes Emotion Map 2010-11
19 October 2011, by
Updated: July 2013
Language: français
Type: Text
Other articles (87)
-
MediaSPIP version 0.1 Beta
16 April 2011, byMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Amélioration de la version de base
13 September 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Mise à jour de la version 0.1 vers 0.2
24 June 2013, byExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1); Installation des dépendances pour Smush; Installation de MediaInfo et FFprobe pour la récupération des métadonnées; On n’utilise plus ffmpeg2theora; On n’installe plus flvtool2 au profit de flvtool++; On n’installe plus ffmpeg-php qui n’est plus maintenu au profit de (...)
On other websites (9702)
-
C# get dominant color in an image
22 January 2017, by CK13I’m building a program that makes screenshots from a video.
It extracts frames from the video (with ffmpeg) and then combines them into one file.All works fine, except sometimes I get (almost) black images, mostly in the beginning and ending of the video.
A possible solution I can think of is to detect if the extracted frame is dark. If it is dark, extract another frame from a slightly different time.
How can I detect if the extracted frame is dark/black? Or is there another way I can solve this?
private void getScreenshots_Click(object sender, EventArgs e)
{
int index = 0;
foreach (string value in this.filesList.Items)
{
string file = selectedFiles[index] + "\\" + value;
// ------------------------------------------------
// MediaInfo
// ------------------------------------------------
// https://github.com/Nicholi/MediaInfoDotNet
//
// get file width, height, and frame count
//
// get aspect ratio of the video
// and calculate height of thumbnail
// using width and aspect ratio
//
MediaInfo MI = new MediaInfo();
MI.Open(file);
var width = MI.Get(StreamKind.Video, 0, "Width");
var height = MI.Get(StreamKind.Video, 0, "Height");
decimal d = Decimal.Parse(MI.Get(StreamKind.Video, 0, "Duration"));
decimal frameCount = Decimal.Parse(MI.Get(StreamKind.Video, 0, "FrameCount"));
MI.Close();
decimal ratio = Decimal.Divide(Decimal.Parse(width), Decimal.Parse(height));
int newHeight = Decimal.ToInt32(Decimal.Divide(newWidth, ratio));
decimal startTime = Decimal.Divide(d, totalImages);
//totalImages - number of thumbnails the final image will have
for (int x = 0; x < totalImages; x++)
{
// increase the time where the thumbnail is taken on each iteration
decimal newTime = Decimal.Multiply(startTime, x);
string time = TimeSpan.FromMilliseconds(double.Parse(newTime.ToString())).ToString(@"hh\:mm\:ss");
string outputFile = this.tmpPath + "img-" + index + x + ".jpg";
// create individual thumbnails with ffmpeg
proc = new Process();
proc.StartInfo.FileName = "ffmpeg.exe";
proc.StartInfo.Arguments = "-y -seek_timestamp 1 -ss " + time + " -i \"" + file + "\" -frames:v 1 -qscale:v 3 \"" + outputFile + "\"";
proc.Start();
proc.WaitForExit();
}
// set width and height of final image
int w = (this.cols * newWidth) + (this.spacing * this.cols + this.spacing);
int h = (this.rows * newHeight) + (this.spacing * this.rows + this.spacing);
int left, top, i = 0;
// combine individual thumbnails into one image
using (Bitmap bmp = new Bitmap(w, h))
{
using (Graphics g = Graphics.FromImage(bmp))
{
g.Clear(this.backgroundColor);
// this.rows - number of rows
for (int y = 0; y < this.rows; y++)
{
// put images on a column
// this.cols - number of columns
// when x = number of columns go to next row
for (int x = 0; x < this.cols; x++)
{
Image imgFromFile = Image.FromFile(this.tmpPath + "img-" + index + i + ".jpg");
MemoryStream imgFromStream = new MemoryStream();
imgFromFile.Save(imgFromStream, imgFromFile.RawFormat);
imgFromFile.Dispose();
left = (x * newWidth) + ((x + 1) * this.spacing);
top = (this.spacing * (y + 1)) + (newHeight * y);
g.DrawImage(Image.FromStream(imgFromStream), left, top, newWidth, newHeight);
i++;
}
}
}
// save the final image
bmp.Save(selectedFiles[index] + "\\" + value + ".jpg");
}
index++;
}
} -
lavfi/vf_vpp_qsv: set color properties for output
26 July 2023, by Haihao Xiang -
C# Bitmap Change Pixel color by doing XOR
17 May 2018, by EdwardI try to change RGB color using XOR of RGB.
example:
=> if value of R on some pixel is 5 = 101
//Color pcolor = image.GetPixel(j, k);=> then doing XOR with some byte 101 ^ 11111111 = 11111010
//R[x, w] = (byte) (R[x, w] ^ mykey[0]);=> and replace R with result R=11111010=250
//image.SetPixel(y, z, Color.FromArgb(A[y, z], R[y, z], G[y, z], B[y, z]));but the problem is if i read again that result frame, R value that i was change before are not 250.
using Accord.Video.FFMPEG;
VideoFileReader reader = new VideoFileReader();
reader.Open(@"E:\Video\Sample.MP4");
VideoFileWriter writer = new VideoFileWriter();
writer.Open(@"E:\Video\Result.MP4", reader.Width, reader.Height, reader.FrameRate, VideoCodec.MPEG4);
MyFunc(reader, writer)public static void Myfunc(VideoFileReader reader, VideoFileWriter writer)
{
byte[] mykey = { 0xff, 0x55, 0x00 };
Bitmap image = new Bitmap(reader.Width, reader.Height, PixelFormat.Format24bppRgb);
for (int i = 0; icode>