
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (99)
-
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 (...) -
Les sons
15 mai 2013, par -
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation"
Sur d’autres sites (7033)
-
How to set referer header in FFPLAY ?
14 janvier 2020, par MarzeloI worked with this line :
ffplay -headers "Referer : https://pels.com/id=13" -i "https://pels.com/ondemand/movie.mp4"
-
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. -
PHP ffmeg - ffmpeg_animated_gif err
22 janvier 2012, par Oleg BeatI have a code
$movie = new ffmpeg_movie($_SERVER["DOCUMENT_ROOT"].'/file.mp4');
$gif=new ffmpeg_animated_gif("gif_pre.gif",100 ,100 ,24);
for ($frame = 150; $frame <= 200; $frame++)
{
$image = $movie->getFrame($frame);
$gif->addFrame($image);
}and error :
Fatal error: Class 'ffmpeg_animated_gif' not found in {here were err line and path to file}
OS : Windows 7 | Denwer | FFMPEG : 0.6.0-svn
phpinfo :
mpeg-php version 0.6.0-svn
ffmpeg-php built on Sep 8 2010 12:13:47
ffmpeg-php gd support enabled
ffmpeg libavcodec version Lavc52.87.4
ffmpeg libavformat version Lavf52.78.3
ffmpeg swscaler version SwS0.11.0