
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (49)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (3986)
-
ffmpeg - recorded video stream is not displayed in vlc media player
2 janvier 2024, par DeThe92I am trying to record an RTSP video stream from a Techage IP camera on my home network. I am using ffmpeg on my Raspberry Pi to do this and want to save the recorded video and audio data. My problem is that there seems to be video data coming through, but when I try to download the recorded file, there is only an audio stream, no video is displayed.


I try :


> ffmpeg -y -rtsp_transport tcp -re -i "rtsp://:554/user=admin&password=&channel=0&stream=0.sdp" -c copy -t 2 "output.avi"



The result output is :


ffmpeg version git-2016-07-02-0c6bedc Copyright (c) 2000-2016 the FFmpeg developers
 built with gcc 8 (Raspbian 8.3.0-6+rpi1)
 configuration: --extra-ldflags=-latomic --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-libx264 --enable-nonfree
 libavutil 55. 28.100 / 55. 28.100
 libavcodec 57. 48.101 / 57. 48.101
 libavformat 57. 41.100 / 57. 41.100
 libavdevice 57. 0.102 / 57. 0.102
 libavfilter 6. 47.100 / 6. 47.100
 libswscale 4. 1.100 / 4. 1.100
 libswresample 2. 1.100 / 2. 1.100
 libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://192.168.178.60:554/user=admin&password=&channel=0&stream=0.sdp':
 Metadata:
 title : RTSP Session
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: hevc (Main), yuvj420p(pc), 3840x2160, 10 fps, 10 tbr, 90k tbn, 10 tbc
 Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s
