Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (64)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (7251)

  • About the delay of Electron playing FFpmeg transcoded video

    26 juillet 2020, par Yohann

    In the Electron project, you need to try to play the video screen of the camera

    


    The camera is Haikang’s webcam

    


    Get real-time video stream through RTSP protocol

    


    rtsp://admin:admin@192.168.0.253/main/Channels/

    


    There will be a delay of about 3s when playing through the VLC player

    


    Then when used in the project, create a websocket service in Electron through the main process, decode the rtsp video through fluent-ffmpeg, and convert it to flv stream and push it to the rendering process

    


    import * as express from 'express'
import * as expressWebSocket from 'express-ws'
import ffmpeg from 'fluent-ffmpeg'
import webSocketStream from 'websocket-stream/stream'
const path = require('path')

let ffmpegPath
if (process.env.NODE_ENV === 'development') {
  ffmpegPath = path.join(__static, 'ffmpeg', 'bin', 'ffmpeg.exe')
} else {
  ffmpegPath = path.join(process.cwd(), 'ffmpeg', 'bin', 'ffmpeg.exe')
}
ffmpeg.setFfmpegPath(ffmpegPath)

// Start video transcoding service
function videoServer () {
  let app = express()
  app.use(express.static(__dirname))
  expressWebSocket(app, null, {
    perMessageDeflate: true
  })
  app.ws('/rtsp/', rtspRequestHandle)
  app.listen(8888)
  console.log('Create a monitoring service')
}

//RTSP transcoding method
function rtspRequestHandle (ws, req) {
  console.log('rtsp request handle')
  const stream = webSocketStream(ws, {
    binary: true,
    browserBufferTimeout: 1000000
  },
  {
    browserBufferTimeout: 1000000
  })
  let url = req.query.url
  console.log('rtsp url:', url)
  try {
    ffmpeg(url)
      .addInputOption('-rtsp_transport', 'tcp', '-buffer_size', '102400') // Here you can add some RTSP optimized parameters
      .outputOptions([
        '-fflags',
        'nobuffer',
        '-tune',
        'zerolatency'
      ])
      .on('start', function () {
        console.log(url, 'Stream started.')
      })
      .on('codecData', function () {
        console.log(url, 'Stream codecData.')
      })
      .on('error', function (err) {
        console.log(url, 'An error occured: ', err.message)
      })
      .on('end', function () {
        console.log(url, 'Stream end!')
      })
      .outputFormat('flv').videoCodec('copy').noAudio().pipe(stream)
  } catch (error) {
    console.log(error)
  }
}

