
Recherche avancée
Médias (1)
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
Autres articles (111)
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
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" -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (10004)
-
avfilter/scale_eval : Reduce rounding error.
26 septembre 2022, par Tristan Schmelcheravfilter/scale_eval : Reduce rounding error.
When force_original_aspect_ratio and force_divisible_by are both
used, dimensions are now rounded to the nearest allowed multiple of
force_divisible_by rather than first rounding to the nearest integer and
then rounding in a static direction. This results in less distortion of
the aspect ratio.Reviewed-by : Thierry Foucu <tfoucu@google.com>
Signed-off-by : Tristan Schmelcher <tschmelcher@google.com>
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
Implementing picture zoom effect using Rmagick and FFmpeg
26 juin 2013, par DenisKoI have a picture and I need to get zoom effect on the resulting video. I almost get the desired result.. but. The resulting picture looks a bit shaky. It's because of rounding on cropping and resizing.. so centre of the picture shifts slightly with each conversion. What can i do with that ? Or maybe there is some other method to implement it ?
In the input I have
picture,zoom_type,zoom_percent,zoom_duration,scene_duration
Here is part of the code which making the job :img = Magick::ImageList.new(picture).first
width, height = img.columns.to_f, img.rows.to_f
img_fps = 30
if width >= height
aspect_ratio = (width / height)
zoom_small_size = ((height * (100 - zoom_percent)) / 100).to_f
small_size = height
else
aspect_ratio = (height / width)
zoom_small_size = ((width * (100 - zoom_percent)) / 100).to_f
small_size = width
end
factor = (((small_size - zoom_small_size) / (img_fps * zoom_duration))).to_f
while factor < 2
img_fps -= 1
factor = ((small_size - zoom_small_size) / (img_fps * zoom_duration))
end
total_images = img_fps * scene_duration
zoom_images = img_fps * zoom_duration_seed
new_width = width
new_height = height
zoom_changed_small_size = small_size
total_images.times do |i|
if zoom_images > 0 && zoom_changed_small_size > zoom_small_size
img_n = img.crop(new_width, new_height, true)
new_width = (width <= height) ? (new_width - factor).round : (new_width-factor*aspect_ratio).round
new_height = (width >= height) ? (new_height-factor).round : (new_height-factor*aspect_ratio).round
zoom_changed_small_size = (width >= height) ? img_n.rows : img_n.columns
img_n.resize_to_fill!(width, height)
img_n.write("#{sprintf("img_%04d.jpg" % (i+1))}")
zoom_images -= 1
img = img_n.copy if zoom_images == 0 || zoom_changed_small_size <= zoom_small_size
img_n.destroy!
else
img.write("#{sprintf("img_%04d.jpg" % (i+1))}")
puts "Writing - #{img.filename}"
end
endThen ffmpeg -y -f image2 -r 30 -i img_%04d.jpg -crf 0 -preset ultrafast -tune stillimage -pix_fmt yuv420p out.mp4
-
FFMPEG Video Thumbnail images Php
20 juillet 2014, par rdxhereI need to get middle of video frame depend on video duration.
I set the $frame = $mov->getFrame(480) ; it’s get only when the 480 frame. I need to set middle of the frame image. Here is code :
<?php
$W = intval($_GET['W']);
$H = intval($_GET['H']);
$pic = ''.htmlspecialchars($_GET['file']).'';
$name = 'wapadmin/'.str_replace('/','--',$pic).'.gif';
$location = 'http://'.str_replace(array('\\','//'),array('/','/'),$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'.$name);
if(file_exists($name)){
header('Location: '.$location, true, 301);
exit;
}
$mov = new ffmpeg_movie($pic, false);
$wn = $mov->GetFrameWidth();
$hn = $mov->GetFrameHeight();
$frame = $mov->getFrame(480);
$gd = $frame->toGDImage();
if(!$W and !$H){
$a = "131*79";
$size = explode('*',$a);
$W = round(intval($size[0]));
$H = round(intval($size[1]));
}
$new = imageCreateTrueColor($W, $H);
imageCopyResampled($new, $gd, 0, 0, 0, 0, $W, $H, $wn, $hn);
imageGif($new, $name, 100);
header('Location: '.$location, true, 301);
?>