Recherche avancée

Médias (0)

Mot : - Tags -/navigation

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

Autres articles (70)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

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

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

Sur d’autres sites (11260)

  • AWS Lambda : ffmpeg thumbnails Generator : empty JPG

    3 septembre 2020, par Magikey

    When a video is uploaded on S3 i want to store a JPG screenshot.

    



    On a lambda function with amazon AWS, i do :

    



    ...

  let tmpFile = createWriteStream(`/tmp/screenshot.jpg`)

  var ffmpeg = spawn(ffmpegPath, [
      "-ss","00:00:05",
      "-i", target,
      "-vf", "thumbnail,scale=200:200", 
      "-qscale:v" ,"2",
      "-frames:v", "1",
      "-f", "image2",
      "-c:v", "mjpeg",
      "pipe:1"
    ]);

  ffmpeg.stdout.pipe(tmpFile).on("error", err => {
      console.log("Error A: ",err);
    });

  ffmpeg.on('error', err => {
    console.log("Error B", err)
    reject()
  })

  ffmpeg.on('close', code => {
    tmpFile.end();
    console.log('Log A', ffmpeg);

    child_process.exec("echo `ls -l -R /tmp`",
      (error, stdout, stderr) => {
        console.log(stdout)
    });

    resolve()
  })
...


    



    But the result is an empty JPG file in S3.

    



    Logs shows no errors, my "target" is OK, stdout ls show me the empty JPG file.

    



    I have try a lot of things, like use other version of ffmpeg but same.

    



    There is the "console.log('Log A', ffmpeg)" :

    



    ChildProcess {
 _events: [Object: null prototype] { error: [Function], close: [Function] },
 _eventsCount: 2,
 _maxListeners: undefined,
 _closesNeeded: 3,
 _closesGot: 3,
 connected: false,
 signalCode: 'SIGSEGV',
 exitCode: null,
 killed: false,
 spawnfile: '/opt/nodejs/ffmpeg',
 _handle: null,
 spawnargs: [
   '/opt/nodejs/ffmpeg',
   '-ss',
   '00:00:05',
   '-i',
   'https://xxxxxxxxx',
   '-vf',
   'thumbnail,scale=200:200',
   '-qscale:v',
   '2',
   '-frames:v',
   '1',
   '-f',
   'image2',
   '-v',
   '16',
   '-c:v',
   'mjpeg',
   'pipe:1'
 ],
 pid: 24,
 stdin: Socket {
   connecting: false,
   _hadError: false,
   _parent: null,
   _host: null,
   _readableState: ReadableState {
     objectMode: false,
     highWaterMark: 16384,
     buffer: BufferList { head: null, tail: null, length: 0 },
     length: 0,
     pipes: null,
     pipesCount: 0,
     flowing: null,
     ended: false,
     endEmitted: false,
     reading: false,
     sync: true,
     needReadable: false,
     emittedReadable: false,
     readableListening: false,
     resumeScheduled: false,
     paused: true,
     emitClose: false,
     autoDestroy: false,
     destroyed: true,
     defaultEncoding: 'utf8',
     awaitDrain: 0,
     readingMore: false,
     decoder: null,
     encoding: null
   },
   readable: false,
   _events: [Object: null prototype] { end: [Function: onReadableStreamEnd] },
   _eventsCount: 1,
   _maxListeners: undefined,
   _writableState: WritableState {
     objectMode: false,
     highWaterMark: 16384,
     finalCalled: false,
     needDrain: false,
     ending: false,
     ended: false,
     finished: false,
     destroyed: true,
     decodeStrings: false,
     defaultEncoding: 'utf8',
     length: 0,
     writing: false,
     corked: 0,
     sync: true,
     bufferProcessing: false,
     onwrite: [Function: bound onwrite],
     writecb: null,
     writelen: 0,
     bufferedRequest: null,
     lastBufferedRequest: null,
     pendingcb: 0,
     prefinished: false,
     errorEmitted: false,
     emitClose: false,
     autoDestroy: false,
     bufferedRequestCount: 0,
     corkedRequestsFree: [Object]
   },
   writable: false,
   allowHalfOpen: false,
   _sockname: null,
   _pendingData: null,
   _pendingEncoding: '',
   server: null,
   _server: null,
   [Symbol(asyncId)]: 5,
   [Symbol(kHandle)]: null,
   [Symbol(lastWriteQueueSize)]: 0,
   [Symbol(timeout)]: null,
   [Symbol(kBuffer)]: null,
   [Symbol(kBufferCb)]: null,
   [Symbol(kBufferGen)]: null,
   [Symbol(kBytesRead)]: 0,
   [Symbol(kBytesWritten)]: 0
 },
 stdout: Socket {
   connecting: false,
   _hadError: false,
   _parent: null,
   _host: null,
   _readableState: ReadableState {
     objectMode: false,
     highWaterMark: 16384,
     buffer: BufferList { head: null, tail: null, length: 0 },
     length: 0,
     pipes: null,
     pipesCount: 0,
     flowing: false,
     ended: true,
     endEmitted: true,
     reading: false,
     sync: false,
     needReadable: false,
     emittedReadable: false,
     readableListening: false,
     resumeScheduled: false,
     paused: false,
     emitClose: false,
     autoDestroy: false,
     destroyed: true,
     defaultEncoding: 'utf8',
     awaitDrain: 0,
     readingMore: false,
     decoder: null,
     encoding: null
   },
   readable: false,
   _events: [Object: null prototype] {
     end: [Function: onReadableStreamEnd],
     close: [Function]
   },
   _eventsCount: 2,
   _maxListeners: undefined,
   _writableState: WritableState {
     objectMode: false,
     highWaterMark: 16384,
     finalCalled: false,
     needDrain: false,
     ending: false,
     ended: false,
     finished: false,
     destroyed: true,
     decodeStrings: false,
     defaultEncoding: 'utf8',
     length: 0,
     writing: false,
     corked: 0,
     sync: true,
     bufferProcessing: false,
     onwrite: [Function: bound onwrite],
     writecb: null,
     writelen: 0,
     bufferedRequest: null,
     lastBufferedRequest: null,
     pendingcb: 0,
     prefinished: false,
     errorEmitted: false,
     emitClose: false,
     autoDestroy: false,
     bufferedRequestCount: 0,
     corkedRequestsFree: [Object]
   },
   writable: false,
   allowHalfOpen: false,
   _sockname: null,
   _pendingData: null,
   _pendingEncoding: '',
   server: null,
   _server: null,
   write: [Function: writeAfterFIN],
   [Symbol(asyncId)]: 6,
   [Symbol(kHandle)]: null,
   [Symbol(lastWriteQueueSize)]: 0,
   [Symbol(timeout)]: null,
   [Symbol(kBuffer)]: null,
   [Symbol(kBufferCb)]: null,
   [Symbol(kBufferGen)]: null,
   [Symbol(kBytesRead)]: 0,
   [Symbol(kBytesWritten)]: 0
 },
 stderr: Socket {
   connecting: false,
   _hadError: false,
   _parent: null,
   _host: null,
   _readableState: ReadableState {
     objectMode: false,
     highWaterMark: 16384,
     buffer: BufferList { head: null, tail: null, length: 0 },
     length: 0,
     pipes: null,
     pipesCount: 0,
     flowing: null,
     ended: true,
     endEmitted: true,
     reading: false,
     sync: false,
     needReadable: false,
     emittedReadable: false,
     readableListening: false,
     resumeScheduled: false,
     paused: true,
     emitClose: false,
     autoDestroy: false,
     destroyed: true,
     defaultEncoding: 'utf8',
     awaitDrain: 0,
     readingMore: false,
     decoder: null,
     encoding: null
   },
   readable: false,
   _events: [Object: null prototype] {
     end: [Function: onReadableStreamEnd],
     close: [Function]
   },
   _eventsCount: 2,
   _maxListeners: undefined,
   _writableState: WritableState {
     objectMode: false,
     highWaterMark: 16384,
     finalCalled: false,
     needDrain: false,
     ending: false,
     ended: false,
     finished: false,
     destroyed: true,
     decodeStrings: false,
     defaultEncoding: 'utf8',
     length: 0,
     writing: false,
     corked: 0,
     sync: true,
     bufferProcessing: false,
     onwrite: [Function: bound onwrite],
     writecb: null,
     writelen: 0,
     bufferedRequest: null,
     lastBufferedRequest: null,
     pendingcb: 0,
     prefinished: false,
     errorEmitted: false,
     emitClose: false,
     autoDestroy: false,
     bufferedRequestCount: 0,
     corkedRequestsFree: [Object]
   },
   writable: false,
   allowHalfOpen: false,
   _sockname: null,
   _pendingData: null,
   _pendingEncoding: '',
   server: null,
   _server: null,
   write: [Function: writeAfterFIN],
   [Symbol(asyncId)]: 7,
   [Symbol(kHandle)]: null,
   [Symbol(lastWriteQueueSize)]: 0,
   [Symbol(timeout)]: null,
   [Symbol(kBuffer)]: null,
   [Symbol(kBufferCb)]: null,
   [Symbol(kBufferGen)]: null,
   [Symbol(kBytesRead)]: 0,
   [Symbol(kBytesWritten)]: 0
 },
 stdio: [
   Socket {
     connecting: false,
     _hadError: false,
     _parent: null,
     _host: null,
     _readableState: [ReadableState],
     readable: false,
     _events: [Object: null prototype],
     _eventsCount: 1,
     _maxListeners: undefined,
     _writableState: [WritableState],
     writable: false,
     allowHalfOpen: false,
     _sockname: null,
     _pendingData: null,
     _pendingEncoding: '',
     server: null,
     _server: null,
     [Symbol(asyncId)]: 5,
     [Symbol(kHandle)]: null,
     [Symbol(lastWriteQueueSize)]: 0,
     [Symbol(timeout)]: null,
     [Symbol(kBuffer)]: null,
     [Symbol(kBufferCb)]: null,
     [Symbol(kBufferGen)]: null,
     [Symbol(kBytesRead)]: 0,
     [Symbol(kBytesWritten)]: 0
   },
   Socket {
     connecting: false,
     _hadError: false,
     _parent: null,
     _host: null,
     _readableState: [ReadableState],
     readable: false,
     _events: [Object: null prototype],
     _eventsCount: 2,
     _maxListeners: undefined,
     _writableState: [WritableState],
     writable: false,
     allowHalfOpen: false,
     _sockname: null,
     _pendingData: null,
     _pendingEncoding: '',
     server: null,
     _server: null,
     write: [Function: writeAfterFIN],
     [Symbol(asyncId)]: 6,
     [Symbol(kHandle)]: null,
     [Symbol(lastWriteQueueSize)]: 0,
     [Symbol(timeout)]: null,
     [Symbol(kBuffer)]: null,
     [Symbol(kBufferCb)]: null,
     [Symbol(kBufferGen)]: null,
     [Symbol(kBytesRead)]: 0,
     [Symbol(kBytesWritten)]: 0
   },
   Socket {
     connecting: false,
     _hadError: false,
     _parent: null,
     _host: null,
     _readableState: [ReadableState],
     readable: false,
     _events: [Object: null prototype],
     _eventsCount: 2,
     _maxListeners: undefined,
     _writableState: [WritableState],
     writable: false,
     allowHalfOpen: false,
     _sockname: null,
     _pendingData: null,
     _pendingEncoding: '',
     server: null,
     _server: null,
     write: [Function: writeAfterFIN],
     [Symbol(asyncId)]: 7,
     [Symbol(kHandle)]: null,
     [Symbol(lastWriteQueueSize)]: 0,
     [Symbol(timeout)]: null,
     [Symbol(kBuffer)]: null,
     [Symbol(kBufferCb)]: null,
     [Symbol(kBufferGen)]: null,
     [Symbol(kBytesRead)]: 0,
     [Symbol(kBytesWritten)]: 0
   }
 ]
} ```


    


  • Revision 28559 : D’après http://thread.gmane.org/gmane.comp.web.spip.zone/12743 l’envoi du ...

    10 mai 2009, par real3t@… — Log

    D’après  http://thread.gmane.org/gmane.comp.web.spip.zone/12743 l’envoi du mot de passe de l’user de la db créé dynamiquement par la mutualisation facile serait un trou de sécurité... depuis 18 mois…

  • FFmpeg : Cut from live stream RTSP

    10 septembre 2020, par Jax2171

    I cannot solve my problem and I have not found any solution.

    


    I capture an rtsp stream from an ip camera via the command :

    


    ffmpeg -stimeout 2000000 -abort_on empty_output -rtsp_transport tcp -i rtsp://admin:admin@192.168.1.15/av0_0 -c:v copy -c:a aac -f mpegts -y rec.ts


    


    The native video codec is h264 while the audio one is pcm. I capture the video stream without compression and compress the audio in aac to make it compatible with the ts container.

    


    I need to extract portions of video of X duration through during the capture. The command I use is :

    


    ffmpeg -ss X-i rec.ts -c:v copy -c:a copy -t Y -f mp4 -stimeout 60 -y cut.mp4


    


    Everything seems to work fine with no errors. However, the cut file has a slightly longer audio length than the video length. Sometimes the difference can be up to 1 second.

    


    My problem is that I have to chain all the cuts I make, and this difference in duration causes a very annoying lag between one video and another.

    


    It also happens that there is asynchronousness between audio and video in the cuts. The higher the -ss value, the more the audio anticipates the video.

    


    I state that I am not a professional but from what I have read it could be a problem of different PTS between audio and video, but I'm not sure. However, I am sure that the problem arises from the capture of the stream perhaps not in accordance with my needs.

    


    How can I solve ?