
Recherche avancée
Autres articles (43)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne 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 2011Documentation 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, parTalk 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 YohannIn 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>
 <div class="video">
 <video class="video-box" ref="player"></video>
 </div>
</template>

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





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


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


Is there any way to control this delay time


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


Solutions that can support electron


-
avcodec/cfhd : use LUT for 9 and 18 codebook decompanding
3 août 2020, par Paul B Mahol -
Build OpenCv using static ffmpeg library
24 juillet 2020, par gaurav agarwalI 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.


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




ffmpeg or libav development packages : libavcodec-dev, libavformat-dev,
libswscale-dev




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