Recherche avancée

Médias (91)

Autres articles (81)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Monitoring de fermes de MediaSPIP (et de SPIP tant qu’à faire)

    31 mai 2013, par

    Lorsque l’on gère plusieurs (voir plusieurs dizaines) de MediaSPIP sur la même installation, il peut être très pratique d’obtenir d’un coup d’oeil certaines informations.
    Cet article a pour but de documenter les scripts de monitoring Munin développés avec l’aide d’Infini.
    Ces scripts sont installés automatiquement par le script d’installation automatique si une installation de munin est détectée.
    Description des scripts
    Trois scripts Munin ont été développés :
    1. mediaspip_medias
    Un script de (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (13615)

  • DiscordJS Music Bot Connects and Then Immediately Disconnects From Voice Channel

    23 janvier 2020, par კΙбthebraɨɴs

    I see that questions similar to this one have been asked, and after following their solutions I still end up the same as I started. Below I have listed my code, a link to test it with a sample bot I created, and the modules you will need to test it using a self-hosted instance.

    My problem is that upon connecting to the specified voice channel, the bot immediately leaves afterwards without any signs of errors or exceptions. I’m not sure if it is a problem with my code, or with one of the libraries I am using. The only console output I receive is as follows :

    Bot Ready For Use
    joined channel
    left channel

    Thanks !

    My Code

    var voiceChannel = message.member.voiceChannel;

    if (!message.member.voiceChannel) return message.channel.send(`You do realize you have to be in a voice channel to do that, right ${message.author.username}?`)

    if (!message.member.voiceConnection) voiceChannel.join().then(async connection => {

       let streamURL = args.slice(1).join(" ")
       let streamTitle = "";
       let streamThumb = "";
       let streamAuth = "";
       let streamAuthThumb = "";

       if (streamURL.includes("https://www.youtube.com") || streamURL.includes("https://youtu.be/") && !streamURL.includes(' ')) {
           let results = await youtube.getVideo(streamURL)

           let {
               body
           } = await snekfetch.get(`https://www.googleapis.com/youtube/v3/channels?part=snippet&id=${results.channel.id}&fields=items%2Fsnippet%2Fthumbnails&key=${ytapikey}`).query({
               limit: 800
           })

           streamTitle = results.title
           streamThumb = results.thumbnails.medium.url
           streamAuth = results.channel.title
           streamAuthThumb = body.items[0].snippet.thumbnails.medium.url

       } else if (!streamURL.includes("https://www.youtube.com") || !streamURL.includes("https://youtu.be/")) {

           let results = await youtube.searchVideos(streamURL)

           let {
               body
           } = await snekfetch.get(`https://www.googleapis.com/youtube/v3/channels?part=snippet&id=${results[0].channel.id}&fields=items%2Fsnippet%2Fthumbnails&key=${ytapikey}`).query({
               limit: 800
           })

           streamURL = results[0].url
           streamTitle = results[0].title
           streamThumb = results[0].thumbnails.medium.url
           streamAuth = results[0].channel.title
           streamAuthThumb = body.items[0].snippet.thumbnails.medium.url

       } else {
           return message.reply("I can only play videos from YouTube (#NotSponsored).")
       }

       console.log("joined channel");
       const stream = ytdl('https://www.youtube.com/watch?v=gOMhN-hfMtY', {
           filter: 'audioonly'
       });
       const dispatcher = connection.playStream(stream, {
           seek: 0,
           volume: 1
       });
       dispatcher.on("end", end => {
           console.log("left channel");
           voiceChannel.leave();
       });

       let musicEmbed = new Discord.RichEmbed()
           .setAuthor(streamAuth, streamAuthThumb)
           .setTitle(`Now Playing:`)
           .addField(`${streamAuth}`, `${streamTitle}`)
           .setImage(streamThumb)
           .setColor(embedRed)
           .setFooter(`${streamAuth} - ${streamTitle} (${streamURL}`)

       message.channel.send(musicEmbed)

    }).catch(console.error);
    break

    List of Modules

    discord.js
    simple-youtube-api
    node-opus
    ffmpeg
    ffbinaries
    ffmpeg-binaries
    opusscript
    snekfetch
    node-fetch
    ytdl-core

    Click here to use my sample bot through repl.it.

    Thanks Again !

  • Could not find tag for codec h264 in stream #2 when trim video and add watermark, music background

    13 août 2020, par Nguyễn Trọng

    I'm doing cut video into chunks, then join them and add watermark and background music with the command below.

    


    "[-y, -i, /storage/emulated/0/WhatsApp/Media/WhatsApp Video/VID-20200726-WA0154.mp4, -i, /storage/emulated/0/FXMotion/.cache/.watermark/logo_watermark.png, -stream_loop, -1, -i, /storage/emulated/0/WhatsApp/Media/WhatsApp Documents/DripReport_-_Skechers_(Lyrics)(MP3_160K).mp3, -filter_complex, [1:v]scale=640/4:-1[logo1];[0:v]trim=0:2.483,setpts=PTS-STARTPTS[v1];[0:v]trim=2.483:7.45,setpts=2.0*(PTS-STARTPTS)[v2];[0:v]trim=7.45:9.933,setpts=PTS-STARTPTS[v3];[v1][v2][v3]concat=n=3:v=1[video];[video][logo1]overlay=main_w-overlay_w-10:main_h-overlay_h-10[vw], -map, [vw], -map, 2, -c:v, libx264, -crf, 23, -preset, veryfast, -shortest, /storage/emulated/0/FXMotion/FXMotion-200810e.mp4, -hide_banner]"


    


    But when running I get the following error :

    


    
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/WhatsApp/Media/WhatsApp Video/VID-20200726-WA0154.mp4':\n  
Metadata:
major_brand     : mp4v
    minor_version   : 0
    compatible_brands: mp4vmp42isom\n  Duration: 00:00:09.93, start: 0.000000, bitrate: 2080 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown), 640x352, 2078 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default)
    Metadata:\n      rotate          : 270
    Side data:
      displaymatrix: rotation of 90.00 degrees\nInput #1, png_pipe, from '/storage/emulated/0/FXMotion/.cache/.watermark/logo_watermark.png':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Video: png, rgba(pc), 335x51, 25 tbr, 25 tbn, 25 tbc
