Recherche avancée

Médias (91)

Autres articles (88)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (8907)

  • How to debug "Error in pull function & Input buffer exhausted" ?

    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.

    


  • Problem in access "libavcodec/avcodec.h" in CPP [duplicate]

    14 septembre 2021, par Sujay

    Note : Not full working code but part of the code.
Problem is when trying to compile it shows the below output.
FFMPEG have installed.
No flag in VS code but error occurred on compile time.
Thanks in Advance.

    


    #include<bits></bits>stdc&#x2B;&#x2B;.h>&#xA;#include<opencv2></opencv2>opencv.hpp>&#xA;&#xA;extern "C" {&#xA;    #include "libavcodec/avcodec.h"&#xA;    #include "libavformat/avformat.h"&#xA;    #include "libavutil/mathematics.h"&#xA;    #include "libavutil/pixfmt.h"&#xA;    #include "libswscale/swscale.h"&#xA;}&#xA;&#xA;using namespace std;&#xA;using namespace cv;&#xA;&#xA;int main(){&#xA;&#xA;&#xA;&#xA;    AVPacket avpkt; int err, frame_decoded = 0;&#xA;    AVCodec *codec = avcodec_find_decoder ( AV_CODEC_ID_H264 );&#xA;    AVCodecContext *codecCtx = avcodec_alloc_context3 ( codec );&#xA;    avcodec_open2 ( codecCtx, codec, NULL );&#xA;    // Set avpkt data and size here&#xA;    // err = avcodec_decode_video2 ( codecCtx, avframe, &amp;frame_decoded, &amp;avpkt );&#xA;    return EXIT_SUCCESS;&#xA;}&#xA;&#xA;

    &#xA;

    Output :

    &#xA;

    h264.cpp:(.text&#x2B;0x15): undefined reference to `avcodec_find_decoder&#x27;&#xA;h264.cpp:(.text&#x2B;0x25): undefined reference to `avcodec_alloc_context3&#x27;&#xA;h264.cpp:(.text&#x2B;0x41): undefined reference to `avcodec_open2&#x27;&#xA;collect2: error: ld returned 1 exit status &#xA;

    &#xA;

  • How to "stream" images to ffmpeg to construct a video in .NET 6

    13 septembre 2021, par alkasel

    I'm using FFMPEG command line tool to create a video. As of now I retrive images from memory, but I'd like to avoid writing them to memory in first place and feed FFMPEG directly from memory.

    &#xA;

    I tried accord-framework.net and it works very well, but now I've switched to .NET 6 and it is not supported (the functionality I used is based on AForge.Video.FFMPEG, an archived project not supporting recent frameworks).

    &#xA;

    Now as I understand it is possible to have FFMPEG to work on streams instead of images saved on disk. In this post there is a very nice example of doing it in Python.

    &#xA;

    However I don't know how to do this on .NET 6 using System.Diagnostics.Process : From this post I undestand that I could have FFMPEG take images from standard input using the syntax

    &#xA;

    -i -&#xA;

    &#xA;

    The problem is that I cannot write on standard input before the System.IO.Process (cmd.exe ... \C ffmpeg.exe .... ) has started (I get System.InvalidOperationException : "StandardIn has not been redirected"). However, as soon as such process start, since it find standard input empty, it ends immediately, so I cannot make it in time to fill standard input.

    &#xA;

    My code looks like this :

    &#xA;

            MemoryStream memStream = new MemoryStream();&#xA;&#xA;        // Data acquisition&#xA;        [...]&#xA;        bitmap.Save(memStream, System.Drawing.Imaging.ImageFormat.Bmp);&#xA;        [...]&#xA;&#xA;        string ffmpegArgument = "/C ffmpeg.exe -y -i - -c:v libx264 -crf 12 -pix_fmt yuv420p -c:a libvo_aacenc -b:a 128k [...];&#xA;&#xA;        Process cmd = new Process();&#xA;        cmd.StartInfo.FileName = "cmd.exe";&#xA;        cmd.StartInfo.Arguments = ffmpegArgument;&#xA;        cmd.StartInfo.UseShellExecute = false;&#xA;        cmd.StartInfo.RedirectStandardInput = true;&#xA;        cmd.Start();&#xA;        cmd.StandardInput.Write(memStream);&#xA;

    &#xA;

    Thanks to everyone who will answer.

    &#xA;