Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (92)

  • Gestion de la ferme

    2 mars 2010, par

    La 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, par

    Multilang 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, par

    Le 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 PistoletPierre

    I’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" )" &amp;&amp; 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 EthanDevelops

    When I try to play my Music Discord Bot it doesn't play music. It uses ytdl-core and ffmpeg&#xA;My code is :

    &#xA;&#xA;

    const Discord = require(&#x27;discord.js&#x27;);&#xA;const bot = new Discord.Client&#xA;&#xA;const ytdl = require("ytdl-core")&#xA;&#xA;&#xA;const token = &#x27;API TOKEN&#x27;&#xA;&#xA;const PREFIX = &#x27;?&#x27;;&#xA;&#xA;var version = &#x27;1.2&#x27;;&#xA;&#xA;var servers = {};&#xA;&#xA;bot.on(&#x27;ready&#x27;, () =>{&#xA;    console.log(&#x27;This bot is online!&#x27; &#x2B; version);&#xA;})&#xA;&#xA;bot.on(&#x27;message&#x27;, message => {&#xA;&#xA;    let args = message.content.substring(PREFIX.length).split(" ");&#xA;&#xA;    switch(args[0]){&#xA;        case &#x27;play&#x27;:&#xA;&#xA;            function play(connection, message){&#xA;                var server = servers[message.guild.id];&#xA;&#xA;                server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}))&#xA;&#xA;                server.queue.shift();&#xA;&#xA;                server.dispatcher.on("end", function(){&#xA;                    if(server.queue[0]){&#xA;                        play(connection, message);&#xA;                    }else {&#xA;                        connection.disconnect();&#xA;                    }&#xA;                });&#xA;&#xA;&#xA;&#xA;            }&#xA;&#xA;&#xA;&#xA;            if(!args[1]){&#xA;                message.channel.send("You need to provide a link!")&#xA;                return;&#xA;            }&#xA;&#xA;            if(!message.member.voice.channel){&#xA;               message.channel.send("You must be in a Voice Channel to play the bot!")&#xA;               return;&#xA;            }&#xA;&#xA;            if(!servers[message.guild.id]) servers[message.guild.id] = {&#xA;                queue: []&#xA;            }&#xA;&#xA;            var server = servers[message.guild.id];&#xA;&#xA;            server.queue.push(args[1]);&#xA;&#xA;            if(!message.guild.voice) message.member.voice.channel.join().then(function(connection){&#xA;                play(connection, message);&#xA;            })&#xA;&#xA;        break;&#xA;    }&#xA;&#xA;&#xA;&#xA;    });&#xA;&#xA;&#xA;    bot.login(token);&#xA;

    &#xA;&#xA;

    Whenever I try to play a song this error happens :

    &#xA;&#xA;

    &#xA;

    (node:5180) UnhandledPromiseRejectionWarning : Error : FFmpeg/avconv not&#xA; found !&#xA; at Function.getInfo (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\prism-media\src\core\FFmpeg.js:130:11)&#xA; at Function.create (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\prism-media\src\core\FFmpeg.js:143:38)&#xA; at new FFmpeg (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\prism-media\src\core\FFmpeg.js:44:27)&#xA; at AudioPlayer.playUnknown (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\discord.js\src\client\voice\player\BasePlayer.js:47:20)&#xA; at VoiceConnection.play (C :\Users\picar\Desktop\DiscordMusicBot\node_modules\discord.js\src\client\voice\util\PlayInterface.js:71:28)&#xA; at play (C :\Users\picar\Desktop\DiscordMusicBot\index.js:29:48)&#xA; at C :\Users\picar\Desktop\DiscordMusicBot\index.js:66:17&#xA; at processTicksAndRejections (internal/process/task_queues.js:97:5)&#xA; (node:5180) UnhandledPromiseRejectionWarning : Unhandled promise rejection. This error originated either by throwing inside of an async&#xA; function without a catch block, or by rejecting a promise which was&#xA; not handled with .catch(). To terminate the node process on unhandled&#xA; promise rejection, use the CLI flag --unhandled-rejections=strict&#xA; (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode).&#xA; (rejection id : 1)&#xA; (node:5180) [DEP0018] DeprecationWarning : Unhandled promise rejections are deprecated. In the future, promise rejections that are&#xA; not handled will terminate the Node.js process with a non-zero exit&#xA; code

    &#xA;

    &#xA;&#xA;

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

    &#xA;

  • Pack ffmpeg executable insde myProject's executable to run

    8 décembre 2023, par zur

    TLDR ;

    &#xA;

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

    &#xA;

    FileNotFoundError: [Errno 2] No such file or directory: &#x27;ffmpeg&#x27;&#xA;Skipping ./testFile202312061352.mp4 due to FileNotFoundError: [Errno 2] No such file or directory: &#x27;ffmpeg&#x27;&#xA;

    &#xA;

    Details :

    &#xA;

    I am creating executable file using following command :

    &#xA;

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

    &#xA;

    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 while conda environment is active I can successfully run it as python (or perhaps anaconda) 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 empty cli.py. That seems to be the entry point and I hope if it is possible I can set the bin directory's path there ...

    &#xA;

    I am able to successfully run the application like following :

    &#xA;

    (my_env) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4&#xA;

    &#xA;

    I would like to run like following :

    &#xA;

    (base) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4&#xA;

    &#xA;

    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.

    &#xA;

    Question :

    &#xA;

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

    &#xA;