
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (72)
-
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 (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
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 (...)
Sur d’autres sites (7549)
-
ffmpeg is not creating screenshot from video
1er décembre 2014, par hiteshI need to create a screen shot from video,
I have followed this tutorial to do the intial setup
1) I downloaded the ffmpeg from here -[
http://ffmpeg.zeranoe.com/builds/ ] for 64 bit operating system.2) I followed the https://www.youtube.com/watch?v=gU49GiWGGAI , video and did all configuration successfully and
phpinfo()
shows thatffmpeg
has been installed.3) Then I tried this to find out whether it is working or not,
It worked successfully
4) Next I followed this video tutorial here , but for some reason video thumbnails are not created.
Not able to find the problem, I don’t see any error also.
below is my code
/**
* FFMPEG-PHP Test Script
*
* Special thanks to http://www.sajithmr.me/ffmpeg-sample-code for this code example!
* See the tutorial at http://myownhomeserver.com on how to install ffmpeg-php.
*/
error_reporting(1);
error_reporting(E_ALL ^ E_NOTICE);
// Check if the ffmpeg-php extension is loaded first
extension_loaded('ffmpeg') or die('Error in loading ffmpeg');
// Determine the full path for our video
$vid = realpath('./videos/myvideo.mp4');
$videosize = filesize($vid);
$remoteVideo = 'http://video-js.zencoder.com/oceans-clip.mp4';
//ffmpeg
$ffmpeg = dirname(__FILE__) . "\bin\\ffmpeg";
$imageFile = "1.png";
$image2 = "2.png";
$size = "120x90";
$getfromsecond = 7;
$cmd = "$ffmpeg -i $vid -an -ss $getfromsecond -s $size $imageFile";
$cmd2 = "$ffmpeg -i $remoteVideo -an -ss $getfromsecond -s $size $image2";
if(!shell_exec($cmd)){
echo "Thumbnail created";
}else{
echo "Error Creating thumbnail";
}
if(!shell_exec($cmd2)){
echo "Thumbnail for remote url was created";
}else{
echo "Error Creating thumbnail for remote url ";
}OUTPUT
Thumbnail created
Thumbnail for remote url was createdPlease help me solve this issue.
-
Setting getChannelData causing socket.io to crash in web audio
6 novembre 2014, par Brad.SmithI’m having an issue where whenever I transcode an audio file and send the audio buffer to the client via socket.io to be played by web audio my connection dies as soon as I perform
source.buffer.getChannelData(0).set(audio);
I’m assuming that this isn’t a Socket.IO problem and that I’m only seeing the Socket.IO issue as a result of the real problem. In the client I’m piping the audio file into stdin of ffmpeg and listening to stderr of ffmpeg to determine when it’s safe to send the buffer. The client is receiving the buffer and is doing everything properly until the line stated above. Here is some sample test code to reproduce the issue.
Server side :
var express = require('express');
var http = require('http');
var spawn = require('child_process').spawn;
var app = express();
var webServer = http.createServer(app);
var io = require('socket.io').listen(webServer, {log: false});
app.use(express.static(__dirname + '/public'));
app.get('/', function(req, res){
res.send(
"<code class="echappe-js"><script src='http://stackoverflow.com/socket.io/socket.io.js'></script>\n"+
"<script>var socket=io.connect('http://127.0.0.1:3000');</script>
\n"+
"<script src='http://stackoverflow.com/webaudio_file_cli.js'></script>
"
) ;
) ;
webServer.listen(3000) ;io.sockets.on(’connection’, function(webSocket)
var disconnect = ’0’ ;
var count = 0 ;
var audBuf = new Buffer([]) ;if (disconnect == ’0’)
console.log(’new connection...’) ;var inputStream = spawn(’wget’, [’-O’,’-’,’http://www.noiseaddicts.com/samples/4353.mp3’]) ;
var ffmpeg = spawn(’ffmpeg’, [
’-i’, ’pipe:0’, // Input on stdin
’-acodec’, ’pcm_s16le’, // PCM 16bits, little-endian
’-ar’, ’24000’, // Sampling rate
’-ac’, 1, // Mono
’-f’, ’wav’,
’pipe:1’ // Output on stdout
], stdio : [’pipe’,’pipe’,’pipe’]) ;inputStream.stdout.pipe(ffmpeg.stdin) ;
ffmpeg.stdout.on(’data’, function(data)
audBuf = Buffer.concat([audBuf,data]) ;
) ;ffmpeg.stderr.on(’data’, function(data)
var _line = data.toString(’utf8’) ;
if (_line.substring(0,5) == ’size=’ && _line.indexOf(’headers :’) > -1)
console.log(’completed...’) ;
webSocket.emit(’audio’,audBuf) ;
) ;
webSocket.on(’disconnect’, function()
console.log(’disconnecting...’) ;
disconnect=1 ;
) ;
) ;
Client side (webaudio_file_cli.js) :
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var context = new AudioContext();
var source = context.createBufferSource();
var audioStack = [], audio = [];
socket.on('audio', function(data) {
playAudio(data);
});
function playAudio(data) {
// playback starting...
audioStack = Int16Array(data);
for (var i = 0; i < audioStack.length; i++) {
audio[i] = (audioStack[i]>0)?audioStack[i]/32767:audioStack[i]/32768; // convert buffer to within the range -1.0 -> +1.0
}
var audioBuffer = context.createBuffer(1, audio.length, 24000);
source.buffer.getChannelData(0).set(audio);
source.buffer = audioBuffer;
source.connect(context.destination);
source.start(0);
} -
Introducing Crash Analytics for Matomo