Recherche avancée

Médias (9)

Mot : - Tags -/soundtrack

Autres articles (51)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (11067)

  • Anomalie #2250 : Un bouton pour envoyer les identifiants

    13 mai 2013, par Valéry -

    Voir aussi #2998 sur la notification des changements de statut des auteurs.

  • Anomalie #4473 : SVP ne peut plus installer par VCS

    15 avril 2020

    Voir #4474 pour le 2e bug.

  • Fluent-FFMPEG redirects to home page when recording is finished

    25 mai 2022, par Myles Jefferson

    I am using fluent-FFmpeg with my node.js and express server to record videos from an RTSP stream. The issue I am encountering is that once the command to record the video is finished, my React client-side always redirects to the home page of my application, even though this is not the behavior I want. I want the user to remain on the page with the RTSP stream and just receive a toast notification indicating that the recording is finished. With this issue, the page redirects before the notification has a chance to display. Is this an issue with my server-side or client-side code ?

    


    Node.js

    


    export const startRecording = async (req, res) => {
  const camera = req.params;
  if (camera.id in runningCommands) { return res.json({ "status": "failure", "error": "Recording already in progress" }) }
  const { recordTime, uid } = req.body;
  let conn = createConnection(config);
  conn.connect();
  let query = 'SELECT * FROM cameras WHERE id = ?';
  conn.query(query, [camera.id], (error, rows) => {
    if (error) { return res.json({ "status": "failure", "error": error }) }
    const camera = rows[0];
    const { ip, fname } = camera;
    const currentDate = new Date().toLocaleString().replace(/[:/\s]/g, '-').replace(',', '');
    const filename = `${fname}-${currentDate}`;

    try {
      // FFmpeg command to start recording
      const command = ffmpeg(`rtsp://${ip}/axis-media/media.amp`)
        .videoCodec('libx264')
        .size('1280x720')
        .duration(recordTime)
        .on('start', commandLine => {
          runningCommands[camera.id] = command
          console.log(`Spawned Ffmpeg with command: ${commandLine}`)
        })
        .on('error', err => console.error(err))
        .on('end', () => {
          delete runningCommands[camera.id]
          console.log('Recording Complete')
          takeScreenshot(filename, `./public/recordings/mp4/${filename}.mp4`)
          conn.query('INSERT INTO recordings (uid, cid, filename) VALUES (?, ?, ?)', [uid, camera.id, filename], () => conn.end())
          res.json({ "status": "success", "message": "Recording ended" })
        })
        .save(`./public/recordings/mp4/${filename}.mp4`);
    } catch (error) { console.error(error)}
  })
}


    


    React :

    


    const handleRecording = async () => {
    try {
      setIsRecording(true)
      const futureTime = new Date().getTime() + recordTime * 1000
      const finishedTime = new Date(futureTime).toLocaleTimeString()
      setTimeRemaining(finishedTime)
      const { data } = await publicRequest.post(`record/startRecording/${id}`, { recordTime, uid: user.id })
      window.location.reload(false)
      if (data.status === 'success') {
        setIsRecording(false)
        toast('Recording finished!', { type: 'success' })
      } else {
        setIsRecording(true)
        toast('Recording already in progress!', { type: 'error' })
      }
    } catch (error) {
      console.error(error)
    }
  }