Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (91)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • 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 (3648)

  • ffmpeg datascope filter : How does it works ?

    25 octobre 2022, par tony

    I'm trying to see how the datascope filter is displaying the color values for a black and white image. I was expecting to see a part of the image with 0xfff and one with 0x000 value,
instead I obtained only the 0xfff for white

    


    ffmpeg \
-f lavfi -i color=white:100x100 \
-f lavfi -i color=black:100x100 \
-lavfi '[0:v][1:v]hstack[out]' \
-map [out] \
-frames 1 \
blackAndWhite.png ; \


ffmpeg \
-i blackAndWhite.png \
-vf 'datascope' \
data.png


    


    what am I seeing ?
enter image description here

    


  • Pyinstaller exe works halfway on another computer

    5 novembre 2022, par At Bay

    I wrote a code which uses FFMPEG and os, subprocess, datetime, speechrecognition, and xlsxwriter libraries. Below a brief sketch of the code - it goes through a directory of wav files and creates a transcription for X seconds in length and saves it into an excel sheet.
import os
import subprocess
import datetime
import speech_recognition as sr
import xlsxwriter

    


    def ffmpeg():
   #create clip
   subprocess.run(["ffmpeg", "-ss", starti, "-t", lengthi, "-i", filepathO, filepathNEW1])

   #convert to mono
   subprocess.run(["ffmpeg", "-i", filepathNEW1, "-ac", "1", filepathNEW2])
   
   #compres to 44.1 kHZ
   subprocess.run(["ffmpeg", "-i", filepathNEW2, "-ar", "44100", filepathNEW3])

def transcription():
    with sr.AudioFile(os.path.abspath(clippath)) as source:
       audio = r.record(source)  # read the entire audio file
       transcriptstring = str(r.recognize_google(audio, language = 'en', show_all=True))
       worksheet.write(tcol, transcriptstring)


#call functions in this order
for filename in os.listdir(ufolder):
   if (filename.endswith(".wav")):
       ffmpeg() #cuts clips, compresses to mono and 44.1 khz
       transcription() 

