Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (50)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (8489)

  • Average set of 5 frames into single output frames

    1er février, par xnx

    I would like to average the values of sequences of frames into a single output frames. I think this would be the ffmpeg tmix filter, but I can't find the right setting.

    


    Example behavior :

    


    Input video frames: 1,2,3,4,5 -> Output video frame: 1
Input video frames: 6,7,8,9,10 -> Output video frame: 2
Input video frames: 11,12,13,14,15 -> Output video frame: 3
etc.


    


    How could I do this with ffmpeg, or any other tool ?

    


  • avfilter/vf_vfrdet : also report average delta

    29 octobre 2019, par Paul B Mahol
    avfilter/vf_vfrdet : also report average delta
    
    • [DH] doc/filters.texi
    • [DH] libavfilter/vf_vfrdet.c
  • FFMPEG Determine average color of an area of a video

    12 novembre 2019, par Naved Khan

    I 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.size

    I am also confused about how to use the resulting average_black_distance and average_white_distance to determine which watermark to use.