
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (35)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (5843)
-
FFMPEG not found because FFMPEG-binaries is no longer supported
17 novembre 2019, par brenan patrickI have been attempting to create a Discord bot, but it cannot connect to a voice channel because it gives the error
Error: FFMPEG not found
. Is there a way to get around using FFMPEG-binaries or an older version that I can install manually ?const Discord = require('discord.js');
const {
prefix,
token,
} = require('./config.json');
const ytdl = require('ytdl-core');
const client = new Discord.Client();
const queue = new Map();
client.once('ready', () => {
console.log('Ready!');
});
client.once('reconnecting', () => {
console.log('Reconnecting!');
});
client.once('disconnect', () => {
console.log('Disconnect!');
});
client.on('message', async message => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
const serverQueue = queue.get(message.guild.id);
if (message.content.startsWith(`${prefix}play`)) {
execute(message, serverQueue);
return;
} else if (message.content.startsWith(`${prefix}skip`)) {
skip(message, serverQueue);
return;
} else if (message.content.startsWith(`${prefix}stop`)) {
stop(message, serverQueue);
return;
} else {
message.channel.send('You need to enter a valid command!')
}
});
async function execute(message, serverQueue) {
const args = message.content.split(' ');
const voiceChannel = message.member.voiceChannel;
if (!voiceChannel) return message.channel.send('You need to be in a voice channel to play music!');
const permissions = voiceChannel.permissionsFor(message.client.user);
if (!permissions.has('CONNECT') || !permissions.has('SPEAK')) {
return message.channel.send('I need the permissions to join and speak in your voice channel!');
}
const songInfo = await ytdl.getInfo(args[1]);
const song = {
title: songInfo.title,
url: songInfo.video_url,
};
if (!serverQueue) {
const queueContruct = {
textChannel: message.channel,
voiceChannel: voiceChannel,
connection: null,
songs: [],
volume: 5,
playing: true,
};
queue.set(message.guild.id, queueContruct);
queueContruct.songs.push(song);
try {
var connection = await voiceChannel.join();
queueContruct.connection = connection;
play(message.guild, queueContruct.songs[0]);
} catch (err) {
console.log(err);
queue.delete(message.guild.id);
return message.channel.send(err);
}
} else {
serverQueue.songs.push(song);
console.log(serverQueue.songs);
return message.channel.send(`${song.title} has been added to the queue!`);
}
}
function skip(message, serverQueue) {
if (!message.member.voiceChannel) return message.channel.send('You have to be in a voice channel to stop the music!');
if (!serverQueue) return message.channel.send('There is no song that I could skip!');
serverQueue.connection.dispatcher.end();
}
function stop(message, serverQueue) {
if (!message.member.voiceChannel) return message.channel.send('You have to be in a voice channel to stop the music!');
serverQueue.songs = [];
serverQueue.connection.dispatcher.end();
}
function play(guild, song) {
const serverQueue = queue.get(guild.id);
if (!song) {
serverQueue.voiceChannel.leave();
queue.delete(guild.id);
return;
}
const dispatcher = serverQueue.connection.playStream(ytdl(song.url))
.on('end', () => {
console.log('Music ended!');
serverQueue.songs.shift();
play(guild, serverQueue.songs[0]);
})
.on('error', error => {
console.error(error);
});
dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);
}
client.login(token);This is the error that appears after I attempt to ’ !play ’.
D:\Bot-Files-Test>node index.js
Ready!
Error: FFMPEG not found
at Function.selectFfmpegCommand (D:\Bot-Files-Test\node_modules\prism-media\src\transcoders\ffmpeg\Ffmpeg.js:46:13)
at new FfmpegTranscoder (D:\Bot-Files-Test\node_modules\prism-media\src\transcoders\ffmpeg\Ffmpeg.js:7:37)
at new MediaTranscoder (D:\Bot-Files-Test\node_modules\prism-media\src\transcoders\MediaTranscoder.js:10:19)
at new Prism (D:\Bot-Files-Test\node_modules\prism-media\src\Prism.js:5:23)
at new VoiceConnection (D:\Bot-Files-Test\node_modules\discord.js\src\client\voice\VoiceConnection.js:46:18)
at D:\Bot-Files-Test\node_modules\discord.js\src\client\voice\ClientVoiceManager.js:63:22
at new Promise (<anonymous>)
at ClientVoiceManager.joinChannel (D:\Bot-Files-Test\node_modules\discord.js\src\client\voice\ClientVoiceManager.js:45:12)
at VoiceChannel.join (D:\Bot-Files-Test\node_modules\discord.js\src\structures\VoiceChannel.js:130:30)
at execute (D:\Bot-Files-Test\index.js:75:40)
(node:9108) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at D:\Bot-Files-Test\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:85:15
at D:\Bot-Files-Test\node_modules\snekfetch\src\index.js:215:21
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:9108) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:9108) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.</anonymous></anonymous> -
FFMPEG Error while processing the decoded data for stream #0:1
2 décembre 2020, par Michael Joseph AubryWhen using the FFMPEG command in my Lambda function I am getting this issue (version 4.2.1). When using it on my local machine it works fine (4.3.1).


Lambda Version Info


