Recherche avancée

Médias (91)

Autres articles (71)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (8267)

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

  • Optimize ffmpeg overlay and loop filters

    5 novembre 2020, par Miro Barsocchi

    I have a video, video.mp4, of 30 seconds, and I have an audio that can change in length, audio.mp3.

    &#xA;

    My final idea is to have an output video of a loop of video.mp4 for the total length of the audio.mp3, and an overlay of the waveform of the audio.mp3. What I've done is this, in a bash script :

    &#xA;

    # calculate length of the audio and of the video&#xA;tot=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 audio.mp3)&#xA;vid=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 video.mp4)&#xA;# how many base video we need to loop into the waveform video?&#xA;repeattime=`echo "scale=0; ($tot&#x2B;$vid-1)/$vid" | bc`&#xA;&#xA;# ffmpeg final command&#xA;ffmpeg -stream_loop $repeattime -i video.mp4 -i audio.mp3 -filter_complex "[1:a]showwaves=s=1280x100:colors=Red:mode=cline:rate=25:scale=sqrt[outputwave]; [0:v][outputwave] overlay=0:main_h-overlay_h [out]" -map &#x27;[out]&#x27; -map &#x27;1:a&#x27; -c:a copy -y output.mp4&#xA;

    &#xA;

    Is there a better way to do it in a single ffmpeg command ? I know it exists the loop filter in ffmpeg, but it loops frames and I don't know the number of frames of the video.mp4. Also, using $repeattime can result in a number of loop longer then needed (because math calculation is done round up)

    &#xA;