
Recherche avancée
Médias (91)
-
DJ Z-trip - Victory Lap : The Obama Mix Pt. 2
15 septembre 2011
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (69)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
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 ;
-
Diogene : création de masques spécifiques de formulaires d’édition de contenus
26 octobre 2010, parDiogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
A quoi sert ce plugin
Création de masques de formulaires
Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)
Sur d’autres sites (10054)
-
Why does my nginx endpoint streaming audio via ffmpeg fail with "An unexpected TLS packet was received"
6 décembre 2020, par rajaman0I'm using nginx to proxy requests to a flask/gunicorn API. For most of my endpoints, it works perfectly - however, I have one endpoint which serves an audio response (through ffmpeg) which doesn't seem to work no matter what I try. Running everything through docker.


Here's my nginx config :


server {
 listen $PORT;
 root /usr/share/nginx/html;
 index index.html index.html;

 access_log /var/log/nginx/reverse-access.log;
 error_log /var/log/nginx/reverse-error.log;

 location / {
 try_files $uri /index.html =404;
 }

 location /api/stream_audio_file {
 proxy_pass http://backend;
 proxy_http_version 1.1;
 proxy_set_header Connection "keep-alive";
 proxy_set_header Host $host;

 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Host $server_name;
 }



Here's the core of the python code for http://backend/api/stream_audio_file (run through flask, gunicorn)


ffmpeg_options = ['-i', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3']
ffmpeg_options += ["-f", "mp3"]
ffmpeg_options += ["-to", '00:00:02.000']
ffmpeg_options += ["-vn"]
ffmpeg_options += ["-ab", "256k"]
ffmpeg_options += ["-strict", "-2"]
ffmpeg_options += ["-loglevel", "trace"]
p = Popen(["ffmpeg"] + ffmpeg_options + ["-"],
 stdout=PIPE)
max_bytes = 256000
output = p.stdout.read(max_bytes)
return Response(output, headers={
 "Content-Type": "audio/mp3",
 "icy-name": yt_info['title'].encode('latin-1', 'ignore'),
 "icy-bitrate": "256",
 "ice-audio-info": "bitrate=256",
 "Cache-Control": "no-cache"
})



When I test out this endpoint, I've pasted the full ffmpeg logs here : https://pastebin.com/wMMpmL6M
Of import, it seems to fetch the mp3 url appropriately but fails with error :


[tls @ 0x555bf3011a80] An unexpected TLS packet was received.
https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3: I/O error
[out_0_0 @ 0x555bf302ab00] EOF on sink link out_0_0:default.
No more output streams to write to, finishing.



I've tried quite a few things :


- 

- This endpoint works without nginx. I tried querying just the endpoint running w/ just gunicorn, and responses are streamed back correctly. Thus the error HAS to be nginx related ?
- The error being TLS related is confusing - I've tried setting up nginx w/ ssl on and adding certs, but that doesn't help / change the error in any way.
- I've tried playing around with headers in both nginx and on the python side, following some of the examples here : https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/. Doesn't work.
Response(stream_with_context(..)
in flask doesn't work either.- Don't know much about nginx, but tried some other suggestions e.g. buffering / no buffering through nginx, etc, nothing seems to work :(.
- When I ssh into my docker container, and run the same ffmpeg command
ffmpeg -i https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 -f mp3 -to 00:00:02.000 -vn -ab 256k -strict -2 -loglevel trace
outside of the request context, it works ! - Tried compiling ffmpeg with both openssl and gnutls, neither works. However : the openssl version fails w/

tls @ error:1408F1BB:SSL routines:ssl3_get_record:bad record type
instead.
















Please let me know what other debugging info would be helpful / if anyone has any hypothesis I can test out.


-
"Cannot read property 'url' of undefined" even though it's already defined
28 novembre 2020, par Levi StanczI'm making a Discord music Bot and I'm having trouble with an error saying


TypeError: Cannot read property 'url' of undefined



I tried console logging it and it showed me the
url
, so I don't understand what is the problem with my code.

Here's my code :


//musicBOT
const Discord = require('discord.js');
const client = new Discord.Client();
const ytdl = require('ytdl-core');
const mcPrefix = '.';

const queue = new Map();

client.on('ready', () => console.log('Music bot ready!'));

client.on('message', async message => {
 if(message.author.bot) return;
 if(!message.content.startsWith(mcPrefix)) return;

 const args = message.content.substring(mcPrefix.length).split(" ");
 const serverQueue = queue.get(message.guild.id);

 if(message.content.startsWith(`${mcPrefix}play`)) {

 const voiceChannel = message.member.voice.channel;
 if(!voiceChannel) return message.channel.send("Hang-szobában kell lenned zenelejátszáshoz.");
 const permissions = voiceChannel.permissionsFor(message.client.user);
 if(!permissions.has('CONNECT')) return message.channel.send("Nincs jogosultságom csatlakozni a hangszobához.");
 if(!permissions.has('SPEAK')) return message.channel.send("Nincs jogosultságom megszólalni ebben a hangszobában.");

 const songInfo = await ytdl.getInfo(args[1])
 const song = {
 title: songInfo.title,
 url: songInfo.videoDetails.video_url
 }

 if(!serverQueue) {
 const queueConstruct = {
 textChannel: message.channel,
 voiceChannel: voiceChannel,
 connection: null,
 songs: [],
 volume: 5,
 playing: true
 }
 queue.set(message.guild.id, queueConstruct)

 queueConstruct.songs.push(song)

 try{
 var connection = await voiceChannel.join();
 message.channel.send(`${song.title} lejátszása.`)
 queueConstruct.connection = connection
 play(message.guild, queueConstruct.songs[0])
 }catch(e){
 console.log(`Hiba csatlakozás közben itt: ${e}`);
 queue.delete(message.guild.id)
 return message.channel.send(`Hiba volt a csatlakozás közben itt: ${e}`)
 }
 } else{
 serverQueue.songs.push(song)
 return message.channel.send(`**${song.title}** hozzáadva a lejátszási listához.`)
 }
 return undefined
 

 
 }else if (message.content.startsWith(`${mcPrefix}stop`)) {
 if(!message.member.voice.channel) return message.channel.send("Hang-szobában kell lenned ahhoz, hogy leállítsd a zenét.")
 if(!serverQueue) return message.channel.send("There is nothing playing")
 serverQueue.songs= []
 serverQueue.connection.dispatcher.end()
 message.channel.send("Sikeresen megálltottad a zenét.")
 return undefined
 }else if(message.content.startsWith(`${mcPrefix}skip`)){
 if(!message.member.voice.channel) return message.channel.send("Hang-szobában kell lenned a skip parancshoz.")
 if(!serverQueue) return message.channel.send("There is nothing playing")
 serverQueue.connection.dispatcher.end()
 message.channel.send("Zene továbbléptetve.")
 message.channel.send(`${song.title} játszása.`)
 
 return undefined
 }

 function play(guild, song) {
 const serverQueue = queue.get(guild.id)
 
 if(!serverQueue.songs){
 serverQueue.voiceChannel.leave()
 queue.delete(guild.id)
 return
 }
 
 const dispatcher = serverQueue.connection.play(ytdl(song.url))
 .on('finish', () => {
 serverQueue.songs.shift()
 play(guild, serverQueue.songs[0])
 })
 .on('error', error => {
 console.log(error)
 })
 dispatcher.setVolumeLogarithmic(serverQueue.volume / 5)
 }

})
//musicBOT



and here is the full error :


const dispatcher = serverQueue.connection.play(ytdl(songInfo.url))
 ^
TypeError: Cannot read property 'url' of undefined
 at play (C:\Users\Levi\Desktop\Discord BOT Javascript\bot.js:97:70)
 at StreamDispatcher.<anonymous> (C:\Users\Levi\Desktop\Discord BOT Javascript\bot.js:100:17)
 at StreamDispatcher.emit (node:events:388:22)
 at finish (node:internal/streams/writable:734:10)
 at processTicksAndRejections (node:internal/process/task_queues:80:21)
</anonymous>


I started searching on the internet but found nothing about it, I guess my basic javascript knowledge is just not enough.


-
Getting "OSError : [Errno 32] Broken pipe" while saving a numpy array using imageio.mimwrite into io.BytesIO() object
10 novembre 2020, par green_hunter434I am trying to save a numpy array (array of frames) as a video using imageio.mimwrite .


Operation like this works fine -


imageio.mimwrite('./temp4.mp4', frames, fps=fps, format='.mp4')



But, when I try something like this -


fo = io.BytesIO()
imageio.mimwrite(fo, frames, fps=fps, format='.mp4')



OR


writer = imageio.get_writer(fo, fps=fps, format='.mp4')

for im in frames:
 writer.append_data(imageio.imread(im))
writer.close()



I get the following error -


---------------------------------------------------------------------------
BrokenPipeError Traceback (most recent call last)
c:\program files (x86)\python38-32\lib\site-packages\imageio_ffmpeg\_io.py in write_frames(path, size, pix_fmt_in, pix_fmt_out, fps, quality, bitrate, codec, macro_block_size, ffmpeg_log_level, ffmpeg_timeout, input_params, output_params)
 478 try:
--> 479 p.stdin.write(bb)
 480 except Exception as err:

BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

OSError Traceback (most recent call last)
 in <module>
 1 for im in ret3:
----> 2 writer.append_data(im)
 3 writer.close()

c:\program files (x86)\python38-32\lib\site-packages\imageio\core\format.py in append_data(self, im, meta)
 500 im = asarray(im)
 501 # Call
--> 502 return self._append_data(im, total_meta)
 503 
 504 def set_meta_data(self, meta):

c:\program files (x86)\python38-32\lib\site-packages\imageio\plugins\ffmpeg.py in _append_data(self, im, meta)
 572 
 573 # Write. Yes, we can send the data in as a numpy array
--> 574 self._write_gen.send(im)
 575 
 576 def set_meta_data(self, meta):

c:\program files (x86)\python38-32\lib\site-packages\imageio_ffmpeg\_io.py in write_frames(path, size, pix_fmt_in, pix_fmt_out, fps, quality, bitrate, codec, macro_block_size, ffmpeg_log_level, ffmpeg_timeout, input_params, output_params)
 484 "OUTPUT:\n".format(err, cmd_str)
 485 )
--> 486 raise IOError(msg)
 487 
 488 nframes += 1

OSError: [Errno 32] Broken pipe

FFMPEG COMMAND:
c:\program files (x86)\python38-32\lib\site-packages\imageio_ffmpeg\binaries\ffmpeg-win32-v4.2.2.exe -y -f rawvideo -vcodec rawvideo -s 256x256 -pix_fmt rgb24 -r 29.97 -i - -an -vcodec libx264 -pix_fmt yuv420p -crf 25 -v warning C:\Users\pramu\AppData\Local\Temp\imageio_fh1fqkgc

FFMPEG STDERR OUTPUT:
</module>


I get the same error using anaconda ffmpeg and non-anaconda ffmpeg.


Is there a way to fix this error ?


Also, is there a better way to convert list of frames into .mp4 or serializing it for sending through an API ?.


Thank you !