{
 data: 'ffmpeg version 4.2.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers\n' +
 'built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516\n' +
 'configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n' +
 'libavutil 56. 31.100 / 56. 31.100\n' +
 'libavcodec 58. 54.100 / 58. 54.100\n' +
 'libavformat 58. 29.100 / 58. 29.100\n' +
 'libavdevice 58. 8.100 / 58. 8.100\n' +
 'libavfilter 7. 57.100 / 7. 57.100\n' +
 'libswscale 5. 5.100 / 5. 5.100\n' +
 'libswresample 3. 5.100 / 3. 5.100\n' +
 'libpostproc 55. 5.100 / 55. 5.100\n'
}



Macbook Pro Version Info


{
 data: 'ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable- 
 libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable- 
 libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable- 
 librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable- 
 indev=jack
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100'
}



My goal with this command is to generate a thumbnail sprite sheet.


ffmpeg \
 -threads 8 \
 -ignore_editlist 1 \
 -i URL \
 -f image2 \
 -vf "select='not(mod(n,25))',setpts='N/(25*TB)',scale=180:180,tile=5x25" \ 
 -pix_fmt yuvj420p \
 -an \
 -qscale:v 28 \
 -vsync 0 \
 -preset veryfast \
 pipe:1



The same error occurs when I have a .jpg output on disk i.e
/tmp/test.jpg


This is the exact log from cloudwatch


{
 "errorType": "Error",
 "errorMessage": "ffmpeg exited with code 1: Error reinitializing filters!\nFailed to inject frame into filter network: Invalid argument\nError while processing the decoded data for stream #0:1\nConversion failed!\n",
 "stack": [
 "Error: ffmpeg exited with code 1: Error reinitializing filters!",
 "Failed to inject frame into filter network: Invalid argument",
 "Error while processing the decoded data for stream #0:1",
 "Conversion failed!",
 "",
 " at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:182:22)",
 " at ChildProcess.emit (events.js:314:20)",
 " at ChildProcess.EventEmitter.emit (domain.js:483:12)",
 " at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)"
 ]
}
</anonymous>


Here is the raw command using
fluent-ffmpeg
inside node.js

const passThrough = new stream.PassThrough();
 const fps = 25;
 const sWidth = 720 / 4;
 const sHeight = 1920 / 4;

 ffmpeg(s3Url)
 .setFfmpegPath("/opt/ffmpeg")
 .inputOptions([`-threads`, "8", "-ignore_editlist", "1"])
 .outputOptions([
 "-f",
 "image2",
 "-vf",
 `"select='not(mod(n,${fps}))',setpts='N/(${fps}*TB)',scale=${sWidth}:${sHeight},tile=5x25"`,
 "-pix_fmt",
 "yuvj420p",
 "-an",
 "-qscale:v",
 "28",
 "-vsync",
 "0",
 "-preset",
 "veryfast"
 ])
 .output(passThrough)
 .on("start", (cmdline) => console.log(cmdline))
 .on("progress", (progress) => {
 console.log(progress);
 })
 .on("error", (err) => {
 console.log(err);
 reject(err);
 })
 .run();



Additional log from cloudwatch


2020-12-02T18:42:55.023Z 2f334838-f748-4f2e-a639-15df0686ab4b INFO Error: ffmpeg exited with code 1: Error reinitializing filters!Failed to inject frame into filter network: Invalid argumentError while processing the decoded data for stream #0:1Conversion failed! at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:182:22) at ChildProcess.emit (events.js:314:20) at ChildProcess.EventEmitter.emit (domain.js:483:12) at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
</anonymous>


-
Error : ffprobe exited with code 1
30 janvier 2021, par Rishabh ChandelI'm trying to use fluent-ffmpeg in firebase functions to take screenshot of uploaded video but keep on getting this error :



Error :



Error: ffprobe exited with code 1
ffprobe version N-83692-gb8a7dcbde2-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2007-2017 the FFmpeg developers
 built with gcc 5.4.1 (Debian 5.4.1-5) 20170205
 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
 libavutil 55. 47.100 / 55. 47.100
 libavcodec 57. 81.100 / 57. 81.100
 libavformat 57. 66.102 / 57. 66.102
 libavdevice 57. 3.100 / 57. 3.100
 libavfilter 6. 74.100 / 6. 74.100
 libswscale 4. 3.101 / 4. 3.101
 libswresample 2. 4.100 / 2. 4.100
 libpostproc 54. 2.100 / 54. 2.100
test/testvideo.mp4: No such file or directory

 at ChildProcess.<anonymous> (/user_code/node_modules/fluent-ffmpeg/lib/ffprobe.js:233:22)
 at emitTwo (events.js:106:13)
 at ChildProcess.emit (events.js:191:7)
 at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
</anonymous>



Here is my code :



exports.blurOffensiveImages = functions.storage.object().onChange(event => {
 const object = event.data;
 const file = gcs.bucket(object.bucket).file(object.name);

 // Exit if this is a move or deletion event.
 if (object.resourceState === 'not_exists') {
 return console.log('This is a deletion event.');
 }

 var proc = new ffmpeg({ source: object.name })
 .withSize('150x100')
 .takeScreenshots({
 count: 2,
 timemarks: [ '50%', '75%' ],
 filename: '%b_screenshot_%w_%i'
 }, 'test_screenshot/', function(err, filenames) {
 console.log(filenames);
 console.log('screenshots were saved');
 });

});




Can anyone help what i'm doing wrong ?