
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (92)
-
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation" -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (4576)
-
ffmpeg m4a/m4b/mp4 output file's "Time" value is incorrect when read into iTunes
2 juin 2019, par PistoletPierreI’m using ffmpeg to convert audiobooks to m4a/m4b/mp4. All seems to work until trying to play them in iTunes. It plays in VLC, QuickTime, and MacOS’s Quicklook without issue.
"So why are you posting here ? This isn’t an iTunes forum."
I’m hoping this is iTunes being picky about file formats and that I can add some magic argument to my ffmpeg command and have it spit out something that iTunes can read.
Below is the bash function I’m using to do the conversion. I’ve tried m4a/mp4/m4b as values for TEMP_FILE_EXTENSION and tried opening the intermediate file as well. It’s always the same corrupted "Time" value when you put it in iTunes.
dedrm_audible () {
# Check for AtomicParsley, ffmpeg, and 3 args
if (! type AtomicParsley >/dev/null 2>/dev/null) || (! type ffmpeg >/dev/null 2>/dev/null) || [ ! $# -eq 3 ]; then
echo "Usage:"
echo " dedrm_audible <path to="to"> <activation bytes="bytes"> <path to="to" output="output" file="file">"
echo " Note: AtomicParsley and ffmpeg must be in PATH variable"
return
fi
local ORIGINAL_PWD="$(pwd)"
local TEMP_DIR="/tmp/audible"
local AUDIOBOOK_FILE="$1"
local ACTIVATION_BYTES="$2"
local OUTPUT_FILE="$3"
local FULL_AUDIOBOOK_PATH="$(realpath "${AUDIOBOOK_FILE}")"
local OUTPUT_PATH="$(realpath "${OUTPUT_FILE}")"
local TEMP_FILE_EXTENSION="m4a"
mkdir -p "${TEMP_DIR}"
cd "${TEMP_DIR}"
# Extract the book cover
ffmpeg -activation_bytes "${ACTIVATION_BYTES}" -i "${FULL_AUDIOBOOK_PATH}" -vcodec copy artwork.png
# Convert the audio
ffmpeg -activation_bytes "${ACTIVATION_BYTES}" -i "${FULL_AUDIOBOOK_PATH}" -vn -c:a copy -v debug output.${TEMP_FILE_EXTENSION}
# Add the cover to the new file
AtomicParsley output.${TEMP_FILE_EXTENSION} --artwork artwork.png --overWrite
# Put it where you want it and clean up
cp output.${TEMP_FILE_EXTENSION} "${OUTPUT_PATH}"
rm artwork.png
rm output.${TEMP_FILE_EXTENSION}
cd "${ORIGINAL_PWD}"
}
</path></activation></path>It goes off without a hitch. The new file is there waiting for me, with all the metadata including the cover when I do a "Get Info" or "Quick look" on it (I’m on MacOS). But when opening it and trying to play it in iTunes, the "time" field is way off and it immediately skips to the next song/audiobook in the queue.
Attempts to convert it within iTunes fail immediately - too quickly to see what’s happening. The errors in the console simply say "Assert failure :" (with nothing after the colon).
edit : Tommy answered the question. Here’s a working bash function :
dedrm_audible () {
# Check for AtomicParsley, ffmpeg, and 3 args
if (! type AtomicParsley >/dev/null 2>/dev/null) || (! type ffmpeg >/dev/null 2>/dev/null) || [ ! $# -eq 3 ]; then
echo "Usage:"
echo " dedrm_audible <path to="to"> <activation bytes="bytes"> <path to="to" output="output" file="file">"
echo " Note: AtomicParsley and ffmpeg must be in PATH variable"
return
fi
local ORIGINAL_PWD="$(pwd)"
local TEMP_DIR="/tmp/audible"
local AUDIOBOOK_FILE="$1"
local ACTIVATION_BYTES="$2"
local OUTPUT_FILE="$3"
# Alternative to realpath (since I read somewhere that it's not there by default on some systems): OUTPUT_PATH="$( cd "$( dirname "$OUTPUT_FILE" )" && pwd )"
local FULL_AUDIOBOOK_PATH="$(realpath "${AUDIOBOOK_FILE}")"
local AUDIOBOOK_NAME="${$(basename "${FULL_AUDIOBOOK_PATH}")%.aax}.m4a"
local OUTPUT_PATH="$(realpath "${OUTPUT_FILE}")"
local TEMP_FILE_EXTENSION="m4a"
mkdir -p "${TEMP_DIR}"
cd "${TEMP_DIR}"
cp "${FULL_AUDIOBOOK_PATH}" "${AUDIOBOOK_NAME}"
# Extract the book cover
ffmpeg -activation_bytes "${ACTIVATION_BYTES}" -i "${AUDIOBOOK_NAME}" -vcodec copy artwork.png
# Convert the audio
ffmpeg -activation_bytes "${ACTIVATION_BYTES}" -i "${AUDIOBOOK_NAME}" -vn -c:a copy -v debug output.${TEMP_FILE_EXTENSION}
# Add the cover to the new file
AtomicParsley output.${TEMP_FILE_EXTENSION} --artwork artwork.png --overWrite
# Put it where you want it and clean up
mv output.${TEMP_FILE_EXTENSION} "${OUTPUT_PATH}"
rm artwork.png
rm "${AUDIOBOOK_NAME}"
cd "${ORIGINAL_PWD}"
}
</path></activation></path> -
When I try to play my Music Discord Bot it doesn't play music
1er juin 2020, par EthanDevelopsWhen I try to play my Music Discord Bot it doesn't play music. It uses ytdl-core and ffmpeg
My code is :



const Discord = require('discord.js');
const bot = new Discord.Client

const ytdl = require("ytdl-core")


const token = 'API TOKEN'

const PREFIX = '?';

var version = '1.2';

var servers = {};

bot.on('ready', () =>{
 console.log('This bot is online!' + version);
})

bot.on('message', message => {

 let args = message.content.substring(PREFIX.length).split(" ");

 switch(args[0]){
 case 'play':

 function play(connection, message){
 var server = servers[message.guild.id];

 server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}))

 server.queue.shift();

 server.dispatcher.on("end", function(){
 if(server.queue[0]){
 play(connection, message);
 }else {
 connection.disconnect();
 }
 });



 }



 if(!args[1]){
 message.channel.send("You need to provide a link!")
 return;
 }

 if(!message.member.voice.channel){
 message.channel.send("You must be in a Voice Channel to play the bot!")
 return;
 }

 if(!servers[message.guild.id]) servers[message.guild.id] = {
 queue: []
 }

 var server = servers[message.guild.id];

 server.queue.push(args[1]);

 if(!message.guild.voice) message.member.voice.channel.join().then(function(connection){
 play(connection, message);
 })

 break;
 }



 });


 bot.login(token);




