
Recherche avancée
Autres articles (100)
-
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 -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (6840)
-
Using ffmpeg rtmp stream a static image and audio input [on hold]
30 octobre 2017, par ChadUsing a Raspberry Pi, stream audio in and use a static image as the video input thru ffmpeg over RTMP to a Cloud video provider (DaCast in this instance)
So far, I’ve gone through many blog posts, Stack Overflow questions, and package documentation. I’ve found that most of the posts are no longer valid with the newer versions of ffmpeg. Or don’t quite line up with what I am trying to achieve.
However, I have figured out the right settings to stream the Raspberry Pi Camera v2 with the audio in.
ffmpeg \ -f alsa -ac 1 -i plughw:1,0 \ -f v4l2 -s 1920x1080 -r 30 -input_format h264 -i /dev/video0 \ -vcodec copy -preset veryfast -r 15 -g 30 -b:v 64k -ar 44100 -threads 6 -b:a 96k -bufsize 3000k \ -f flv rtmp ://streaming_server_url
But can’t seem to get it right to replace the video input with a static image.
I have tried removing the 3rd line and adding
-loop 1 -i '/path/to/image.jpg'
The logs look like :
[alsa @ 0x55e4b980] Thread message queue blocking ; consider raising the thread_queue_size option (current value : 1024) [alsa @ 0x55e4b980] ALSA buffer xrun. 0kB time=00:00:00.00 bitrate=N/A speed= 0x [alsa @ 0x55e4b980] ALSA buffer xrun.130kB time=00:00:00.27 bitrate=3822.5kbits/s speed=0.0403x ...
I have also tried looping a 4 second video, with similar outcomes.
My Setup for context :
- Raspberry Pi 3 Model B
- USB Audio Device (Sabrent USB External Stereo Sound Adapter)
- Ubuntu MATE 16.04.2 (Xenial)
- ffmpeg version 3.2-2+rpi1 xenial1.7 (I can post what is configured with the build, if needed)
-
Conversion of .dav [Ubuntu]
3 juin 2018, par DauasI’ve installed ffmpeg on a Ubuntu Linux Amazon EC2 Server and have a Lorex FLIR NVR directly FTP transferring .DAV files to it. In this system a Java program would then tell the EC2 to convert the .dav to but this is where the problems begin, FFMPEG fails to convert the .dav file and to my surprise there is no Codec for .dav (Though I see mention of it once having been supported). I reach out for a solution to this File Format problem, unfortunately the .dav files are a given as the NVR I have is incapable of transfering any other data type over the web, but what is the best way to convert a .dav file on a linux machine ? My Java program has full access to the Shell. It would also be incredibly helpful if anybody were to know how to get their hands on a .dav codec I could test with ffmpeg. I very much value all of your time helping me on this issue.
-
Live audio using ffmpeg, javascript and nodejs
8 novembre 2017, par klausI am new to this thing. Please don’t hang me for the poor grammar. I am trying to create a proof of concept application which I will later extend. It does the following : We have a html page which asks for permission to use the microphone. We capture the microphone input and send it via websocket to a node js app.
JS (Client) :
var bufferSize = 4096;
var socket = new WebSocket(URL);
var myPCMProcessingNode = context.createScriptProcessor(bufferSize, 1, 1);
myPCMProcessingNode.onaudioprocess = function(e) {
var input = e.inputBuffer.getChannelData(0);
socket.send(convertFloat32ToInt16(input));
}
function convertFloat32ToInt16(buffer) {
l = buffer.length;
buf = new Int16Array(l);
while (l--) {
buf[l] = Math.min(1, buffer[l])*0x7FFF;
}
return buf.buffer;
}
navigator.mediaDevices.getUserMedia({audio:true, video:false})
.then(function(stream){
var microphone = context.createMediaStreamSource(stream);
microphone.connect(myPCMProcessingNode);
myPCMProcessingNode.connect(context.destination);
})
.catch(function(e){});In the server we take each incoming buffer, run it through ffmpeg, and send what comes out of the std out to another device using the node js ’http’ POST. The device has a speaker. We are basically trying to create a 1 way audio link from the browser to the device.
Node JS (Server) :
var WebSocketServer = require('websocket').server;
var http = require('http');
var children = require('child_process');
wsServer.on('request', function(request) {
var connection = request.accept(null, request.origin);
connection.on('message', function(message) {
if (message.type === 'utf8') { /*NOP*/ }
else if (message.type === 'binary') {
ffm.stdin.write(message.binaryData);
}
});
connection.on('close', function(reasonCode, description) {});
connection.on('error', function(error) {});
});
var ffm = children.spawn(
'./ffmpeg.exe'
,'-stdin -f s16le -ar 48k -ac 2 -i pipe:0 -acodec pcm_u8 -ar 48000 -f aiff pipe:1'.split(' ')
);
ffm.on('exit',function(code,signal){});
ffm.stdout.on('data', (data) => {
req.write(data);
});
var options = {
host: 'xxx.xxx.xxx.xxx',
port: xxxx,
path: '/path/to/service/on/device',
method: 'POST',
headers: {
'Content-Type': 'application/octet-stream',
'Content-Length': 0,
'Authorization' : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'Transfer-Encoding' : 'chunked',
'Connection': 'keep-alive'
}
};
var req = http.request(options, function(res) {});The device supports only continuous POST and only a couple of formats (ulaw, aiff, wav)
This solution doesn’t seem to work. In the device speaker we only hear something like white noise.
Also, I think I may have a problem with the buffer I am sending to the ffmpeg std in -> Tried to dump whatever comes out of the websocket to a .wav file then play it with VLC -> it plays everything in the record very fast -> 10 seconds of recording played in about 1 second.
I am new to audio processing and have searched for about 3 days now for solutions on how to improve this and found nothing.
I would ask from the community for 2 things :
-
Is something wrong with my approach ? What more can I do to make this work ? I will post more details if required.
-
If what I am doing is reinventing the wheel then I would like to know what other software / 3rd party service (like amazon or whatever) can accomplish the same thing.
Thank you.
-