Recherche avancée

Médias (91)

Autres articles (13)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

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

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

Sur d’autres sites (2960)

  • Place two videos side by side using ffmpeg ?and download it as one file

    5 août 2019, par marceloo1223

    I have two video files, which I want to play side by side and download them later. I used FFMPEG to merge them as one :

    protected void combinetwovideo()
    {
       string strParam;
       string Path_FFMPEG = Path.Combine(HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["FFMpegPath"]));
       string apppath=HttpRuntime.AppDomainAppPath;
       //Merging two videos              
       String video1=apppath+"\\recordings\\client2019-08-03 02_23_59";
       String video2 =apppath+"\\userrecord\\User2019-08-03 02_24_00";
       String strResult =apppath+"\\RESULT\\";
       strParam = string.Format("-i ('" + video1 + "') -i ('" + video2 + "') -filter_complex \'[0:v]pad=iw*2:ih[int];[int][1:v]overlay=W/2:0[vid]' /-map [vid] -c:v libx264 -crf 23 -preset veryfast output.mp4");
       process(Path_FFMPEG, strParam);
    }
    public void process(string Path_FFMPEG, string strParam)
    {
       try
       {
           Process ffmpeg = new Process();
           ProcessStartInfo ffmpeg_StartInfo = new ProcessStartInfo(Path_FFMPEG, strParam);
           ffmpeg_StartInfo.UseShellExecute = false;
           ffmpeg_StartInfo.RedirectStandardError = true;
           ffmpeg_StartInfo.RedirectStandardOutput = true;
           ffmpeg.StartInfo = ffmpeg_StartInfo;
           ffmpeg_StartInfo.CreateNoWindow = true;
           ffmpeg.EnableRaisingEvents = true;
           ffmpeg.Start();
           ffmpeg.WaitForExit();
           ffmpeg.Close();
           ffmpeg.Dispose();
           ffmpeg = null;
       }
       catch (Exception ex)
       {
       }
    }

    But this method outputs nothing and does not throw any errors. I’m confused about the strParam query. Did I write it wrong or am I missing something. Any help would be apreciated.

  • Low memory killer because of ffmpeg in Android

    22 avril 2021, par engineer ece

    I'm running an application in Android embedded card. The application is implemented in C. It runs an ffmpeg process using system() API which streams transport stream data over IP. When I started the application, approximately 2 hours later, low memory killer daemon is killing the background processes slowly. After some time it's killing the application also. And the GUI screen is hanged completely.
    
ffmpeg command :
    
ffmpeg -loglevel quiet -re -i "udp://192.168.47.1:8080?buffer_size=10000000&fifo_size=100000000&overrun_nonfatal=1" -map 0:p:1 -f mpegts udp://192.168.47.172:9090?pkt_size=1316

    


    low memory killer log :

    


    [ 7975.838158@2] lowmemorykiller: Killing 'droid.deskclock' (4779), adj 906,
[ 7975.838158@2]    to free 18940kB on behalf of 'kswapd0' (1978) because
[ 7975.838158@2]    cache 109744kB is below limit 114688kB for oom_score_adj 529
[ 7975.838158@2]    Free memory is 9276kB above reserved. nonmove free (32936kB),(63700kB)
[ 7976.045769@2] lowmemorykiller: Killing 'd.process.media' (4902), adj 906,
[ 7976.045769@2]    to free 23028kB on behalf of 'kswapd0' (1978) because
[ 7976.045769@2]    cache 112320kB is below limit 114688kB for oom_score_adj 529
[ 7976.045769@2]    Free memory is 5440kB above reserved. nonmove free (31148kB),(66164kB)


    


    Query :

    


      

    • Does ffmpeg consume more CPU & memory over the course of time, which in turn causing low memory killer ?
    • 


    


  • Discord music bot won't join Voice channel

    16 mars 2024, par Skely

    I followed a tutorial for creating a music bot in discord, but it will not join my vc no matter what. Every command works and it gives the correct responses and songs is in the queue. The bot have every permission know to man, but it still won't join. Any way to fix this issue ?
Thanks in advance !!

    


    This is my code and files

    


    main.py

    


    import discord