Input #2, mp3, from '/storage/emulated/0/WhatsApp/Media/WhatsApp Documents/DripReport_-_Skechers_(Lyrics)(MP3_160K).mp3':
  Metadata:
    encoder         : Lavf57.56.101
    title           : DripReport - Skechers (Lyrics)
    artist          : DripReport
    album           : DripReport\n  Duration: 00:01:46.06, start: 0.011021, bitrate: 167 kb/s
    Stream #2:0: Audio: mp3, 48000 Hz, stereo, fltp, 160 kb/s
    Metadata:
      encoder         : Lavc57.64
    Stream #2:1: Video: png, rgb24(pc), 400x225, 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      title           : attached picture
      comment         : Cover (front)
Stream mapping:
  Stream #0:0 (h264) -> trim (graph 0)
  Stream #0:0 (h264) -> trim (graph 0)
  Stream #0:0 (h264) -> trim (graph 0)
  Stream #1:0 (png) -> scale (graph 0)
  overlay (graph 0) -> Stream #0:0 (libx264)
  Stream #2:0 -> #0:1 (mp3 (mp3float) -> aac (native))
  Stream #2:1 -> #0:2 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help\n[graph 0 input from stream 1:0 @ 0x6f73832bc0] sws_param option is deprecated and ignored
[graph 0 input from stream 0:0 @ 0x6f73832c80] sws_param option is deprecated and ignored\n[graph 0 input from stream 0:0 @ 0x6f73833400] sws_param option is deprecated and ignored\n[graph 0 input from stream 0:0 @ 0x6f73833580] sws_param option is deprecated and ignored
[libx264 @ 0x6f44476300] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x6f44476300] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x6f44476300] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[graph 2 input from stream 2:1 @ 0x6ed501c380] sws_param option is deprecated and ignored
[mp4 @ 0x6ed53b9a00] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2\n[libx264 @ 0x6f445de500] MB rate (33750000) > level limit (16711680)
[libx264 @ 0x6f445de500] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x6f445de500] profile High 4:4:4 Predictive, level 6.2, 4:4:4, 8-bit\n[libx264 @ 0x6f445de500] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=7 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x6ed53b9a00] Could not find tag for codec h264 in stream #2, codec not currently supported in container\nCould not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --[aac @ 0x6f44478600] Qavg: nan\nConversion failed!",
 
 


    


    i run ffmpeg on :

    


    Device
"os_version" : "10"
"model" : "SM-A217F"
"brand" : "samsung"

    


    


    How to fix it ? thank advance !

    


  • Problem settingup a play command for my discord bot (music) ['Error : FFmpeg/avconv not found !']

    28 août 2023, par TitanFrex

    Im new to programing a discord bot, im more to the web developing enviroment, im trying to create by myself a play command song (only with one link) to try if the first join is working and actually play the song.

    


    (Discord.js v14)

    


    Unfortunately i was having a problem with FFMPEG.
This my actual module for the play.js command, where all the problem is happening.

    


    const { joinVoiceChannel, createAudioPlayer, createAudioResource } = require('@discordjs/voice');
const ytdl = require('ytdl-core');

module.exports = {
    devOnly: true,
    name: 'play',
    description: 'Start to play a song!',
    // options: Object[],

    /**
     *
     * @param {Client} client
     * @param {Interaction} interaction
     */
    callback: async (client, interaction) => {
        const voiceChannel = interaction.member.voice.channel;

        if (!voiceChannel) {
            return interaction.reply('You must be in a voice channel to use this command.');
        }

        const connection = joinVoiceChannel({
            channelId: voiceChannel.id,
            guildId: interaction.guild.id,
            adapterCreator: interaction.guild.voiceAdapterCreator,
        });

        const stream = ytdl('URL_HERE', { filter: 'audioonly' });
        const resource = createAudioResource(stream);

        const player = createAudioPlayer();
        connection.subscribe(player);
        player.play(resource);

        interaction.reply({
            content: `Playing Song`,
            // ephemeral: true,
        });
    }
}


    


    The first error i was receving was 'Error : FFmpeg/avconv not found !', i tried to install it with some guides online. after couple of tries i get it right and the command 'ffmpeg -version' returns.

    


    After that i tought it was workikng, but when i started my project, i receved the same error,. I tried to look up for a solution and i tried to get the process.env.PATH to see but i dont understand if its right or not.

    


    After i removed the console.log(process.env.PATH), i get no errors in the terminal, but it will stil not play the song.