
Recherche avancée
Médias (5)
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
Autres articles (80)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...)
Sur d’autres sites (5357)
-
I received connection refused error while trying to stream live video through RTMP with FFMPEG
25 septembre 2020, par FemzyI am working on a nodeJs app that can send camera stream to third party plartform i.e Facebook and Youtube using the RTMP protoco ;.. It works well on my localhost but once i deploy to the server, it only give me errors. The error I get is below on this content..
Here is my codes


server.js




const child_process = require('child_process'); // To be used later for running FFmpeg
const express = require('express');
const http = require('http');
const WebSocketServer = require('ws').Server;

const app = express();
const server = http.createServer(app).listen(4000, () => {
 console.log('Listening...');
});

// Serve static files out of the www directory, where we will put our HTML page
app.use(express.static(__dirname + '/www'));


const wss = new WebSocketServer({
 server: server
});
wss.on('connection', (ws, req) => {
 
 
 
 const rtmpUrl = 'rtmp://a.rtmp.youtube.com/live2/MyStreamId';
 console.log('Target RTMP URL:', rtmpUrl);
 
 // Launch FFmpeg to handle all appropriate transcoding, muxing, and RTMP.
 // If 'ffmpeg' isn't in your path, specify the full path to the ffmpeg binary.
 const ffmpeg = child_process.spawn('ffmpeg', [
 // Facebook requires an audio track, so we create a silent one here.
 // Remove this line, as well as `-shortest`, if you send audio from the browser.
 //'-f', 'lavfi', '-i', 'anullsrc',
 
 // FFmpeg will read input video from STDIN
 '-i', '-',
 
 // Because we're using a generated audio source which never ends,
 // specify that we'll stop at end of other input. Remove this line if you
 // send audio from the browser.
 //'-shortest',
 
 // If we're encoding H.264 in-browser, we can set the video codec to 'copy'
 // so that we don't waste any CPU and quality with unnecessary transcoding.
 // If the browser doesn't support H.264, set the video codec to 'libx264'
 // or similar to transcode it to H.264 here on the server.
 '-vcodec', 'copy',
 
 // AAC audio is required for Facebook Live. No browser currently supports
 // encoding AAC, so we must transcode the audio to AAC here on the server.
 '-acodec', 'aac',
 
 // FLV is the container format used in conjunction with RTMP
 '-f', 'flv',
 
 // The output RTMP URL.
 // For debugging, you could set this to a filename like 'test.flv', and play
 // the resulting file with VLC. Please also read the security considerations
 // later on in this tutorial.
 rtmpUrl 
 ]);
 
 // If FFmpeg stops for any reason, close the WebSocket connection.
 ffmpeg.on('close', (code, signal) => {
 console.log('FFmpeg child process closed, code ' + code + ', signal ' + signal);
 ws.terminate();
 });
 
 // Handle STDIN pipe errors by logging to the console.
 // These errors most commonly occur when FFmpeg closes and there is still
 // data to write. If left unhandled, the server will crash.
 ffmpeg.stdin.on('error', (e) => {
 console.log('FFmpeg STDIN Error', e);
 });
 
 // FFmpeg outputs all of its messages to STDERR. Let's log them to the console.
 ffmpeg.stderr.on('data', (data) => {
 console.log('FFmpeg STDERR:', data.toString());
 });

 // When data comes in from the WebSocket, write it to FFmpeg's STDIN.
 ws.on('message', (msg) => {
 console.log('DATA', msg);
 ffmpeg.stdin.write(msg);
 });
 
 // If the client disconnects, stop FFmpeg.
 ws.on('close', (e) => {
 ffmpeg.kill('SIGINT');
 });
 
});







On the server.js file i create a websocket to receive stream data from the client side and then use FFMPEG to send the stream data over to youtube via the RTMP url


Here is my client.js code




const ws = new WebSocket(
 'wss://my-websocket-server.com'

 );
 ws.addEventListener('open', (e) => {
 console.log('WebSocket Open', e);
 drawVideosToCanvas();
 mediaStream = getMixedVideoStream(); // 30 FPS
 mediaRecorder = new MediaRecorder(mediaStream, {
 mimeType: 'video/webm;codecs=h264',
 //videoBitsPerSecond : 3000000000
 bitsPerSecond: 6000000
 });

 mediaRecorder.addEventListener('dataavailable', (e) => {
 ws.send(e.data);
 });
 mediaRecorder.onstop = function() {
 ws.close.bind(ws);
 isRecording = false;
 actionBtn.textContent = 'Start Streaming';
 actionBtn.onclick = startRecording;
 }
 mediaRecorder.onstart = function() {
 isRecording = true;
 actionBtn.textContent = 'Stop Streaming';
 actionBtn.onclick = stopRecording;
 screenShareBtn.onclick = startSharing;
 screenShareBtn.disabled = false;
 }
 //mediaRecorder.addEventListener('stop', ws.close.bind(ws));

 mediaRecorder.start(1000); // Start recording, and dump data every second

 });







On my client.js file, i captured users camera and then open the websocket server to send the data to the server.. Every thing works fine on local host expect for when i deploy it to live server..
i am wondering if there is a bad configuration on the server.. The server is Centos 7.8 and the app was runing on Apache software
Here is how i configured the virtual host for the websocket domain




ServerName my-websocket.com

 RewriteEngine on
 RewriteCond %{HTTP:Upgrade} websocket [NC]
 RewriteCond %{HTTP:Connection} upgrade [NC]
 RewriteRule .* "ws://127.0.0.1:3000/$1" [P,L]

 ProxyPass "/" "http://127.0.0.1:3000/$1"
 ProxyPassReverse "/" "http://127.0.0.1:3000/$1"
 ProxyRequests off







