
Recherche avancée
Autres articles (89)
-
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 (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (4878)
-
Error (ERR_STREAM_DESTROYED) : Cannot call write after a stream was destroyed
3 avril 2021, par TTT Tobi Triple TalkI'm getting this error when I run my discord bot on my raspberry pi. It worked everytime when I run it on my windows machine. I installed FFmpeg with sudo apt-get install ffmpeg. I don't know if I need to install something else for ffmpeg on my raspberry pi
This is the error I'm getting


events.js:291
 throw er; // Unhandled 'error' event
 ^

Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
 at doWrite (_stream_writable.js:399:19)
 at writeOrBuffer (_stream_writable.js:387:5)
 at Socket.Writable.write (_stream_writable.js:318:11)
 at PassThrough.ondata (_stream_readable.js:718:22)
 at PassThrough.emit (events.js:314:20)
 at addChunk (_stream_readable.js:297:12)
 at readableAddChunk (_stream_readable.js:272:9)
 at PassThrough.Readable.push (_stream_readable.js:213:10)
 at PassThrough.Transform.push (_stream_transform.js:152:32)
 at PassThrough.afterTransform (_stream_transform.js:96:10)
Emitted 'error' event on FFmpeg instance at:
 at errorOrDestroy (internal/streams/destroy.js:108:12)
 at FFmpeg.onerror (_stream_readable.js:754:7)
 at FFmpeg.emit (events.js:314:20)
 at Socket.processError (node_modules/prism-media/src/core/FFmpeg.js:64:40)
 at Socket.emit (events.js:314:20)
 at errorOrDestroy (internal/streams/destroy.js:108:12)
 at onwriteError (_stream_writable.js:418:5)
 at onwrite (_stream_writable.js:445:5)
 at doWrite (_stream_writable.js:399:11)
 at writeOrBuffer (_stream_writable.js:387:5) {
 code: 'ERR_STREAM_DESTROYED'
}



Normally it should play an audio stream to a discord channel.
I don't think my code is wrong, because it's working on my other computer.
My code :


let stream;
//Meme.url is just a youtube link, like https://www.youtube.com/watch?v=dQw4w9WgXcQ
stream = ytdl(meme.url, {
 filter: "audioonly",
 opusEncoded: true,
 encoderArgs: ['-af', "dynaudnorm=f=150"]
}).on("error", (err) => {
 console.log(err);
});
 try {
 song_queue.connection.play(stream, { type: "opus" })
 .on('finish', () => {
 
 });
 } catch (err) {
 console.log(err);
 message.channel.send("Error while the meme song");
 }



-
FFMPEG how to use https dynamic url as input for amovie filter
2 juillet 2020, par Johny SharmaBasically what i am trying to do is to calling a dynamic php url which is generating a audio file for me and just want to use that file as an input for amovie filter.
I hope you have understand my question.


What i have done so far ?


I have a FFMPEG code which is :


ffmpeg-y -i 'bg-file.mp3' -c copy -map 0:0 -map 1:0 -filter_complex "amovie='/auth.php?input=string&l=hi&f.mp3':loop=999[sc][mix];[0:a][sc]sidechaincompress=threshold=0.100:ratio=20,volume=10dB:precision=fixed[bg], [bg][mix]amix=duration=first" -c:a libmp3lame -ac 2 "save.mp3"



This line is calling my dynamic url for generating the required song.


"amovie='/auth.php?input=string&l=hi&f.mp3'



Everything is working if i check them apart. but when i use them together the ffmpeg is giving the following error.


[22] => [Parsed_amovie_0 @ 0x1378140] Failed to avformat_open_input '/auth.php?input=string&l=hi&f.mp3':loop=999'
[23] => [AVFilterGraph @ 0x1368ca0] Error initializing filter 'amovie' with args '/auth.php?input=string&l=hi&f.mp3':loop=999'
[24] => Error initializing complex filters.
[25] => No such file or directory



I dont know is it possible to put a dynamically generated url as an input for amovie filter or not ?
if i open my dynamic url in browser its works like a mp3 file and play similar to any mp3 file.


using this code to play that mp3 :


header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($path));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
ob_clean();
flush();
readfile($path);
exit;



This one looks similar to my query but slightly different and that's why i am still looking for a solution


How to use https input with ffmpeg "amovie" filter ?


-
FFMPEG on Linux (Mono)
28 novembre 2016, par Paulo AnjosI’m creating a Discord Bot and I’m using Dot.Net. So I downloaded the necessary libs (ffmpeg and opus [for Discord]) and I’m running the .exe with Mono.
I’m downloading a video file (mp4) and using FFMPEG to adjust the audio (16-bit, 48000Hz, PCM, 2 channels) and send it to the Discord Channel.
It works fine on Windows but it refuses to on Linux (Ubuntu 14.04).
It justs hangs and doesn’t do anything else like
this image shows.Same .exe but in Windows now (to compare if needed) : image link
I thought it was something with my Virtual Private Server but the same problem occured with my local Ubuntu 14.04 virtual machine.
Code to send the song to Discord (Dot.Net) :
async public void playAudio(Music m)
{
string path = "mp4" + Path.DirectorySeparatorChar + m.videoid + ".mp4";
Process mProcess = Process.Start(new ProcessStartInfo
{
FileName = "ffmpeg",
Arguments = //"-loglevel quiet " +
"-i " + (char)34 + path + (char)34 + " " +
"-f s16le -ar 48000 -ac 2 pipe:1",
UseShellExecute = false,
CreateNoWindow = false,
RedirectStandardOutput = true, //stdout of the process
RedirectStandardError = false,
Verb = "runas"
});
while (!Utils.isRunning(mProcess)) { await Task.Delay(500); }
while (true)
{
int blockSize = 3840;
byte[] buffer = new byte[blockSize];
int byteCount;
byteCount = mProcess.StandardOutput.BaseStream.Read(buffer, 0, blockSize);
if (byteCount == 0)
break;
if (stop_music)
break;
bot_audio.Send(buffer, 0, byteCount); //Send to Discord
}
...
}I find a little odd the
libavresample 3. 1. 0 / 3. 1. 0
at the image (missing lib maybe ?).Any thoughts ?