Recherche avancée

Médias (91)

Autres articles (81)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (4989)

  • aarch64 : add ’,’ between assembler macro arguments where missing

    24 juillet 2014, par Janne Grunau
    aarch64 : add ’,’ between assembler macro arguments where missing
    

    llvm’s integrated assembler does not accept spaces as macro argument
    delimiter when targeting darwin. Using a explicit delimiter is a good
    idea in principle since it makes case like ’macro 4 -2’ vs ’macro 4 - 2’
    clear.

    • [DBH] libavcodec/aarch64/fft_neon.S
    • [DBH] libavcodec/aarch64/mpegaudiodsp_neon.S
    • [DBH] libavcodec/aarch64/opus_imdct_neon.S
  • 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;

  • FFMPEG hls m3u8 live stream

    4 juillet 2018, par Num Nuts

    I’m trying to download a m3u8 live stream but it requires cookies to access the files. Can anyone correct my command line ? Thanks.

    ffmpeg -headers "Cookie: reqPayload=^\^"iaodNwtkT225JhvKtpRLb+jpeFpWv4aiQAGGeKu0UO0xAsJdu4leyx6jabp7vz5j0CEp4+I75Puwm/2FQS2C7AJYXAoiJvSKacZMYE2aqasYEYkFJCfmR5cNLEJfq3NVgDw3t7+NBwNdhw7ANtJO9anjj7269d12ERIY9n6vplh+BhlT+dwBqUnvGJ6UvX6TBfkEccybvE4tKHvD+ezZAIK+8abp+sVohUHEtQB5DU6hdx4+igd7M3829J6jFUMu213SNNuDhlW9qQgQQsFPdJPGLZfArRt8bo2BFT1BCn4rtXd112jb6WxRsgc3Y4PO/WFeq/CG067oMW7Z4pSBNS8VeOFB0wec9v9/TmkQmjYuHMJw9pVOCdGoSasaHtU+xc0li24rG6IFRir31IG56cIv38s0DGHygFYHrwzxbGC4KTlCqAv5XZYZ00EyiXdr8LKbps6kj9Rf4uO8eBFVgce8/nGllBK3XKigu9TO0FnSH0yP+HancGfTKri1j3WjP36o3kpqfThG1Na85Djn8GzrpA3m/6S0QE/F+DLv8F5mXiZuZ6aasgFchXnGAo203RcYSsJwuMLOx26O0w0b0gMJUhwuEh0vVrsCQEuADM5MOMXMkagmHqFoLOfFQiWIfHA/GokGyAYBk+FXTPrbmEjs959mopXrhWckeyW/uz4euG84gzA8+1VjbhEZxM6M7NG9214EXbD5iilxAHDfrOUr1gOHZ1XaMFQk8FqfH6k700pFaL6OKqhY1ZiCNuNe7bG+pB9dOGXC+PcqUOiR8hOKnWEfg1j1lZieHyZkrtsblM/qWl0Off+m1EVvP2+KwV9z1A158N1MGXqjG4+fpywdRo95c3RFd2VHe2SH4mktGg22iaPZjX9nmIOYwy3t0htjgj+gL2sEgUvUkXKaDN0skxLlBnUx6UughTS+psG4jI4i0pjBa5h7tnIdyEdNGBnDVMF+kgG/TJqKPnNB9mBAN1HJnpatAjnpB9V6U7xpUS/Xpqe1penzgK8mUYSaWG79nIDFUAM3t2idUn9gmGRgR/x/VLGHPujtE4hsSZv6A03kzsfVQ5JemydUdt38UFJltVsaJcW7hOKko6fZB+E4LQpnCfvUBfqNvkaIDrVgUCkUzVHU6bQGpoa2DcASx+uXIgq9LJ8CCozcYCWKm0lvRh56HMRkEeA=^\^";" -user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36' -loglevel verbose -i http://fox-foxcollegesports-central.live.sonytv.adaptive.level3.net/PROD02/sony/FOX_FCS_CENTRAL/live/2017/05/25/7418092/4500K/4500_slide.m3u8 -acodec copy -vcodec copy  output.mp4 -stimeout 3000 -y

    When I run the command it’s response is

    Trailing options were found on the commandline.

    Hyper fast Audio and Video encoder
    usage : ffmpeg [options] [[infile options] -i infile]... [outfile options] outfile...

    Use -h to get full help or, even better, run ’man ffmpeg’

    If I take out the cookies header, it says

    Unable to open key file https://key-service.totsuko.tv/key-service/key/key?contentId=15125048&amp;channelId=24995&amp;kid=29715503

    [hls,applehttp @ 0000000000778860] Error when loading first segment ’http://fox-foxcollegesports-central.live.sonytv.adaptive.level3.net/PROD02/sony/FOX_FCS_CENTRAL/live/2017/05/25/7418092/4500K/151/22/16/21_839.ts
    http://fox-foxcollegesports-central.live.sonytv.adaptive.level3.net/PROD02/sony/FOX_FCS_CENTRAL/live/2017/05/25/7418092/4500K/4500_slide.m3u8 : Invalid data found when processing input

    Thanks in advance for whoever helps me get this working !