Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (76)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

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

Sur d’autres sites (6923)

  • Dynamically record parts of a video stream using ffmpeg based on incoming events

    12 septembre 2023, par ganjim

    Say I have a RTSP stream running on some server.

    


    I want to record parts of this video stream based on some events that will come up on my machine.
My goal is to record 10 seconds before up to 10 seconds after the PTS in any received event. Consider that I have a way to synchronize the PTS between the sender and the receiver, but by the time I receive the events, its already streamed and is in the past.
So I either need to have the ffmpeg command running already, or to have buffered streaming video in my memory.

    


    I just added some code with comments as a way to simulate the situation, it is not complete as I still don't have a working solution. But I'm looking to understand if ffmpeg has capabilities for dealing with rtsp streams suitable for this situation.

    


    const { spawn } = require('child_process');

function processEvent(event){
  
  let startTime = event.pts - 10
  let endTime = event.pts + 10

  const ffmpegArgs = [
    '-i', "rtspUrl",
    '-ss', startTime.toString(),
    '-to', endTime.toString(),
    '-c', 'copy',
    '-f', 'mp4',
    `output_${startTime}_${endTime}.mp4` // Output filename
  ];
  // Here it is obviously not possible to give ffmpeg a negative startTime.
  // We either have to have spawned the ffmpeg command and somehow give it a starting time for recording on demand or have a buffering system in place.
  // Having a buffer to store every raw frame and then attach them after endTime is also considerably CPU and memory intensive.
  // Looking for alternative ways to achieve the same output.

  const ffmpegProcess = spawn('ffmpeg', ffmpegArgs, {
    stdio: 'inherit'
  });
}

// Code to simulate the events:
// imagine these pts to be relative to Date.now(), so using negative PTS to show the events are going to be in the past by the time we receive them.
setTimeout(() => {
  const event1= { pts: -30 };
  processEvent(event1);
}, 1000);

setTimeout(() => {
  const event2 = { pts: -20 };
  processEvent(event2);
}, 5000);


    


  • Restore accidentally removed parts of "BRIEF" list.

    24 juin 2011, par Reimar Döffinger

    Restore accidentally removed parts of "BRIEF" list.

  • Revert "ffmpeg : remove presets." and reimplement the needed parts that no longer...

    2 septembre 2011, par Michael Niedermayer

    Revert "ffmpeg : remove presets." and reimplement the needed parts that no longer...