Recherche avancée

Médias (91)

Autres articles (49)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (5053)

  • How to duplicate an audio file or trim it to a specific length in ffmpeg ?

    21 octobre 2023, par Руслан Лысенко

    I want to combine a video file (with audio) and an audio file together to get one output file.

    


    Most importantly, I need to do the following.

    


    If the length of the video file is longer, then you need to increase the length of the audio file to this length.

    


    If the audio file is longer than the video file, then make the audio file shorter to match the length of the video.

    


    Example :

    


    Video 2 minutes 5 seconds

    


    Audio 1 minute -> duplicated to 2 minutes 5 seconds.

    


    If

    


    Video 1 minute

    


    Audio 2 minutes 5 seconds -> trimmed to 1 minute.

    


    But, I can't even increase the length of the audio file.

    


    export async function overlayAudio(id: number, music: Music) {
  console.log('start')
  const videoPath = path.join(__dirname, `../../../uploads/movie/${id}/result/movie/predfinal.mp4`);
  
  if (music === null) {
    return videoPath.match(/\\uploads(.*)/)[0];
  } else {
    const audioPath = path.join(__dirname, `../../../${music.audio}`);
    const outputVideoPath = path.join(__dirname, `../../../uploads/movie/${id}/result/movie/output.mp4`);
    const matchPath = outputVideoPath.match(/\\uploads(.*)/);
    const cmd = `ffmpeg -i ${videoPath} -i ${audioPath} -filter_complex "[0:a]volume=1[a];[1:a]volume=0.2[b];[b]apad[looped_audio];[a][looped_audio]amix=inputs=2:duration=longest" -c:v copy -c:a aac -strict experimental -shortest ${outputVideoPath}`;

    try {
      await execPromise(cmd);
      console.log('end!')
      return matchPath[0];
    } catch (error) {
      console.error('Error:', error);
      throw error;
    }
  }
}



    


  • dashenc : Write segment timelines properly if the timeline has gaps

    28 novembre 2014, par Martin Storsjö
    dashenc : Write segment timelines properly if the timeline has gaps
    

    Write a new start time if the duration of the previous segment
    didn’t match the start of the next one. Check that segments
    actually are continuous before writing a repeat count.

    This makes sure timestamps deduced from the timeline actually
    match the real start timestamp as written in filenames (if
    using a template containing $Time$).

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] libavformat/dashenc.c
  • find matching files using a.bat script and assign them to a variable ?

    2 octobre 2019, par A Person

    I am trying to assign a file to a variable in batch-file and then also assign anoter 2 files into anoter variable.

    However, i am having an issue.

    From research, i found how i can do the assigning but does anyone know how i can do the below.

    From a folder or text file (either is fine) find the .m2v video file and assign that to Var1 then find matching audio in .wav and put that in Var2 and the third is also an audio .wav with mathcing name and assign that to Var3.

    Problem i am having is that trying to find the matching 2 audio file to the video.

    The video file is named as PAV_PRG_13683Highc450277201906251802090353.m2v

    Audio 1 is : PAV_PRG_13683High01c450211201906251802090376.wav

    Audio 2 is : PAV_PRG_13683High00c450211201906251802090368.wav

    the file name matches until it sees the word High. Everything after High is not needed and is random string so trying to match is an issue.

    is there a way to find the match by comparing everything before High.

    Also as i will be using the variable and putting them through ffmpeg to merge, is there way to do it so that when the ffmpeg command is done, it moves to the next matching files and assigns them to the variable.

    files are store in 2 folders

    One folder has all the video files *.m2v

    and another folder has all the *.wav audio files in pairs of 2. Each video has exactly 2 audios (left right audio)

    is there any hel pon this subject, i have already come up empty in my research and have been checking for this over the last week spent almost 30 hours.