[avi @ 0x1c4a1a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
 Last message repeated 1 times
Output #0, avi, to 'a0.avi':
 Metadata:
 INAM : RTSP Session
 ISFT : Lavf57.41.100
 Stream #0:0: Video: hevc, yuvj420p(pc), 3840x2160, q=2-31, 10 fps, 10 tbr, 20 tbn, 20 tbc
 Stream #0:1: Audio: pcm_alaw ([6][0][0][0] / 0x0006), 8000 Hz, mono, 64 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[avi @ 0x1c4a1a0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame= 3 fps=0.0 q=-1.0 size= 220kB time=00:00:00.60 bitrate=3002.0kbits/s speed=1.1
frame= 10 fps=9.9 q=-1.0 size= 303kB time=00:00:01.12 bitrate=2214.9kbits/s speed=1.1
frame= 15 fps=9.9 q=-1.0 size= 367kB time=00:00:01.60 bitrate=1878.5kbits/s speed=1.0
frame= 20 fps=9.9 q=-1.0 size= 431kB time=00:00:02.00 bitrate=1766.1kbits/s speed=0.9
frame= 20 fps=9.1 q=-1.0 Lsize= 433kB time=00:00:02.00 bitrate=1774.5kbits/s speed=0.908x
video:406kB audio:16kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.827832%



Does someone has any idea what could be wrong ? Thanks in advance.


-
Twilio Real-Time Media Streaming to WebSocket Receives Only Noise Instead of Speech
21 février, par dannym25I'm setting up a Twilio Voice call with real-time media streaming to a WebSocket server for speech-to-text processing using Google Cloud Speech-to-Text. The connection is established successfully, and I receive a continuous stream of audio data from Twilio. However, when I play back the received audio, all I hear is a rapid clicking/jackhammering noise instead of the actual speech spoken during the call.


Setup :


- 

- Twilio
sends inbound audio to my WebSocket server. - WebSocket receives and saves the raw mulaw-encoded audio data from Twilio.
- The audio is processed via Google Speech-to-Text for transcription.
- When I attempt to play back the audio, it sounds like machine-gun-like noise instead of spoken words.










1. Confirmed WebSocket Receives Data


• The WebSocket successfully logs incoming audio chunks from Twilio :


🔊 Received 379 bytes of audio from Twilio
🔊 Received 379 bytes of audio from Twilio



• This suggests Twilio is sending audio data, but it's not being interpreted correctly.


2. Saving and Playing Raw Audio


• I save the incoming raw mulaw (8000Hz) audio from Twilio to a file :


fs.appendFileSync('twilio-audio.raw', message);



• Then, I convert it to a
.wav
file using FFmpeg :

ffmpeg -f mulaw -ar 8000 -ac 1 -i twilio-audio.raw twilio-audio.wav



• Problem : When I play the audio using
ffplay
, it contains no speech, only rapid clicking sounds.

3. Ensured Correct Audio Encoding


• Twilio sends mulaw 8000Hz mono format.
• Verified that my
ffmpeg
conversion is using the same settings.
• Tried different conversion methods :

ffmpeg -f mulaw -ar 8000 -ac 1 -i twilio-audio.raw -c:a pcm_s16le twilio-audio-fixed.wav



→ Same issue.


4. Checked Google Speech-to-Text Input Format


• Google STT requires proper encoding configuration :


const request = {
 config: {
 encoding: 'MULAW',
 sampleRateHertz: 8000,
 languageCode: 'en-US',
 },
 interimResults: false,
};



• No errors from Google STT, but it never detects speech, likely because the input audio is just noise.


5. Confirmed That Raw Audio is Not a WAV File


• Since Twilio sends raw audio, I checked whether I needed to strip the header before processing.
• Tried manually extracting raw bytes, but the issue persists.


Current Theory :


- 

- The WebSocket server might be handling Twilio’s raw audio incorrectly before saving it.
- There might be an additional header in the Twilio stream that needs to be removed before playback.
- Twilio’s
<stream></stream>
tag expects a WebSocket connection starting withwss://
instead ofhttps://
, and switching towss://
partially fixed some previous connection issues.








Code Snippets :


Twilio
Setup in TwiML Response 

app.post('/voice-response', (req, res) => {
 console.log("📞 Incoming call from Twilio");

 const twiml = new twilio.twiml.VoiceResponse();
 twiml.say("Hello! Welcome to the service. How can I help you?");
 
 // Prevent Twilio from hanging up too early
 twiml.pause({ length: 5 });

 twiml.connect().stream({
 url: `wss://your-ngrok-url/ws`,
 track: "inbound_track"
 });

 console.log("🛠️ Twilio Stream URL:", `wss://your-ngrok-url/ws`);
 
 res.type('text/xml').send(twiml.toString());
});



WebSocket Server Handling Twilio Audio Stream


wss.on('connection', (ws) => {
 console.log("🔗 WebSocket Connected! Waiting for audio input...");

 ws.on('message', (message) => {
 console.log(`🔊 Received ${message.length} bytes of audio from Twilio`);

 // Save raw audio data for debugging
 fs.appendFileSync('twilio-audio.raw', message);

 // Check if audio is non-empty but contains only noise
 if (message.length < 100) {
 console.warn("⚠️ Warning: Audio data from Twilio is very small. Might be silent.");
 }
 });

 ws.on('close', () => {
 console.log("❌ WebSocket Disconnected!");
 
 // Convert Twilio audio for debugging
 exec(`ffmpeg -f mulaw -ar 8000 -ac 1 -i twilio-audio.raw twilio-audio.wav`, (err) => {
 if (err) console.error("❌ FFmpeg Conversion Error:", err);
 else console.log("✅ Twilio Audio Saved as `twilio-audio.wav`");
 });
 });

 ws.on('error', (error) => console.error("⚠️ WebSocket Error:", error));
});



Questions :


- 

- Why is the audio from Twilio being received as a clicking noise instead of actual speech ?
- Do I need to strip any additional metadata from the raw bytes before saving ?
- Is there a known issue with Twilio’s
mulaw
format when streaming audio over WebSockets ? - How can I confirm that Google STT is receiving properly formatted audio ?










Additional Context :


- 

- Twilio
<stream></stream>
is connected and receiving data (confirmed by logs). - WebSocket successfully receives and saves audio, but it only plays noise.
- Tried multiple ffmpeg conversions, Google STT configurations, and raw data inspection.
- Still no recognizable speech in the audio output.










Any help is greatly appreciated ! 🙏


- Twilio
-
Android Media palyer by FFmpeg2.3.3 and SDL2-2.0.3 has a error when SDL_init().The error is about SDL_main.h
18 novembre 2014, par HanamakiI use FFmpeg2.3.3 and SDL2-2.0.3 to develop an Android video player.I built the .apk success,but when I ran it,it’s an error at SDL_init().I got message by SDL_error().The message was :
SDL_Init(14144) : Application didn’t initialize properly, did you include SDL_main.h in the file containing your main() function ?
but I have #include "SDL_main.h" in the source.Anyone has some suggestions ? thanks very much.