
Recherche avancée
Autres articles (34)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...) -
Installation en mode standalone
4 février 2011, parL’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
[mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)
Sur d’autres sites (2663)
-
How can I improve the up-time of my coffee pot live stream ?
26 avril 2017, par tww0003Some Background on the Project :
Like most software developers I depend on coffee to keep me running, and so do my coworkers. I had an old iPhone sitting around, so I decided to pay homage to the first webcam and live stream my office coffee pot.
The stream has become popular within my company, so I want to make sure it will stay online with as little effort possible on my part. As of right now, it will occasionally go down, and I have to manually get it up and running again.
My Setup :
I have nginx set up on a digital ocean server (my nginx.conf is shown below), and downloaded an rtmp streaming app for my iPhone.
The phone is set to stream to
example.com/live/stream
and then I use an ffmpeg command to take that stream, strip the audio (the live stream is public and I don’t want coworkers to feel like they have to be careful about what they say), and then make it accessible atrtmp://example.com/live/coffee
andexample.com/hls/coffee.m3u8
.Since I’m not too familiar with ffmpeg, I had to google around and find the appropriate command to strip the coffee stream of the audio and I found this :
ffmpeg -i rtmp://localhost/live/stream -vcodec libx264 -vprofile baseline -acodec aac -strict -2 -f flv -an rtmp://localhost/live/coffee
Essentially all I know about this command is that the input stream comes from,
localhost/live/stream
, it strips the audio with-an
, and then it outputs tortmp://localhost/live/coffee
.I would assume that
ffmpeg -i rtmp://localhost/live/stream -an rtmp://localhost/live/coffee
would have the same effect, but the page I found the command on was dealing with ffmpeg, and nginx, so I figured the extra parameters were useful.What I’ve noticed with this command is that it will error out, taking the live stream down. I wrote a small bash script to rerun the command when it stops, but I don’t think this is the best solution.
Here is the bash script :
while true;
do
ffmpeg -i rtmp://localhost/live/stream -vcodec libx264 -vprofile baseline -acodec aac -strict -2 -f flv -an rtmp://localhost/live/coffee
echo 'Something went wrong. Retrying...'
sleep 1
doneI’m curious about 2 things :
- What is the best way to strip audio from an rtmp stream ?
- What is the proper configuration for nginx to ensure that my rtmp stream will stay up for as long as possible ?
Since I have close to 0 experience with nginx, ffmpeg, and rtmp streaming any help, or tips would be appreciated.
Here is my nginx.conf file :
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
allow 127.0.0.1;
}
location /stat.xsl {
root html;
}
location /hls {
root /tmp;
add_header Cache-Control no-cache;
}
location /dash {
root /tmp;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
}
}
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application live {
live on;
hls on;
hls_path /tmp/hls;
dash on;
dash_path /tmp/dash;
}
}
}edit :
I’m also running into this same issue : https://trac.ffmpeg.org/ticket/4401 -
Video buffering/streaming with node-fluent-ffmpeg
24 février 2018, par SaliesI want to turn AC3-audio videos playable on browsers. For this, I decided to use fluent-ffmpeg to real-time convert the videos and stream them. It works as livestreaming/piping pretty well, but you can’t even go back in the videos.
app.get('/video', function (req, res) {
var path = 'show.mkv';
ffmpeg(path)
.outputOptions(arr)
.on('end', function () {
console.log('file has been converted succesfully');
})
.on('error', function (err) {
console.log('an error happened: ' + err.message);
})
.pipe(res);
});So I need to build a sort of buffer for the conversion, this is, to let the user go back and forth in the video. I’ve found some code that does exactly what I need, although it doesn’t convert :
app.get('/video', function(req, res) {
const path = 'assets/sample.mp4'
const stat = fs.statSync(path)
const fileSize = stat.size
const range = req.headers.range
if (range) {
const parts = range.replace(/bytes=/, "").split("-")
const start = parseInt(parts[0], 10)
const end = parts[1]
? parseInt(parts[1], 10)
: fileSize-1
const chunksize = (end-start)+1
const file = fs.createReadStream(path, {start, end})
const head = {
'Content-Range': `bytes ${start}-${end}/${fileSize}`,
'Accept-Ranges': 'bytes',
'Content-Length': chunksize,
'Content-Type': 'video/mp4',
}
res.writeHead(206, head)
file.pipe(res)
} else {
const head = {
'Content-Length': fileSize,
'Content-Type': 'video/mp4',
}
res.writeHead(200, head)
fs.createReadStream(path).pipe(res)
}
})(from https://github.com/daspinola/video-stream-sample)
I’ve been trying to make fluent-ffmpeg work with buffering, with no success, and I pretty much have no clue on what to do. If buffering isn’t possible, is there an similar alternative excpect for pre-converting the videos ? Thanks already.
-
Extract scene change info from a video file
18 novembre 2018, par Ray P.Is there a way to extract scene change information from a video file using XVid in Python ? For example : I have an .mkv file, and I need to get a .log scene change file (Xvid 2nd pass stat file) to use for subtitles timing. SCXvid can create such files, but I’d like to do this in Python if possible.
The reason why I need this is because the only way to do it on Linux is to use SCXvid-standalone which requires y4m files, and I need to use files in their original format.