Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (43)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (6985)

  • 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;

  • avcodec/cfhd : use LUT for 9 and 18 codebook decompanding

    3 août 2020, par Paul B Mahol
    avcodec/cfhd : use LUT for 9 and 18 codebook decompanding
    

    Also fix codebook 9 decompanding, fixing artifact with codebook 9
    samples. Reused Gagandeep Singh patch.

    • [DH] libavcodec/cfhd.c
    • [DH] libavcodec/cfhd.h
  • Build OpenCv using static ffmpeg library

    24 juillet 2020, par gaurav agarwal

    I am trying to build opencv for one of the commercial product. That commercial product already contains a static build of ffmpeg executable. While building OpenCv I am seeing bunch of failure most probably due to linking issues with ffmpeg.

    &#xA;

    Is it possible to build OpenCv using static ffmpeg library ? In OpenCv installation doc I can see mentioned prerequisite is :

    &#xA;

    &#xA;

    ffmpeg or libav development packages : libavcodec-dev, libavformat-dev,&#xA;libswscale-dev

    &#xA;

    &#xA;

    I guess this means OpenCv needs these lib to be present as shared libs. Any expert opinion will be helpful !!!

    &#xA;