
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (106)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...) -
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)
Sur d’autres sites (10053)
-
Static ffmpeg library windows
29 novembre 2022, par peterIm trying to use the ffmpeg libraries (
libavutil
,libswscale
, ...) in a bigger project by statically linking them, im not interested in the binaries. Now the issue comes down to getting them statically built. I tried searching for pre-compiled builds but without success.

Following the docs, i compiled them on wsl2 for win64 with


./configure --arch=x86_64 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --disable-shared --enable-static
make



After that i copied the
libavformat/libavformat.a
aslibavformat.lib
(which should be fine since they are cross-compiledar
archives ?) into my project and linked them with CMake.

When compiling smth like


AVFormatContext* pFormatContext = avformat_alloc_context();



i get a linker error saying


lld-link : error : undefined symbol: avformat_alloc_context



When looking at the libs with
dumpbin -linkermember libavformat.lib
, i can see

>dumpbin -linkermember libavformat.lib
...
 135CD92 _avformat_alloc_context
...



notice the underscore.


Can i not link the cross-compiled
*.a
files directly into a windows executable ?

Honestly at this point any ideas are welcome.


Thanks


-
Streaming audio from FFMPEG to browser via WebSocket and WebAudioApi
17 novembre 2022, par Sebi O.My project has 2 parts :


- 

- a web interface that the user accesses
- and a standalone app installed on the computer, that acts as a websocket server.






From the web UI, the user has to hear his computer's microphone.
At this moment, I have a working solution that listens to microphone and sends the raw PCM audio chunks back to web-UI which is able to play them. But some serious lag gets added in time, despite it all runs on the same computer, so there's no internet latency/etc. That is why I am testing FFMPEG now.


So, here's the FFMPEG command for streaming microphone data :


ffmpeg.exe -re -f dshow -i audio="Microphone (HD Pro Webcam C920)" -ar 44100 -ac 1 -f f32le pipe:1



Data gets sent successfully via websocket, but playing it using WebAudioApi is not working, i mean i don't hear anything.


Can anyone point me to what am I doing wrong ?
Here's the web javascript :


let ipOfAudioServer = 'localhost';

 let wsClient = null;
 
 var audioCtx = null;
 var subcounter = 0;
 var audiobuffer = [];
 var source = null;
 
 // must match the values in the audio-server. Thought despite audio-server could send 2channels.. we resume to only one, to save bandwidth
 var sampleRate = 44100; 
 var channels = 1;
 
 var microphone = 'Microphone (HD Pro Webcam C920)';
 
 
 // this method reads current position from the audiobuffer and plays the audio
 // the method will re-call itself, in order to play the next item in queue
 this.play = function(soundName) {

 var ffs = audiobuffer[subcounter];
 
 if (ffs) {
 var frameCount = ffs.byteLength;
 console.log(frameCount, audiobuffer.length);
 
 var myAudioBuffer = audioCtx.createBuffer(channels, frameCount, sampleRate); 
 myAudioBuffer.getChannelData(0).set(ffs)
 
 if (myAudioBuffer != null)
 { 
 subcounter += 1;
 
 source = audioCtx.createBufferSource();
 source.buffer = myAudioBuffer;
 source.connect(audioCtx.destination);
 source.onended = () => { console.log("finished, continuing to seek buffer!"); play(soundName); }
 source.start();
 } 
 }
 // just in case the counter got to be bigger than the actual amount of items in the list, set it back to last one
 if (subcounter > audiobuffer.length)
 subcounter = audiobuffer.length;
 };
 
 
 // the method to initialize WS client
 this.initWebsocketClient = function ()
 {
 if (wsClient == null)
 {
 wsClient = new WebSocket(`ws://${ipOfAudioServer}:23233`, "protocol");
 wsClient.binaryType = "arraybuffer";
 
 wsClient.onmessage = function (event) 
 {
 if (typeof event.data === 'object') {
 
 console.log(event.data, event.data.size);
 
 // clear memory in case buffer is already too big
 if (subcounter > 50) {
 console.log('cleared memory');
 audiobuffer = [];
 subcounter = 0;
 }
 
 
 audiobuffer.push(event.data);
 if (audiobuffer.length == 1) {
 play('sinewave');
 }
 
 }
 else {
 if (event.data == 'stopMicrophone=ok') {
 wsClient.close();
 wsClient = null;
 
 audiobuffer = [];
 subcounter = 0;
 }
 
 console.log(event.data);
 }
 }
 }
 };

 // method used in send() which will actually send the message only after connection has been established successfully.
 this.waitForConnection = function (callback, interval) {
 if (wsClient.readyState === 1) {
 callback();
 } else {
 var that = this;
 // optional: implement backoff for interval here
 setTimeout(function () {
 that.waitForConnection(callback, interval);
 }, interval);
 }
 };
 
 // using this method to send WS messages to the audio-server
 this.send = function (message, callback) 
 {
 this.initWebsocketClient();
 
 this.waitForConnection(function () {
 wsClient.send(message);
 if (typeof callback !== 'undefined') {
 callback();
 }
 }, 1000);
 };
 
 // called by clicking the start button
 function startCapture() {
 if (audioCtx == null)
 audioCtx = new (window.AudioContext || window.webkitAudioContext)();
 
 audiobuffer = [];
 subcounter = 0;
 
 this.send(`startMicrophone?device=${microphone}`);
 }

 // called by clicking the stop button
 function stopCapture() {
 this.send('stopMicrophone');
 } 



-
Find/extract the frames which are different in two videos
24 novembre 2022, par GreendrakeI have two H.264 video files roughly 30GB each, with 256291 frames in each. Most, if not all, frames in the 1st video appear identical to their counterparts in the 2nd video. That said, the video content is seemingly almost (maybe completely) identical.


The raw H.264 streams extracted from the video files are actually supposed to be identical but they are not : one is bigger than the other by about 2MB. So, it seems like there ought to be some differences in the picture somewhere.


I have used the following command to extract a frame each 0.5s from the files and then compared the frames' md5 hashes. All 21356 frame files extracted from the first video exactly match their counterparts from the second video.


for i in {0..21356} ; do ffmpeg -hide_banner -loglevel error -accurate_seek -ss `echo $i*0.5 | bc` -i video.mp4 -frames:v 1 frames/period_down_$i.bmp ; done



So, the odds that the video is anyhow different are low. But not 0% chance as the one or a few different frames could just fall outside of the 0.5s picks that I tried.


Is there any smart way to find/extract the diffing frames only ?


I could extract all frames and compare them but that's not smart at all and would take lots of time / disk space.