Recherche avancée

Médias (91)

Autres articles (82)

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (4622)

  • Anomalie #3014 : Chaines de langue de "Forums" utilisées dans la "dist"

    24 décembre 2017, par b b

    Pour info, voici les occurrences de chaînes de langue de forum dans la dist à ce jour :

    grep -nHIirF —exclude=*.svn-base — :forum : .
    ./404.html:36 :            [(#ENVfond_erreur|==forum|oui)

    <:forum:aucun_message_forum :>

    ]
    ./article.html:56 : [

    <:forum:form_pet_message_commentaire :>

    ./inclure/forum.html:17 :

    <:accueil_site :> &gt ; ... &gt ; <:forum:forum :> #ID_FORUM

    ./forum.html:28 : [

    (#TITRE|sinon<:forum:forum :> #ID_FORUM)

    ]
    ./forum.html:38 :

    <:forum:forum_avez_selectionne :> #TITRE

    ./forum.html:41 : [

    <:forum:form_pet_message_commentaire :>

    ./breve.html:43 : [

    <:forum:form_pet_message_commentaire :>

  • 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

    &#xA;

    The camera is Haikang’s webcam

    &#xA;

    Get real-time video stream through RTSP protocol

    &#xA;

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

    &#xA;

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

    &#xA;

    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

    &#xA;

    import * as express from &#x27;express&#x27;&#xA;import * as expressWebSocket from &#x27;express-ws&#x27;&#xA;import ffmpeg from &#x27;fluent-ffmpeg&#x27;&#xA;import webSocketStream from &#x27;websocket-stream/stream&#x27;&#xA;const path = require(&#x27;path&#x27;)&#xA;&#xA;let ffmpegPath&#xA;if (process.env.NODE_ENV === &#x27;development&#x27;) {&#xA;  ffmpegPath = path.join(__static, &#x27;ffmpeg&#x27;, &#x27;bin&#x27;, &#x27;ffmpeg.exe&#x27;)&#xA;} else {&#xA;  ffmpegPath = path.join(process.cwd(), &#x27;ffmpeg&#x27;, &#x27;bin&#x27;, &#x27;ffmpeg.exe&#x27;)&#xA;}&#xA;ffmpeg.setFfmpegPath(ffmpegPath)&#xA;&#xA;// Start video transcoding service&#xA;function videoServer () {&#xA;  let app = express()&#xA;  app.use(express.static(__dirname))&#xA;  expressWebSocket(app, null, {&#xA;    perMessageDeflate: true&#xA;  })&#xA;  app.ws(&#x27;/rtsp/&#x27;, rtspRequestHandle)&#xA;  app.listen(8888)&#xA;  console.log(&#x27;Create a monitoring service&#x27;)&#xA;}&#xA;&#xA;//RTSP transcoding method&#xA;function rtspRequestHandle (ws, req) {&#xA;  console.log(&#x27;rtsp request handle&#x27;)&#xA;  const stream = webSocketStream(ws, {&#xA;    binary: true,&#xA;    browserBufferTimeout: 1000000&#xA;  },&#xA;  {&#xA;    browserBufferTimeout: 1000000&#xA;  })&#xA;  let url = req.query.url&#xA;  console.log(&#x27;rtsp url:&#x27;, url)&#xA;  try {&#xA;    ffmpeg(url)&#xA;      .addInputOption(&#x27;-rtsp_transport&#x27;, &#x27;tcp&#x27;, &#x27;-buffer_size&#x27;, &#x27;102400&#x27;) // Here you can add some RTSP optimized parameters&#xA;      .outputOptions([&#xA;        &#x27;-fflags&#x27;,&#xA;        &#x27;nobuffer&#x27;,&#xA;        &#x27;-tune&#x27;,&#xA;        &#x27;zerolatency&#x27;&#xA;      ])&#xA;      .on(&#x27;start&#x27;, function () {&#xA;        console.log(url, &#x27;Stream started.&#x27;)&#xA;      })&#xA;      .on(&#x27;codecData&#x27;, function () {&#xA;        console.log(url, &#x27;Stream codecData.&#x27;)&#xA;      })&#xA;      .on(&#x27;error&#x27;, function (err) {&#xA;        console.log(url, &#x27;An error occured: &#x27;, err.message)&#xA;      })&#xA;      .on(&#x27;end&#x27;, function () {&#xA;        console.log(url, &#x27;Stream end!&#x27;)&#xA;      })&#xA;      .outputFormat(&#x27;flv&#x27;).videoCodec(&#x27;copy&#x27;).noAudio().pipe(stream)&#xA;  } catch (error) {&#xA;    console.log(error)&#xA;  }&#xA;}&#xA;&#xA;export default videoServer&#xA;

    &#xA;

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

    &#xA;

    <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 -head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38UFJltVsaJcW7hOKko6fZB+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 !