
Recherche avancée
Autres articles (64)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 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, parPar 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 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


-
Converting 100 FPS to 25 FPS in the fastest way possible with FFMPEG ?
12 mars 2021, par Michael Joseph AubryI have a slightly unique case where I am feeding FFMPEG frames from a browser (puppeteer).


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.


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.

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


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



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.


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


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


-
Revision 96556 : Le plug est pour spip 3.0.2 minimum, j’ajoute une version mini à ...
11 juin 2018, par spip.franck@… — LogLe 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/