Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (76)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (11444)

  • How to add fade out effect after merging two audio files using ffmpeg ?

    28 décembre 2020, par Bucky

    I tried merging two audio files using following command,

    


     executeFfmpeg(`-i voice.wav -i background.wav -t ${duration+2} -filter_complex amix=inputs=2:duration=longest output.wav`)
        .on('error', function(err) {
          console.log('An error occurred: ' + err.message);
        })
        .on('end', function() {
          console.log('Merging finished !');
        }).run();


    


    But I also want to fade out the audio in the end,
So to do that I tried the following code,

    


      executeFfmpeg(`-i voice.wav -i background.wav -t ${duration+2} -vf "fade=t=out:st=${duration-1}:d=3" -filter_complex amix=inputs=2:duration=longest output.wav`)
        .on('error', function(err) {
          console.log('An error occurred: ' + err.message);
        })
        .on('end', function() {
          console.log('Merging finished !');
        }).run();


    


    But the background audio volume is unchanged. Working with ffmpeg for the first time. So don't know what's happening. Need help :(

    


  • How create a circular video (transparent area on top of video) effect without applying image mask to video

    26 septembre 2024, par Arina Lubimova

    Basically i googled a lot and solutions suggests apply some PNG mask or do not provide needed solution.

    


    What i've found.

    


    ffmpeg -i main.mkv -i facecloseup.mkv
 -filter_complex "[1]trim=end_frame=1,
  geq='st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3),pow(min(W/2,H/2),2)),255,0)':128:128,
  loop=-1:1,setpts=N/FRAME_RATE/TB[mask];
  [1][mask]alphamerge[cutout];
  [0][cutout]overlay=x=W-w:y=0[v];
  [0][1]amix=2[a]"
 -map "[v]" -map "[a]"  out.mp4


    


    command = "-i " + this.video1Path.getPath() + " -i " + this.video2Path.getPath() + " -filter_complex [1]trim=end_frame=1,geq=lum_expr='st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3)," + (this.mZoomLayout.getZoomedWidth()/2) + "*" + (this.mZoomLayout.getZoomedWidth()/2) + "),255,0)':128:128,format=gray,loop=-1:1,setpts=N/FRAME_RATE/TB[mask];[1][mask]alphamerge,format=rgba,lutrgb=a=if(gte(val\\,16)\\,val)[cutout];[0][cutout]overlay=" + this.mZoomLayout.getCircleX() + ":" + this.mZoomLayout.getCircleY() + ":enable='between(t,0," + this.videoTwoDuration + ") -c:v libx264 -crf 24 -preset ultrafast " + videoPath.getPath(); 


    


    So i tried to extract needed things from them, but i don't understand how exactly i need to do that, i did this :

    


    ffmpeg -i video.mp4 -filter_complex "[0]geq='st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3),pow(min(W/2,H/2),2)),255,0)':H:W; [0:v][mask]alphamerge" out.mp4


    


    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001f761dd8e40] Invalid stream specifier: mask.
    Last message repeated 1 times
Stream specifier 'mask' in filtergraph description [0]geq='st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3),pow(min(W/2,H/2),2)),255,0)':H:W; [0:v][mask]alphamerge matches no streams.


    


    ffmpeg -i video.mp4 -filter_complex "[0]geq=lum_expr='st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3),pow(min(W/2,H/2),2)),255,0)':H:W; [0:v][mask]alphamerge" out.mp4


    


    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001bfd9218e80] Invalid stream specifier: mask.
    Last message repeated 1 times
Stream specifier 'mask' in filtergraph description [0]geq=lum_expr='st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3),pow(min(W/2,H/2),2)),255,0)':H:W; [0:v][mask]alphamerge matches no streams.


    


    And one more time, guys, if you are going to post some "prepared image mask" solution - just leave, the question is about creating mask on air.

    


    So, let's say we have red square (yes, ratio is static, always 1:1), yes, i can't post it because i dont have 10 rep. (...).

    


    https://i.sstatic.net/MsL71.png - red square.

    


    https://i.sstatic.net/aIFEV.png - circle

    


    https://i.sstatic.net/R8EAx.png - result

    


    https://i.sstatic.net/WtqQg.png - final result

    


    I actually want to get the answer from @Gyan or @llogan because i searched a lot and only these two guys do understand how to make things programmatically.

    


    More tech details :
Aspect ratio is constant - 1:1, width and height should be taken from the video in auto way, we need to create a white square with transparent circle inside it, the end result must contain "rounded" video with white background.

    


  • Remove Static Pixels from a Video to Mimic a Green Screen Effect [closed]

    2 août 2021, par nKrkan

    I have a video that's 50 seconds in length, resolution of 480x480 and 16 frames per second.

    


    There is a person talking in it, with the background being static I thought if there's a way
    
to remove those static pixels (background) and just extract the moving pixels (foreground)
    
and possibly mimic a green screen effect ?

    


    I was thinking on writing a picture-by-picture comparison tool to do such thing but I don't
    
believe I'm up to the task, or maybe It's laziness.

    


    And now I know, some of you will point out that the video has compression artifacts and that
    
might cause some problems but It doesn't have to be Studio quality stuff.

    


    I tried the ffmpeg command from this question : Remove random background from video using ffmpeg or Python
    
And it does mask the person, but... I couldn't quite get it to work, apparently putting the
    
reference image in the input makes that image burned into the video, thus having no way to
    
remove it, but it did mask the background as black and the person as greenish, so still not a
    
viable way to do it.

    


    Have also tried some Python projects I've found on the GitHub but none of them worked as
    
I expected.

    


    So, what I thought to do is simply compare the first and the second frame of the video, check
    
all the pixels by comparing them with the two sources, and change those that stay within a
    
certain range of the initial pixel value.

    


    I should point out I'm not very knowledgeable with mathematics and the majority of the
    
methods used in these type of things, but perhaps someone could point me to an interesting
    
source to read and learn, or by providing an alternative to the methods aforementioned above.