workbook.close()



    


    When I try to run the exe created by pyinstaller, I get the following error :

    


    Enter directory of wav files: C:\Users\myname\Downloads\&#xA;Enter clip start (seconds): 0&#xA;Enter desired clip length (seconds): 5&#xA;Traceback (most recent call last):&#xA;  File "cliptranscript.py", line 134, in <module>&#xA;  File "cliptranscript.py", line 47, in ffmpeg&#xA;  File "subprocess.py", line 503, in run&#xA;  File "subprocess.py", line 971, in __init__&#xA;  File "subprocess.py", line 1440, in _execute_child&#xA;FileNotFoundError: [WinError 2] The system cannot find the file specified&#xA;[13304] Failed to execute script &#x27;cliptranscript&#x27; due to unhandled exception!&#xA;</module>

    &#xA;

    Below is a partial view of the folder created by pyinstaller :&#xA;1

    &#xA;

  • My discord music bot works locally, but not on a server [closed]

    8 décembre 2022, par Asmondya

    I have an issue with my discord music bot that I made with discord.js v14.

    &#xA;

    When I run it locally, it works fine and plays music as it should. But when I put in on a server (here I use Vultr), it doesn't work.

    &#xA;

    I am not sure but it might come from FFmpeg. I am kinda desperate and cant really figure where the issue is from. I think it is FFmpeg because it is what converts the music.

    &#xA;

    What happens :

    &#xA;

    Me: !play a music&#xA;Bot: Now playing a music&#xA;*and right after, without playing the music*&#xA;Bot: Music finished&#xA;

    &#xA;

    What should normally happen is that same thing but the "music finished" should be sent when the queue is finished.

    &#xA;

    The thing is that the bot works perfectly locally, but does this when it is hosted on a server. Also I don't have any error messages or else. It just doesn't play the music like if the music was 0 seconds length.

    &#xA;

    I tried making sure everything is installed on the server, same as making sure ffmpeg was installed globally and I have the good version of it. Here is the answer I have to the "ffmpeg -version" command :enter image description here.

    &#xA;

    Does anyone know what could be the issue or what could cause it ? I can show some code if needed, even tho it works perfectly fine locally.

    &#xA;

    Here's my code :

    &#xA;

    const { DisTube } = require(&#x27;distube&#x27;)&#xA;const Discord = require(&#x27;discord.js&#x27;)&#xA;const { EmbedBuilder } = require(&#x27;discord.js&#x27;)&#xA;const client = new Discord.Client({&#xA;  intents: [&#xA;    Discord.GatewayIntentBits.Guilds,&#xA;    Discord.GatewayIntentBits.GuildMessages,&#xA;    Discord.GatewayIntentBits.GuildVoiceStates,&#xA;    Discord.GatewayIntentBits.MessageContent,&#xA;  ]&#xA;})&#xA;const { ActivityType } = require(&#x27;discord.js&#x27;)&#xA;const fs = require(&#x27;fs&#x27;)&#xA;const dotenv = require("dotenv")&#xA;dotenv.config()&#xA;const { SpotifyPlugin } = require(&#x27;@distube/spotify&#x27;)&#xA;const { SoundCloudPlugin } = require(&#x27;@distube/soundcloud&#x27;)&#xA;const { YtDlpPlugin } = require(&#x27;@distube/yt-dlp&#x27;)&#xA;&#xA;client.distube = new DisTube(client, {&#xA;  leaveOnStop: false,&#xA;  emitNewSongOnly: true,&#xA;  emitAddSongWhenCreatingQueue: false,&#xA;  emitAddListWhenCreatingQueue: false,&#xA;  plugins: [&#xA;    new SpotifyPlugin({&#xA;      emitEventsAfterFetching: true&#xA;    }),&#xA;    new SoundCloudPlugin(),&#xA;    new YtDlpPlugin()&#xA;  ]&#xA;})&#xA;client.commands = new Discord.Collection()&#xA;client.aliases = new Discord.Collection()&#xA;&#xA;fs.readdir(&#x27;./commands/&#x27;, (err, files) => {&#xA;  if (err) return console.log(&#x27;Could not find any commands!&#x27;)&#xA;  const jsFiles = files.filter(f => f.split(&#x27;.&#x27;).pop() === &#x27;js&#x27;)&#xA;  if (jsFiles.length &lt;= 0) return console.log(&#x27;Could not find any commands!&#x27;)&#xA;  jsFiles.forEach(file => {&#xA;    const cmd = require(`./commands/${file}`)&#xA;    console.log(`Loaded ${file}`)&#xA;    client.commands.set(cmd.name, cmd)&#xA;    if (cmd.aliases) cmd.aliases.forEach(alias => client.aliases.set(alias, cmd.name))&#xA;  })&#xA;})&#xA;&#xA;client.on(&#x27;ready&#x27;, () => {&#xA;  console.log(`${client.user.tag} is ready to play music.`)&#xA;})&#xA;&#xA;client.on(&#x27;messageCreate&#x27;, async message => {&#xA;  if (message.author.bot || !message.guild) return&#xA;  const prefix = "!"&#xA;  if (!message.content.startsWith(prefix)) return&#xA;  const args = message.content.slice(prefix.length).trim().split(/ &#x2B;/g)&#xA;  const command = args.shift().toLowerCase()&#xA;  const cmd = client.commands.get(command) || client.commands.get(client.aliases.get(command))&#xA;  if (!cmd) return&#xA;  if (cmd.inVoiceChannel &amp;&amp; !message.member.voice.channel) {&#xA;    return message.channel.send(`You must be in a voice channel!`)&#xA;  }&#xA;  try {&#xA;    cmd.run(client, message, args)&#xA;  } catch (e) {&#xA;    console.error(e)&#xA;    message.channel.send(`Error: \`${e}\``)&#xA;  }&#xA;})&#xA;&#xA;// Add filters to the queue status :&#xA;// | Filter: \`${queue.filters.names.join(&#x27;, &#x27;) || &#x27;Off&#x27;}\` &#xA;&#xA;const status = queue =>&#xA;  `Volume: \`${queue.volume}%\` | Loop: \`${&#xA;    queue.repeatMode ? (queue.repeatMode === 2 ? &#x27;All Queue&#x27; : &#x27;This Song&#x27;) : &#x27;Off&#x27;&#xA;  }\` | Autoplay: \`${queue.autoplay ? &#x27;On&#x27; : &#x27;Off&#x27;}\``&#xA;client.distube&#xA;  .on(&#x27;playSong&#x27;, (queue, song) =>&#xA;    queue.textChannel.send({&#xA;      embeds: [&#xA;        new Discord.EmbedBuilder()&#xA;          .setTitle(&#x27;Now playing&#x27;)&#xA;          .setDescription(`\`${song.name}\` - \`${song.formattedDuration}\`\n${status(queue)}\n\nRequested by: \`${song.user.tag}\``)&#xA;          .setThumbnail(`${song.thumbnail}`)&#xA;      ]&#xA;    })&#xA;  )&#xA;  .on(&#x27;addSong&#x27;, (queue, song) =>&#xA;    queue.textChannel.send({&#xA;      embeds: [&#xA;        new Discord.EmbedBuilder()&#xA;          .setTitle(&#x27;Song added to the queue&#x27;)&#xA;          .setDescription(`${song.name} - \`${song.formattedDuration}\`\n\nRequested by: \`${song.user.tag}\``)&#xA;          .setThumbnail(`${song.thumbnail}`)&#xA;      ]&#xA;    })&#xA;  )&#xA;  .on(&#x27;addList&#x27;, (queue, playlist) =>&#xA;    queue.textChannel.send({&#xA;      embeds: [&#xA;        new Discord.EmbedBuilder()&#xA;          .setTitle(`Playlist added to the queue`)&#xA;          .setDescription(`\`${playlist.name}\` (${&#xA;            playlist.songs.length&#xA;          } songs)\n${status(queue)}\n\nRequested by: \`${song.user.tag}\``)&#xA;          .setThumbnail(`${song.thumbnail}`)&#xA;      ]&#xA;    })&#xA;  )&#xA;  .on(&#x27;error&#x27;, (channel, e) => {&#xA;    if (channel) channel.send(`An error encountered: ${e.toString().slice(0, 1974)}`)&#xA;    else console.error(e)&#xA;  })&#xA;  .on(&#x27;empty&#x27;, channel => channel.send(&#x27;There is no one here. Im alone, again...&#x27;))&#xA;  .on(&#x27;searchNoResult&#x27;, (message, query) =>&#xA;    message.channel.send(`No result found for \`${query}\`!`)&#xA;  )&#xA;  .on(&#x27;finish&#x27;, queue => queue.textChannel.send("https://tenor.com/view/end-thats-all-folks-gif-10601784"))&#xA;&#xA;client.on("ready", () => {&#xA;  client.user.setPresence({&#xA;      activities: [{&#xA;        name: &#x27;AURORA&#x27;,&#xA;        type: ActivityType.Listening&#xA;      }],&#xA;      status: "idle"&#xA;  })&#xA;})&#xA;&#xA;client.login(process.env.TOKEN)&#xA;

    &#xA;

    It does come from my ffpmeg, I need to install one of these packages instead of the npm installation : https://github.com/BtbN/FFmpeg-Builds/releases

    &#xA;

    How do I install it on a server (Vultr) ?

    &#xA;