Whenever I try to play a song this error happens :





(node:5180) UnhandledPromiseRejectionWarning : Error : FFmpeg/avconv not
 found !
 at Function.getInfo (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\prism-media\src\core\FFmpeg.js:130:11)
 at Function.create (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\prism-media\src\core\FFmpeg.js:143:38)
 at new FFmpeg (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\prism-media\src\core\FFmpeg.js:44:27)
 at AudioPlayer.playUnknown (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\discord.js\src\client\voice\player\BasePlayer.js:47:20)
 at VoiceConnection.play (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\discord.js\src\client\voice\util\PlayInterface.js:71:28)
 at play (C :\Users\picar\Desktop\DiscordMusicBot\index.js:29:48)
 at C :\Users\picar\Desktop\DiscordMusicBot\index.js:66:17
 at processTicksAndRejections (internal/process/task_queues.js:97:5)
 (node:5180) 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(). To terminate the node process on unhandled
 promise rejection, use the CLI flag
--unhandled-rejections=strict

 (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode).
 (rejection id : 1)
 (node:5180) [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




I'm getting very frustrated as the tutorial I'm watching is using a different version of everything !!! Please help.


-
Pack ffmpeg executable insde myProject's executable to run
8 décembre 2023, par zurTLDR ;


I would like to pack the
ffmpeg
executable inside my own executable. Currently I am getting

FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
Skipping ./testFile202312061352.mp4 due to FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'



Details :


I am creating executable file using following command :


pyinstaller cli.py \
 --onefile \
 --add-binary /Users/<machineuser>/anaconda3/envs/my_env/bin/ffmpeg:bin
</machineuser>


The code that uses
ffmpeg
is not authored by me. And I would like to keep that part the same. I hope that when I run from command line whileconda
environment is active I can successfully run it aspython
(or perhapsanaconda
) knows where the binaries are. May be there is some environment variable that is pointing to/Users/<machineuser>/anaconda3/envs/my_env/bin/</machineuser>
I have a pretty emptycli.py
. That seems to be the entry point and I hope if it is possible I can set thebin
directory's path there ...

I am able to successfully run the application like following :


(my_env) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4



I would like to run like following :


(base) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4



I would like to keep the world out side my executable's tmp folder the same. I would not want to change something that will be "left behind" after the exec is terminated.


Question :


Can some one please mention how to modify the
pyinstaller
command or what to change incli.py
to achieve it successfully ?