Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (38)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (6742)

  • PHP create video thumbnail from remote url

    23 mars 2017, par user2918057

    I’ve my video storage on google cloud, I need to create the thumbnail for my videos it’s gonna be remote, I tried to use FFmpeg to create and getting the content of the thumbs, but it’s not working, it just returns null for me.

    public function create_video_thumb($video){

           $ffmpeg = '/usr/bin/ffmpeg';

           try{

               $cmd = "ffmpeg -i $video -deinterlace -an -ss 00:00:10 -vframes 1 -f image2 'test.jpg' ";

               $return = array(
                   'success'=>true,
                   'content' => $cmd
               );

           }catch (Exception $e){
               $return = $e->getMessage();
           }


           return   $return;
       }

    Return :

    {
         "sucess":true,
         "content":null
    }
  • How can I use ffmpeg with youtube-dl ?

    18 octobre 2018, par Dani

    I have this "setup", but it stopped working (I did not change anything in the code) :

     private Process StartFfmpeg(string URL)
       {
           string args = $"/C youtube-dl --ignore-errors -o - {URL} | ffmpeg -err_detect ignore_err -i pipe:0 -ac 2 -f s16le -ar 48000 pipe:1";
           return Process.Start(new ProcessStartInfo
           {
               FileName = "cmd.exe",
               Arguments = args,
               UseShellExecute = false,
               RedirectStandardOutput = true,
               RedirectStandardError = false,
               CreateNoWindow = true,
           });
       }

    (I get the stream by using
    Stream stream = StartFfmpeg(URL).StandardOutput.BaseStream;)
    It just freezes. It doesn’t throw any error (in a try/catch block) and I have the latest version of ffmpeg & youtube-dl. I’ve tried using older versions with no success.
    How can I get it working again ? (This is my first post, sorry if its very bad)

  • Why is my Youtube Video not downloading completely ? "Input buffer exhausted, packet corrupt"

    15 septembre 2021, par user16909319

    Introduction :

    


    I'm working on a Discord Music Bot for personal use only. Basically, when I play a 2min song with the bot, it plays the song for 1min 30secs, then skips it and plays the next one in the queue. The error is shown below :

    


    


    Error in Pull Function
    
IO error : Error number -10054 occurred
    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000018f86a6f4c0] Packet corrupt (stream = 0, dts = 11154432).
    
Input buffer exhausted before END element found
    
Invalid Data found when processing Input
    
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000018f86a6f4c0] stream 0, offset 0x3e805c : partial file

    


    


    The code block which I think is causing the problem :

    


    Search song method

    


        async def search_song(self, amount, song, get_url=False):
        info = await self.bot.loop.run_in_executor(None, lambda: youtube_dl.YoutubeDL(ytdl_format_options).extract_info(
            f"ytsearch{amount}:{song}", download=False, ie_key="YoutubeSearch"))
        if len(info["entries"]) == 0: return None

        return [entry["webpage_url"] for entry in info["entries"]] if get_url else info


    


    Play_song method

    


        async def play_song(self, ctx, song):
        url = pafy.new(song).getbestaudio().url
        ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(url, executable="C:/ffmpeg/bin/ffmpeg.exe")),
                              after=lambda error: self.bot.loop.create_task(self.check_queue(ctx)))
        ctx.voice_client.source.volume = 0.5


    


    Formatting Options I provided :

    


    ytdl_format_options = {
    'format': 'bestaudio/best',
    'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
    'restrictfilenames': True,
    'noplaylist': True,
    'nocheckcertificate': True,
    'ignoreerrors': True,
    'logtostderr': False,
    'quiet': True,
    'no_warnings': True,
    'default_search': 'auto',
    'source_address': '0.0.0.0'
}


    


    Solutions that I've tried :

    


      

    • Running it on both Replit and locally.
    • 


    • Redownloading FFmpeg
    • 


    • Ensuring FFmpeg, pafy, and youtube_dl are all up to date.
    • 


    


    Things to Note :

    


      

    • Playing a 2mins song, it stops after 1min 30 seconds and displays the error above. (75% of the song)
    • 


    • Playing a 1hr song, it still continues after 10 minutes.
    • 


    


    I do not have much experience in this yet so I'm not entirely sure where in my code is actually causing this issue or other ways which I can use to test and fix the issue.