Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (62)

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

  • 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

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (12156)

  • Overlay a video and an image over a background video and shift that background video's position to the right

    4 août 2023, par sybr

    I'm currently working on a way to improve my production process for the videos that I'm making. I usually edit videos using two folders full of clips. Being able to automate putting these together in Premiere would save me a lot of time.

    


    I'm using the FFMpegCORE C# library, as well as Xabe.FFMpeg to achieve what I'm trying to do, and I've currently reached the point of creating two separate videos using the clips I mentioned earlier.

    


    The final step that I need to solve is to overlay the overlay video (overlay.mp4) over the background video (background.mp4), add an overlay image to add a clean divider (overlay.png) between the edges of the videos, and to somehow shift the position of the background video 33% to the right (background.mp4).

    


    This is the script I've come up with so far :

    


    ffmpeg -i overlay.mp4 -i background.mp4 -i overlay.png -filter_complex \ 
"[1:v]scale=608:1080[a]; [0:v]pad=1920:1080[b]; [b][a]overlay[out]; \
[out][2:v]overlay[out]; [0][1]amix[a];" \
-map [out] -map [a] -c:v libx264 -crf 30 -pix_fmt yuv420p -y output.mp4


    


    Is there a way to shift the background video to the right ? Or should I manually edit the video files ?

    


    Would love some help here, also eager to learn more about FFmpeg, so some explanation would be highly appreciated !

    


    Edit :

    


    Just found the solution, padding the background video for 33% and then cropping the final out back to 1920x1080 seemed to do the trick !

    


    ffmpeg -i overlay.mp4 -i background.mp4 -i overlay.png -filter_complex "[1:v]scale=608:1080[a]; [0:v]pad=2560:0:x=1920:y=1080[b]; [b][a]overlay[out]; [out][2:v]overlay[out]; [out]crop=1920:1080:0:0[out]; [0][1]amix[a];" -map [out] -map [a] -c:v libx264 -crf 30 -pix_fmt yuv420p -y output.mp4


    


  • Fluent ffmpeg not running synchronously

    14 mai 2022, par sciencaholic

    I am writing a program where I need to process a video multiple times using ffmpeg. The ffmpeg codes (below) are inside a 'then' statement of a promise.

    



    ffmpeg(path)
  .size('640x?')
  .aspect('1:1')
  .autopad('#682BAB')
  .saveToFile(`${userDirPath}/11-${userFileName}`)
  .on('end', () => {
    ffmpeg()
      .input('test-11-start.mp4')
      .mergeAdd(`${userDirPath}/11-${userFileName}`)
      .mergeAdd('test-11-end.mp4')
      .mergeToFile(`${userDirPath}/11-final-${userFileName}`, 'temp/')
      .on('end', () => console.log('FFmpeg done!'));
  });


    



    There is another ffmpeg function after this (same, but with a different aspect ratio) and then, a 'then' statement with some other functions.

    



    The problem is that this ffmpeg function runs asynchronously, and the next statements (which use the resulting file of ffmpeg func) are executed before it finishes executing and so I want it to run synchronously. I've tried async await (below) but it still runs asynchronously. What is wrong with code ?

    



    async function ffmpegMerge() {
  try {
    await ffmpeg(path)
    .size('640x?')
    .aspect('1:1')
    .autopad('#682BAB')
    .saveToFile(`${userDirPath}/11-${userFileName}`)
    .on('end', () => {
      ffmpeg()
        .input(`test-11-start.mp4`)
        .mergeAdd(`${userDirPath}/11-${userFileName}`)
        .mergeAdd(`test-11-end.mp4`)
        .mergeToFile(`${userDirPath}/11-final-${userFileName}.mp4`, 'temp/')
        .on('end', () => console.log('FFmpeg done!'));
    })
  }
  catch (err) {
    return Promise.reject(new Error(err));
  }
}


    


  • ffmpeg kit flutter IOS No such filter : 'drawtext' Error

    6 août 2023, par Patel Milan

    I am using ffmpeg_kit_flutter and apply drawtext filter on video but i am getting errors No such filter: 'drawtext'

    


    input video link is input.mp4

    


    This command it working

    


    ffmpeg -y -i input.mp4 -filter_complex '[0]scale=540:-1[s];[s]drawtext=text='your_text_here':fontsize=24:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2' output.mp4


    


    code sample is bellow

    


    /// Create Video With Text&#xA;Future<void> createVideoWithText() async {&#xA;  final file = File(&#x27;${(await getTemporaryDirectory()).path}/output.mp4&#x27;);&#xA;  String outPut = file.path;&#xA;&#xA;  String command = "-y -i $inputFilePath -filter_complex &#x27;[0]scale=540:-1[s];[s]drawtext=text=&#x27;MY_TEXT&#x27;:fontsize=24:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2&#x27; $outPut";&#xA;&#xA;  FFmpegKit.executeAsync(&#xA;    command,&#xA;    (session) async {&#xA;      final returnCode = await session.getReturnCode();&#xA;&#xA;      if (ReturnCode.isSuccess(returnCode)) {&#xA;print(&#x27;Success full add text on video&#x27;);&#xA;      }else{print(&#x27;Error to adding text on video&#x27;);}&#xA;    },&#xA;  );&#xA;}&#xA;</void>

    &#xA;