Recherche avancée

Médias (0)

Mot : - Tags -/médias

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

Autres articles (44)

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (5487)

  • Trim with transition/fade using FFMPEG given a list of timestamps

    19 janvier 2024, par realsarm

    I have a video and a list of timestamps that I want to filter.

    


    [
  {
    "timestamp": [10, 20],
    "state": true
  },
  {
    "timestamp": [30, 40],
    "state": false
  },
  {
    "timestamp": [50, 60],
    "state": true
  },
  {
    "timestamp": [70, 80],
    "state": true
  }
]


    


    I have a script like this to trim based on state.

    


        video_path = Path(video_in.name)
    video_file_name = video_path.stem

    timestamps_to_cut = [
        (timestamps_var[i]['timestamp'][0], timestamps_var[i]['timestamp'][1])
        for i in range(len(timestamps_var)) if timestamps_var[i]['state']]

    between_str = '+'.join(
        map(lambda t: f'between(t,{t[0]},{t[1]})', timestamps_to_cut))

    if timestamps_to_cut:
        video_file = ffmpeg.input(video_path)
        video = video_file.video.filter(
            "select", f'({between_str})').filter("setpts", "N/FRAME_RATE/TB")
        audio = video_file.audio.filter(
            "aselect", f'({between_str})').filter("asetpts", "N/SR/TB")

        output_video = f'./videos_out/{video_file_name}.mp4'
        ffmpeg.concat(video, audio, v=1, a=1).output(
            output_video).overwrite_output().global_args('-loglevel', 'quiet').run()


    


    How can I smooth out this trimming like adding a fade or smoothing transition each time state is false ?

    


  • Evolution #3290 (En cours) : direction_css et italique

    22 octobre 2014, par cedric -

    Corrigé dans neo-dist par http://zone.spip.org/trac/spip-zone/changeset/85456
    (avec un selecteur un peu moins méchant)
    A voir pour traiter automatiquement dans direction_css si c’est possible, mais pas forcément evident à traiter dans tous les cas... Ou alors on ajoute la regle generique
    [dir="rtl"] *{ font-style: normal !important } dans les feuilles rtl uniquement ?

  • Fluent-ffmpeg randomly doesn't add the text I want to the video, even though it's in the filters

    15 décembre 2022, par ToborWinner

    I am making a simple script to add some text to a 4 seconds video, it all works fine, but sometimes it randomly doesn't add some of the text.
You can find here the relevant parts of my code :

    


    
const video = ffmpeg('path/to/video.mp4')

let index = 0
let left = true

const filters = [{
  filter: 'drawtext',
  options: {
    //fontfile:'font.ttf',
    text: title,
    fontsize: 30,
    fontcolor: 'white',
    x: '(main_w/2-text_w/2)',
    y: 130,
    shadowcolor: 'black',
    shadowx: 2,
    shadowy: 2
  }
}]

for (let thought of thoughts) {
    if (thought.length == 0) {
      continue
    }
    thought = wrap(thought, {width: 35})
    const strings = thought.split("\n")
    let line = 0
    for (const string of strings
      .filter(string => string.length > 0)
      .map(string => string.trim())
      ) {
      let yoffset = 130+(130*(index+1))+(line*20)
      if (yoffset < 0) {
        yoffset = 0
      }
      console.log(string, yoffset)
      filters.push({
        filter: 'drawtext',
        options: {
          //fontfile:'font.ttf',
          text: string,
          fontsize: 18,
          fontcolor: 'white',
          x: `(main_w${left ? "*0.3" : "*0.7"}-text_w/2)`,
          y: yoffset,
          shadowcolor: 'black',
          shadowx: 2,
          shadowy: 2
        }
      })
      line++;
    }
    index++;
    left = !left
  }


video.videoFilters(filters)
video.noAudio()


video.save('path/to/output.mp4');



    


    The wrap function comes from the package word-wrap (const wrap = require('word-wrap');)
Thoughts is a list of strings that aren't too long (with the wrap function they end up being like 2-4 lines).

    


    This is inside an async function.

    


    For some reason only a few lines appear on the output video.
Sometimes, when it doesn't do that, it also throws an error saying that one of the inputs is invalid (while processing filters).
The wrap function seems to work, and also the yoffset, I have printed them.

    


    If someone has an idea why, please help me solve this.

    


    I tried chasing the text in thoughts, and for example, this works with no problems (shows the title, and the texts right, left, right, left, ...).

    


    const thoughts = ["Nothing is on fire, fire is on things","Nothing is on fire, fire is on things","Nothing is on fire, fire is on things","Nothing is on fire, fire is on things","Nothing is on fire, fire is on things"]