export default videoServer


    


    The rendering process parses the video stream and plays the video through flv.js

    


    <template>&#xA;  <div class="video">&#xA;    <video class="video-box" ref="player"></video>&#xA;  </div>&#xA;</template>&#xA;&#xA;<code class="echappe-js">&lt;script&gt;&amp;#xA;  import flvjs from &amp;#x27;flv.js&amp;#x27;&amp;#xA;  export default {&amp;#xA;    name: &amp;#x27;videopage&amp;#x27;,&amp;#xA;    props: {&amp;#xA;      rtsp: String&amp;#xA;    },&amp;#xA;    data () {&amp;#xA;      return {&amp;#xA;        player: null&amp;#xA;      }&amp;#xA;    },&amp;#xA;    mounted () {&amp;#xA;      console.log(flvjs.isSupported())&amp;#xA;      if (flvjs.isSupported()) {&amp;#xA;        let video = this.$refs.player&amp;#xA;        console.log(video)&amp;#xA;        if (video) {&amp;#xA;          this.player = flvjs.createPlayer({&amp;#xA;            type: &amp;#x27;flv&amp;#x27;,&amp;#xA;            isLive: true,&amp;#xA;            url: &amp;#x27;ws://localhost:8888/rtsp/?url=&amp;#x27; &amp;#x2B; this.rtsp&amp;#xA;          }, {&amp;#xA;            enableStashBuffer: true&amp;#xA;          })&amp;#xA;          console.log(this.player)&amp;#xA;          this.player.attachMediaElement(video)&amp;#xA;          try {&amp;#xA;            this.player.load()&amp;#xA;            this.player.play()&amp;#xA;          } catch (error) {&amp;#xA;            console.log(error)&amp;#xA;          }&amp;#xA;        }&amp;#xA;      }&amp;#xA;    },&amp;#xA;    methods: {&amp;#xA;      getCurrentFrame () {&amp;#xA;        let video = this.$refs.player&amp;#xA;        let scale = 1&amp;#xA;        let canvas = document.createElement(&amp;#x27;canvas&amp;#x27;)&amp;#xA;        canvas.width = video.videoWidth * scale&amp;#xA;        canvas.height = video.videoHeight * scale&amp;#xA;        canvas.getContext(&amp;#x27;2d&amp;#x27;).drawImage(video, 0, 0, canvas.width, canvas.height)&amp;#xA;        return canvas.toDataURL(&amp;#x27;image/png&amp;#x27;)&amp;#xA;      }&amp;#xA;    },&amp;#xA;    beforeDestroy () {&amp;#xA;      this.player &amp;amp;&amp;amp; this.player.destory &amp;amp;&amp;amp; this.player.destory()&amp;#xA;    }&amp;#xA;  }&amp;#xA;&lt;/script&gt;&#xA;&#xA;&#xA;

    &#xA;

    Then there will be a delay of about 3s when playing, and the delay will increase with the playing time

    &#xA;

    There will be a delay of 10 minutes in the later period

    &#xA;

    Is there any way to control this delay time

    &#xA;

    Or is there any other decoding scheme that can be used ?

    &#xA;

    Solutions that can support electron

    &#xA;

  • Converting 100 FPS to 25 FPS in the fastest way possible with FFMPEG ?

    12 mars 2021, par Michael Joseph Aubry

    I have a slightly unique case where I am feeding FFMPEG frames from a browser (puppeteer).

    &#xA;

    Since I am composing a new video with varying framerates, I found the best approach is to record the browser at 100 FPS aka a screenshot every 10ms. This ensures no frames are dropped and by overcompensating the videos turn out smooth every time.

    &#xA;

    The problem is 100 FPS is not a standard FPS, so I want to use a command like ffmpeg -i INPUT.mp4 -filter:v fps=fps=25 OUTPUT.mp4 to normalize it. I found FFMPEG does a great job of dropping frames without much quality loss.

    &#xA;

    Here is how I am piping the frames to the encoded file.

    &#xA;

    const childProcess = spawn(ffmpeg, [&#xA;  "-y",&#xA;  "-f",&#xA;  "image2pipe",&#xA;  "-r",&#xA;  `${fps ? `${fps}` : "100"}`,&#xA;  "-i",&#xA;  "async:cache:pipe:0",&#xA;  "-vcodec",&#xA;  "libx264",&#xA;  "-pix_fmt",&#xA;  "yuv420p",&#xA;  "-r",&#xA;  `${fps ? `${100}` : "100"}`,&#xA;  "-y",&#xA;  output&#xA;]);&#xA;

    &#xA;

    The fastest way I can think of rendering the video would be to pass in 100 FPS then encode it at 25 FPS, but the result is out of sync.

    &#xA;

    The best result I have achieved is when it is initially created at 100 FPS, then re-encoded at 25 FPS using ffmpeg -i INPUT.mp4 -filter:v fps=fps=25 OUTPUT.mp4

    &#xA;

    Ideally, I want to avoid re-encoding so I am checking to see what are some strategies I can implement

    &#xA;

  • Revision 96556 : Le plug est pour spip 3.0.2 minimum, j’ajoute une version mini à ...

    11 juin 2018, par spip.franck@… — Log

    Le plug est pour spip 3.0.2 minimum, j’ajoute une version mini à "licence" et "gis" en prenant donc la première version pour spip 3.0, l’unique intérêt de ce commit est pour que les gens qui consultent le xml sur plugin.spip puissent avoir une info fiable.
    http://zone.spip.org/trac/spip-zone/changeset/59333/
    http://zone.spip.org/trac/spip-zone/changeset/51271/