Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (70)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Diogene : création de masques spécifiques de formulaires d’édition de contenus

    26 octobre 2010, par

    Diogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
    A quoi sert ce plugin
    Création de masques de formulaires
    Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
    Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (8860)

  • Keep converting video when quitting ssh session [on hold]

    13 août 2015, par JimZer

    I have a dedicated server with Debian Jessie, I connect to it with ssh.
    I launched a list of video conversion with ffmpeg using my terminal with ssh. More precisely it convert a list of videos contained in a folder using this command :

    for file in *.avi; do ffmpeg -i "$file" "${file%.avi}".webm; done

    However I would like the list of tasks to continue even if I close my ssh session.
    Is that possible ?

    Thank you in advance for helping me.

  • How can I make my loop command for a pythin discord bot work ?

    17 octobre 2022, par Dio

    so I am kinda new to python and wanted to make a discord music bot. It works pretty well, except that I am not able to figure out how to code the queue loop command and the playing now command(this one gives me a full link instead of just the name). I have bolded the 2 commands that I cannot figure out.

    


       from ast import alias
import discord
from discord.ext import commands

from youtube_dl import YoutubeDL

class music_cog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
    
        #all the music related stuff
        self.is_playing = False
        self.is_paused = False
        self.is_loop = False
        self.now_playing =""
        # 2d array containing [song, channel]
        self.music_queue = []
        self.YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist':'True'}
        self.FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}

        self.vc = None

     #searching the item on youtube
    def search_yt(self, item):
        with YoutubeDL(self.YDL_OPTIONS) as ydl:
            try: 
                info = ydl.extract_info("ytsearch:%s" % item, download=False)['entries'][0]
            except Exception: 
                return False

        return {'source': info['formats'][0]['url'], 'title': info['title']}

    def play_next(self):
        if len(self.music_queue) > 0:
            self.is_playing = True

            #get the first url
            m_url = self.music_queue[0][0]['source']
            self.now_playing =  self.music_queue[0][0]['title']
            #remove the first element as you are currently playing it
            self.music_queue.pop(0)

            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
        else:
            self.is_playing = False

    # infinite loop checking 
    async def play_music(self, ctx):
        if len(self.music_queue) > 0:
            self.is_playing = True
            m_url = self.music_queue[0][0]['source']
            
            #try to connect to voice channel if you are not already connected
            if self.vc == None or not self.vc.is_connected():
                self.vc = await self.music_queue[0][1].connect()

                #in case we fail to connect
                if self.vc == None:
                    await ctx.send("Could not connect to the voice channel")
                    return
            else:
                await self.vc.move_to(self.music_queue[0][1])
            self.now_playing = m_url
            #remove the first element as you are currently playing it
            self.music_queue.pop(0)

            self.vc.play(discord.FFmpegPCMAudio(m_url, **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
        else:
            self.is_playing = False

    @commands.command(name="play", aliases=["p","playing"], help="Plays a selected song from youtube")
    async def play(self, ctx, *args):
        query = " ".join(args)
        
        voice_channel = ctx.author.voice.channel
        if voice_channel is None:
            #you need to be connected so that the bot knows where to go
            await ctx.send("Connect to a voice channel!")
        elif self.is_paused:
            self.vc.resume()
        else:
            global song
            song = self.search_yt(query)
            if type(song) == type(True):
                await ctx.send("Could not download the song. Incorrect format try another keyword. This could be due to playlist or a livestream format.")
            else:
                await ctx.send("Song added to the queue")
                self.music_queue.append([song, voice_channel])
                
                if self.is_playing == False:
                    await self.play_music(ctx)

    @commands.command(name="pause", help="Pauses the current song being played")
    async def pause(self, ctx, *args):
        if self.is_playing:
            self.is_playing = False
            self.is_paused = True
            self.vc.pause()
            await ctx.send("Music paused")
        elif self.is_paused:
            self.is_paused = False
            self.is_playing = True
            self.vc.resume()
            await ctx.send("Music resumed")

    @commands.command(name = "resume", aliases=["r"], help="Resumes playing with the discord bot")
    async def resume(self, ctx, *args):
        if self.is_paused:
            self.is_paused = False
            self.is_playing = True
            self.vc.resume()
            await ctx.send("Music resumed")
        else:
            await ctx.send("Music is not paused")

    @commands.command(name="skip", aliases=["s"], help="Skips the current song being played")
    async def skip(self, ctx):
        if self.vc != None and self.vc:
            self.vc.stop()
            #try to play next in the queue if it exists
            await self.play_music(ctx)
            await ctx.send("Skipped current song")

    @commands.command(name="queue", aliases=["q"], help="Displays the current songs in queue")
    async def queue(self, ctx):
        global retval 
        retval = "```"
        for i in range(0, len(self.music_queue)):
            # display a max of 5 songs in the current queue
            #if (i > 4): break
            l = str(i+1)
            retval += l +". " + self.music_queue[i][0]['title'] + "\n"

        if retval != "```":
            retval+="```"
            await ctx.send(retval)
        else:
            await ctx.send("No music in queue")

    **@commands.command(name="loop", help="Loops the queue")**
    async def loop(self, ctx):
        if self.is_loop == False:
            self.is_loop = True
        else:
            self.is_loop = False 
        if self.is_loop == True:
            if len(self.music_queue)==0:
                await ctx.send("No music to loop")
            else:
                i=0
                while self.is_loop == True and i code>

    


  • Can't link FFmpeg in Visual Studio 2013

    22 février 2016, par Sir DrinksCoffeeALot

    I’m struggling with this for past 3-4 days with barely any progress. I’ve downloaded "dev" and "shared" archives and extracted them. "Dev" archive has .lib and .h files and "Shared" has .dll files needed for running app. These are the steps that i’ve done linking-wise :

    Project -> Properties -> Configuration Properties -> VC++ Directories -> Include Directories -> ...\ dev\ include

    Project -> Properties -> Configuration Properties -> VC++ Directories -> Library Directories -> ...\ dev\ lib

    Project -> Properties -> Configuration Properties -> C/C++ -> General -> Additional Include Directories -> ...\ dev\ include

    Project -> Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories -> ...\ dev\ lib

    Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies -> avcodec.lib ... swscale.lib

    And when i try to build it i get following error :

    Error 1 error LNK2019: unresolved external symbol _avcodec_register_all referenced in function _main...

    I have no idea why,somehow .lib are not getting linked or something or i’ve done something wrong. It’s getting really frustrating and ffmpeg is crucial in project that i’m working on, basicly i can’t do anything without it. So please if someone could point me in right direction i would aprreciate it very much.

    This is the example that im trying to build.

    #include
    extern "C"
    {

    #include "libavcodec\avcodec.h"
    }


    #pragma comment(lib, "avcodec.lib")

    int main()
    {
       printf("Trying avcodec_register_all... ");
       avcodec_register_all();
       printf("Done.\n");
       return 0;
    }

    Thank you in advance.