I don't know much about server configuration but i just thought may be the configuration has to do with why FFMPEg can not open connection to RTMP protocol on the server.


here is the error am getting




FFmpeg STDERR: Input #0, lavfi, from 'anullsrc':
 Duration:
FFmpeg STDERR: N/A, start: 0.000000, bitrate: 705 kb/s
 Stream #0:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s

DATA <buffer 1a="1a">
DATA <buffer 45="45" df="df" a3="a3" 42="42" 86="86" 81="81" 01="01" f7="f7" f2="f2" 04="04" f3="f3" 08="08" 82="82" 88="88" 6d="6d" 61="61" 74="74" 72="72" 6f="6f" 73="73" 6b="6b" 87="87" 0442="0442" 85="85" 02="02" 18="18" 53="53" 80="80" 67="67" ff="ff" 53991="53991" more="more" bytes="bytes">
DATA <buffer 40="40" c1="c1" 81="81" 00="00" f0="f0" 80="80" 7b="7b" 83="83" 3e="3e" 3b="3b" 07="07" d6="d6" 4e="4e" 1c="1c" 11="11" b4="b4" 7f="7f" cb="cb" 5e="5e" 68="68" 9b="9b" d5="d5" 2a="2a" e3="e3" 06="06" c6="c6" f3="f3" 94="94" ff="ff" 29="29" 16="16" b2="b2" 60="60" 04ac="04ac" 37="37" fb="fb" 1a="1a" 15="15" ea="ea" 39="39" a0="a0" cd="cd" 02="02" b8="b8" 56206="56206" more="more" bytes="bytes">
FFmpeg STDERR: Input #1, matroska,webm, from 'pipe:':
 Metadata:
 encoder :
FFmpeg STDERR: Chrome
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #1:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
 Stream #1:1(eng): Video: h264 (Constrained Baseline), yuv420p(progressive), 1366x768, SAR 1:1 DAR 683:384, 30.30 fps, 30 tbr, 1k tbn, 60 tbc (default)

FFmpeg STDERR: [tcp @ 0xe5fac0] Connection to tcp://a.rtmp.youtube.com:1935 failed (Connection refused), trying next address
[rtmp @ 0xe0fb80] Cannot open connection tcp://a.rtmp.youtube.com:1935

FFmpeg STDERR: rtmp://a.rtmp.youtube.com/live2/mystreamid: Network is unreachable

FFmpeg child process closed, code 1, signal null</buffer></buffer></buffer>







I will really appreciate if I could get some insight on what may be causing this issue or what i can do to solve it..Thanks in advance..


-
Use Google Analytics and risk fines, after CJEU ruling on Privacy Shield
27 août 2020, par Joselyn Khor — Privacy -
MediaRecorder - FFMPEG - RTMP issue
5 octobre 2017, par Bear10Currently I’m working on streaming Audio and Video from a video captured in Chrome 61.0.3163.100 with the MediaRecorder API.
The backend is running on node and it spawns a child process which runs ffmpeg :
ffmpeg -threads 4 -i udp://127.0.0.1:41234 -t 5400 -ar 44100
-b:a 128k -c:v libx264 -c:a libfdk_aac -pix_fmt yuv420p -r 30 -g 60 -vb 2048k -preset slow -minrate 2000k -maxrate 4000k test.mp4On the client side I send the raw Blob from Chrome to the Node server via web socket :
var mediaStream = new MediaStream([videoOutput.getVideoTracks()[0], audioOutput.getAudioTracks()[0]]),
recorder = new MediaRecorder(mediaStream, {
mimeType: 'video/webm;codecs=vp8'
});
socket = io('http://localhost:' + port);
recorder.addEventListener('dataavailable', function (evt) {
socket.emit('video:data', evt.data);
});And in Node we simply resend via udp to the ffmpeg process :
let client = dgram.createSocket('udp4'),
client.send(chunk, 0, chunk.length, 41234, '127.0.0.1', function (err, bytes) {
if (err) {
throw err;
}
});The resulting mp4 is viewable on VLC without any issues, despite many of the following warnings showing up in the FFMPEG console :
stderr: frame= 1751 fps= 31 q=17.0 size= 15997kB time=00:00:58.39 bitrate=2244.3kbits/s dup=449 drop=32 speed=1.03x
stderr: [mp4 @ 0x7fefe6019000] Non-monotonous DTS in output stream 0:1; previous: 2573919, current: 2573792; changing to 2573920. This may result in incorrect timestamps in the output file.
stderr: frame= 1767 fps= 31 q=17.0 size= 16166kB time=00:00:58.90 bitrate=2248.4kbits/s dup=452 drop=32 speed=1.03x
stderr: [libmp3lame @ 0x7fefe7004c00] Queue input is backward in time
stderr: [mp4 @ 0x7fefe6019000] Non-monotonous DTS in output stream 0:1; previous: 2614768, current: 2614686; changing to 2614769. This may result in incorrect timestamps in the output file.However when I try to re stream this specific video on Youtube or any other RTMP platform (ex : Facebook) the audio is choppy, the command I use :
ffmpeg -i ./test.mp4 -f flv rtmp://a.rtmp.youtube.com/live2/MYAPIKEY
On the other hand any other "good" video not made from the aforementioned process re streams just fine and I suspect it might be from the warnings I’m getting.
As an added bit of information streaming directly from my PC with avfoundation to youtube also works fine, and writing from avfoundation to a file and then streaming to youtube also works ok.
The goal is to stream from my browser to the node server and directly to the Youtube RTMP without the choppy audio issue.
If someone knows how to get rid of the warning to ensure ffmpeg isn’t the issue or can point me in the direction to achieve the desired result that’d be great.