Recherche avancée

Médias (91)

Autres articles (24)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (4793)

  • ffmpeg : avcodec_open2 returns invalid argument

    12 mai 2016, par roari

    i’m reusing the sample code from the developer 64bit release of ffmpeg in my application to encode a video :

    AVCodec* pCodec_{nullptr};
    AVCodecContext* pContext_{nullptr};

    avcodec_register_all();
    pCodec_ = avcodec_find_encoder(AV_CODEC_ID_MPEG2VIDEO);
    if (!pCodec_) {}

    pContext_ = avcodec_alloc_context3(pCodec_);
    if (!pContext_) {}

    pContext_->bit_rate = 400000;
    pContext_->width = size.width();
    pContext_->height = size.height();

    pContext_->time_base.den = 1;
    pContext_->time_base.num = fps;

    pContext_->gop_size = 10;
    pContext_->max_b_frames = 1;
    pContext_->pix_fmt = AV_PIX_FMT_BGR0;

    if (codec_id == AV_CODEC_ID_H264) {
       av_opt_set(pContext_->priv_data, "preset", "slow", 0);
    }

    int err = avcodec_open2(pContext_, pCodec_, nullptr);
    if (err < 0) {}

    AVCodec* and AVCodecContext* look like they are allocated correctly. avcodec_open2 then returns invalid argument (-22).

    I use : Windows 10 64, VS2013 Compiler, Qt Creator IDE, ffmpeg(2016-05-12) 64bit.

    The sample i took the code from is "decoding_encoding.c".

    Any ideas ?

  • avutil/rational : Check that av_reduce() returns values within the requested max

    29 décembre 2014, par Michael Niedermayer
    avutil/rational : Check that av_reduce() returns values within the requested max
    

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavutil/rational.c
  • Code returns AttributeError : 'VoiceChannel' object has no attribute 'play' when running on Discloud

    18 septembre 2023, par Sc4rl3ttfir3

    So, my code works fine when I run it locally, but even after adapting it to run on Discloud, it returns an error I can't solve.

    &#xA;

    Code :

    &#xA;

    @bot.command(name=&#x27;play&#x27;, help=&#x27;To play song&#x27;)&#xA;async def play(ctx, url):&#xA;    voice_channel = ctx.author.voice.channel&#xA;&#xA;    if voice_channel is None:&#xA;        return await ctx.send(&#x27;You are not connected to a voice channel.&#x27;)&#xA;&#xA;    async with ctx.typing():&#xA;        filename = await YTDLSource.from_url(url, loop=bot.loop)&#xA;        &#xA;        if ctx.voice_client is not None:&#xA;            ctx.voice_client.stop()&#xA;&#xA;        source = discord.FFmpegPCMAudio(&#xA;            executable="ffmpeg",&#xA;            source=filename&#xA;        )&#xA;        &#xA;        voice_channel.play(source)&#xA;&#xA;    await ctx.send(&#x27;**Now playing:** {}&#x27;.format(filename))&#xA;

    &#xA;

    When it runs on the Discloud server, it returns the following error/traceback message :

    &#xA;

    Traceback (most recent call last):&#xA;File "/usr/local/lib/python3.11/site-packages/discord/ext/commands/core.py", line 235, in wrapped&#xA;ret = await coro(*args, **kwargs)&#xA;^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;File "/home/user_686208406444572830/Sc4rl3ttb0t.py", line 357, in play &#xA;voice_channel.play(source)&#xA;^^^^^^^^^^^^^^^^^^&#xA;AttributeError: &#x27;VoiceChannel&#x27; object has no attribute &#x27;play&#x27;&#xA;

    &#xA;

    Anybody with any idea of what is going wrong would be greatly appreciated for helping out

    &#xA;