Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

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

Autres articles (56)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (7774)

  • 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.

  • How to find higest bitrate in mp4 file and extract jpg ?

    10 octobre 2018, par Igor Petev

    I im using ffmpeg and have mp4 file that is in size around 50MB and duration 2m7sec.I need to write batch script for windows that will read whole mp4 file find position in seconds where higest bitrate is there and extract jpg image from that position.

    For example, i have mp4 trailer file that i would like to extract cover, using above script where i define time to extract jpg i get on some mp4 trailers black screen...so using above idea to find higet bitrate for shure will not be black screen, will be picture of some scene.

    Here is windows batch code that extract jpg dfrom mp4 using user defined time :

    @ECHO OFF
    SET oldName=
    SET newName=

    FOR %%A IN (*.mp4) DO (
    SET oldName=%%A
    SET newName=%%A
    CALL :MAKEJPG
    )

    :MAKEJPG
    SET newName=%newName:mp4=jpg%
    IF NOT EXIST %newName% (
    START /B /WAIT D:\www\ffmpeg.exe -i "%oldName%" -ss 00:00:17.30 -vcodec mjpeg -vframes 1 -f image2 "%newName%"
    EXIT
    )
  • How to rotate two overlay parallel using FFmpeg

    17 juin 2021, par Pradeep Kumar

    I want to continue rotate two overlay image parallelly depend on the audio length.

    


    I am using below command and it is working fine to create a video and it is rotating the first overlay gif image. but it is not rotating the second textoverlay.png file. I want to rotate both image in the same time.

    


    ffmpeg -loop,1,-i,background.jpg,-ignore_loop,0,-i,overlay1.gif,-i,textoverlay.png,-i,watermark.png,-i,audio.mp3,-filter_complex,[1]scale=524:524,rotate=0.06*PI*t:c=black@0.0:ow='hypot(iw,ih)':oh=ow[b];[2]scale=406:406,rotate=0.06*PI*t:c=black@0.0:ow='hypot(iw,ih)':oh=ow[pic2];[3]scale=100:50[watermark];[0:v][b]overlay=(W-w)/2:(H-h)/2[over1],[over1][pic2]overlay=(W-w)/2:(H-h)/2[pic3],[pic3][watermark]overlay=(W-120):(H-60),scale=830:830,format=yuv420p,-ss,00:00:00,-to,00:00:08,-c:v,mpeg4,-b:a,3M,-c:a,aac,-b:a,192k,-q:v,1,-shortest,output.mp4


    


    I also tried this link But this is not working.
    
Any help would be appreciated.
    
Thanks in advance.