Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (78)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (4565)

  • avcodec/h26[45]_metadata_bsf : Use separate contexts for reading/writing

    6 juillet 2020, par Andreas Rheinhardt
    avcodec/h26[45]_metadata_bsf : Use separate contexts for reading/writing
    

    Currently, both bsfs used the same CodedBitstreamContext for reading and
    writing ; as a consequence, the state of the writer's context at the
    beginning of writing a fragment is exactly the state of the reader after
    having read the fragment ; in particular, the writer might not have
    encountered one of its active parameter sets yet.

    This is not nice and may lead to invalid output even when the input
    is completely spec-compliant : Think of an access unit containing
    a primary coded picture referencing a PPS with id id (that is known from
    an earlier access unit/from extradata), then a new version of the PPS
    with id id and then a redundant coded picture that is also referencing
    the PPS with id id. This is spec-compliant, as the standard allows to
    overwrite a PPS with a different PPS in between coded pictures and not
    only at the beginning of an access unit. In this scenario, the reader
    would read the primary coded picture with the old PPS and the redundant
    coded picture with the new PPS (as it should) ; yet the writer would
    write both with the new PPS as extradata which might lead to errors or
    to invalid data being output without any error (e.g. if the two PPS
    differed in redundant_pic_cnt_present_flag).

    The above scenario does not directly translate to HEVC as long as one
    restricts oneself to input with nuh_layer_id == 0 only (as cbs_h265
    does : it currently strips away any NAL unit with nuh_layer_id > 0 when
    decomposing) ; if one doesn't the same issue as above can happen.

    If one also allowed input packets to contain more than one access unit,
    issues like the above can happen even without redundant coded
    pictures/multiple layers.

    Therefore this commit uses separate contexts for reader and writer.

    Reviewed-by : Mark Thompson <sw@jkqxz.net>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/h264_metadata_bsf.c
    • [DH] libavcodec/h265_metadata_bsf.c
  • What is the difference between different fadein/fadeout curves in ffmpeg ?

    16 août 2018, par siods333333

    Here is the list of possible curves for afade and acrossfade filters from here https://ffmpeg.org/ffmpeg-filters.html#afade-1

    tri
       select triangular, linear slope (default)

    qsin
       select quarter of sine wave

    hsin
       select half of sine wave

    esin
       select exponential sine wave

    log
       select logarithmic

    ipar
       select inverted parabola

    qua
       select quadratic

    cub
       select cubic

    squ
       select square root

    cbr
       select cubic root

    par
       select parabola

    exp
       select exponential

    iqsin
       select inverted quarter of sine wave

    ihsin
       select inverted half of sine wave

    dese
       select double-exponential seat

    desi
       select double-exponential sigmoid

    Here is the code for them, from libavfilter/af_afade.c :

    switch (curve) {
    case QSIN:
       gain = sin(gain * M_PI / 2.0);
       break;
    case IQSIN:
       /* 0.6... = 2 / M_PI */
       gain = 0.6366197723675814 * asin(gain);
       break;
    case ESIN:
       gain = 1.0 - cos(M_PI / 4.0 * (CUBE(2.0*gain - 1) + 1));
       break;
    case HSIN:
       gain = (1.0 - cos(gain * M_PI)) / 2.0;
       break;
    case IHSIN:
       /* 0.3... = 1 / M_PI */
       gain = 0.3183098861837907 * acos(1 - 2 * gain);
       break;
    case EXP:
       /* -11.5... = 5*ln(0.1) */
       gain = exp(-11.512925464970227 * (1 - gain));
       break;
    case LOG:
       gain = av_clipd(1 + 0.2 * log10(gain), 0, 1.0);
       break;
    case PAR:
       gain = 1 - sqrt(1 - gain);
       break;
    case IPAR:
       gain = (1 - (1 - gain) * (1 - gain));
       break;
    case QUA:
       gain *= gain;
       break;
    case CUB:
       gain = CUBE(gain);
       break;
    case SQU:
       gain = sqrt(gain);
       break;
    case CBR:
       gain = cbrt(gain);
       break;
    case DESE:
       gain = gain &lt;= 0.5 ? cbrt(2 * gain) / 2: 1 - cbrt(2 * (1 - gain)) / 2;
       break;
    case DESI:
       gain = gain &lt;= 0.5 ? CUBE(2 * gain) / 2: 1 - CUBE(2 * (1 - gain)) / 2;
       break;
    }

    How do they look like ? How do they sound like ? Which one is recommended for fadein+fadeout and crossfade ? Personally I’m just trying to avoid audio clicks, maybe crossfade is a bit of an overkill here.

    Related link : http://manual.audacityteam.org/man/fade_and_crossfade.html . Not sure how audacity names translate into ffmpeg names though.

  • 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;