
Recherche avancée
Autres articles (91)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (4552)
-
http: Stop reading after receiving the whole file for non-chunked transfers
11 août 2014, par Martin Storsjöhttp: Stop reading after receiving the whole file for non-chunked transfers
Previously this logic was only used if the server didn’t
respond with Connection : close, but use it even for that case,
if the server response is non-chunked.Originally the http code has relied on Connection : close to close
the socket when the file/stream is received - the http protocol
code just kept reading from the socket until the socket was closed.
In f240ed18 we added a check for the file size, because some
http servers didn’t respond with Connection : close (and wouldn’t
close the socket) even though we requested it, which meant that the
http protocol blocked for a long time at the end of files, waiting
for a socket level timeout.When reading over tls, trying to read at the end of the connection,
when the peer has closed the connection, can produce spurious (but
harmless) warnings. Therefore always voluntarily stop reading when
the specified file size has been received, if not using a chunked
transfer encoding. (For chunked transfers, we already return 0
as soon as we get the chunk header indicating end of stream.)Signed-off-by : Martin Storsjö <martin@martin.st>
-
avformat/hlsenc : set HTTP options before writing WebVTT HLS playlists
12 novembre 2023, par Léon Spaans -
Ffmpeg http slow Startup Delay
16 mars 2018, par JanI need a http stream output with very fast start up Delay (100ms) And Constant Traffic. And I only want to use the http stream with vlc... so not for Browser usage. My input stream has a Bitrate 3-4mbit. With hls I get the 100ms switching time but not constant traffic. I already have traffic eruption... in one second high traffic and then nothing. But I need a constant output.
So I tried it with nodejs and ffmpeg fluent but the starting time is not so good(Not so fast like hls)
This is my
// How to Use
// 1. Create package.json with `npm init`
// 2. Install dependencies with `npm i fluent-ffmpeg express`
// 3. Start with `node ffmpegToWeb.js`
// 4. Open VLC and "Open Network Stream".
// 5. Input the following without quotes : `http://127.0.0.1:8001` and start.
const ffmpeg = require('fluent-ffmpeg')
const config = {
port: 8001,
url: 'url here'
}
let ffmpegObj = ffmpeg(config.url)
.videoCodec('copy')
.audioCodec('copy')
.outputOptions([
'-y',
'-ac 2',
'-sn',
'-f mpegts'
])
.inputOptions([
'-re',
'-nostdin',
'-hide_banner',
'-probesize 5000000',
'-analyzeduration 15000000'
])
.on('start', function (commandLine) {
console.log('Starting ffmpeg with command: ' + commandLine)
})
.on('error', (err) => {
console.log('ffmpeg error', err)
})
.on('end', () => {
console.log('ffmpeg end')
})
.on('progress', (stats) => {
// console.log(stats)
})
let currentChunk = {}
let ffstream = ffmpegObj.pipe()
ffstream.on('data', (buffer) => {
currentChunk = buffer
process.emit('ffmpeg-data', buffer)
})
// web app
console.log('Starting Express Web Server on Port ' + config.port)
const express = require('express')
const app = express()
const http = require('http')
const httpServer = http.createServer(app)
app.get('/', function (req, res) {
console.log('client connected:', req.headers['user-agent'])
let contentWriter = (buffer) => {
res.write(buffer)
}
res.setHeader('Connection', 'close')
res.setHeader('Cache-Control', 'no-cache')
res.setHeader('Pragma', 'no-cache')
res.setHeader('Content-Type', 'video/mp2t')
// write current chunk before the first data event occurs
if (currentChunk.length > 0) {
res.write(currentChunk)
}
process.on('ffmpeg-data', contentWriter)
req.on('close', function () {
console.log('client disconnected:', req.headers['user-agent'])
process.removeListener('ffmpeg-data', contentWriter)
})
})
httpServer.listen(config.port)