Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (75)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

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

Sur d’autres sites (4135)

  • How to upload dynamically generated video thumbnails as a BLOB into MySQL database in PHP

    26 novembre 2015, par Parthapratim Neog

    Here is the code that has been used to create a thumbnail of a uploaded video. The thumbnail is automatically generated successfully, but now, I want to store that thumbnail as a BLOB in the Database.
    I know how to upload an image as a BLOB using form posts, but there is no form posts involved in this.

    Could someone guide me through this ?




    <form action="index.php" method="POST" enctype="multipart/form-data">
     <input type="file" />
     <input type="submit" value="Upload" />
    </form>
    &lt;?php
    if(isset($_POST['submit'])){
     /*
     -i input file name
     -an Disabled audio
     -ss Get image from x seconds in the video
     -s  size of the image
     */
     //Get one thumbnail from the video
     $ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg";
     //echo $ffmpeg;
     $videoFile = $_FILES["file"]["tmp_name"];
     $imageFile = "1.jpg";
     $size = "120x90";
     $getFromSecond = 5;

     //echo "<pre>"; print_r($_FILES); die;
     //echo "video location: ",$videoFile,"<br />";
     echo $cmd = "$ffmpeg -i $videoFile -an -ss $getFromSecond -s $size $imageFile";

     echo "<br />";
     if(!shell_exec($cmd)){
      echo "Thumbnail Created!";
     }else{
      echo "Error creating Thumbnail";
     }

     /*// Get multiple thumbnails from one video
     $ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg";
     $videoFile = $_FILES["file"]["tmp_name"];
     $size = "120x90";
     for($num =1; $num&lt;=3; $num++){
      $interval = $num * 3;
      shell_exec("$ffmpeg -i $videoFile -an -ss $interval -s $size $num.jpg");
      echo "Thumbnail Created!- $num.jpg<br />";
     }
     echo "<br />$num thumbnails Created!";
     */
    }
    ?>


    </pre>
  • Revision 38fa487164 : Shortcut 8x8/16x16 inverse 2D-DCT This commit brought back the shortcut impleme

    27 juillet 2013, par Jingning Han

    Changed Paths :
     Modify /vp9/decoder/vp9_idct_blk.c


     Modify /vp9/encoder/vp9_encodemb.c



    Shortcut 8x8/16x16 inverse 2D-DCT

    This commit brought back the shortcut implementation of 8x8/16x16
    inverse 2D-DCT. When the eob <= 10, it skips the inverse transform
    operations on row 4:7/4:15 in the first round. For bus_cif at 1000
    kbps, this provides about 2% speed-up at speed 0.

    Change-Id : I453e2d72956467d75be4ad8c04b4482ab889d572

  • 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/") &amp;&amp; !streamURL.includes(' ')) {
           let results = await youtube.getVideo(streamURL)

           let {
               body
           } = await snekfetch.get(`https://www.googleapis.com/youtube/v3/channels?part=snippet&amp;id=${results.channel.id}&amp;fields=items%2Fsnippet%2Fthumbnails&amp;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&amp;id=${results[0].channel.id}&amp;fields=items%2Fsnippet%2Fthumbnails&amp;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 !