from discord.ext import commands
import os
import asyncio

from help_cog import help_cog
from music_cog import music_cog

bot = commands.Bot(
    command_prefix="?", 
    intents=discord.Intents.all(),
    help_command=None
)

async def main():
    async with bot:
        await bot.add_cog(help_cog(bot))
        await bot.add_cog(music_cog(bot))
        await bot.start(os.getenv("TOKEN"))

asyncio.run(main())


    


    music_cog.py

    


    import discord
from discord.ext import commands

from yt_dlp import YoutubeDL

import yt_dlp as youtube_dl

class music_cog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

        self.is_playing = False
        self.is_paused = False

        self.music_queue = []
        self.YDL_OPTIONS = {"format": "bestaudio", "postprocessors": [{"key": "FFmpegExtractAudio", "preferredcodec": "mp3", "preferredquality": "192",}]}
        self.FFMPEG_OPTIONS = {"before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5", "options": "-vn"}

        self.vc = None
        print("Success")

    def search_yt(self, item):
        with YoutubeDL(self.YDL_OPTIONS) as ydl:
            try:
                info = ydl.extract_info(f"ytsearch:{item}", download=False)["entries"][0]
            except Exception:
                return False
        return {"source": info["url"], "title": info["title"]}

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

            m_url = self.music_queue[0][0]["source"]

            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

    async def play_music(self, ctx):
        if len(self.music_queue) > 0:
            self.is_playing = True
            m_url = self.music_queue[0][0]["source"]

            if self.vc == None or not self.vc.is_connected():
                self.vc = await self.music_queue[0][1].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.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="Play the selected song from YouTube")
    async def play(self, ctx, *args):
        query = " ".join(args)

        voice_channel = ctx.author.voice.channel
        if voice_channel is None:
            await ctx.send("Connect to a voice channel!")
        elif self.is_paused:
            self.vc.resume()
        else:
            song = self.search_yt(query)
            if type(song) == type(True):
                await ctx.send("Could not download the song. Incorrect format, try a different keyword")
            else:
                await ctx.send("Song added to 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()
        elif self.is_paused:
            self.is_playing = True
            self.is_paused = False
            self.vc.resume()

    @commands.command(name="resume", aliases=["r"], help="Resumes playing the current song")
    async def resume(self, ctx, *args):
        if self.is_paused:
            self.is_playing = True
            self.is_paused = False
            self.vc.resume()
        
    @commands.command(name="skip", aliases=["s"], help="Skips the currently played song")
    async def skip(self, ctx, *args):
        if self.vc != None and self.vc:
            self.vc.stop()
            await self.play_music(ctx)

    @commands.command(name="queue", aliases=["q"], help="Displays all the songs currently in queue")
    async def queue(self, ctx):
        retval = ""

        for i in range(0, len(self.music_queue)):
            if i > 4: break
            retval += self.music_queue[i][0]["title"] + "\n"

        if retval != "":
            await ctx.send(retval)
        else:
            await ctx.send("No music in the current queue")
    
    @commands.command(name="clear", aliases=["c", "bin"], help="Stops the current song and clears the queue")
    async def clear(self, ctx, *args):
        if self.vc != None and self.is_playing:
            self.vc.stop()
        self.music_queue = []
        await ctx.send("Music queue cleared")

    @commands.command(name="leave", aliases=["disconnect", "l", "d"], help="Kick the bot from the voice channel")
    async def leave(self, ctx):
        self.is_playing = False
        self.is_paused = False
        await self.vc.disconnect()


    


    help_cog.py

    


    import discord
from discord.ext import commands

class help_cog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

        self.help_message = """
        Help message
"""

        self.text_channel_text = []
    
    @commands.Cog.listener()
    async def on_ready(self):
        for guild in self.bot.guilds:
            for channel in guild.text_channels:
                self.text_channel_text.append(channel)

        await self.send_to_all(self.help_message)

    async def send_to_all(self, msg):
        for text_channel in self.text_channel_text:
            await text_channel.send(msg)
        
    @commands.command(name="help", help="Displays all the available commands")
    async def help(self, ctx):
        await ctx.send(self.help_message)