Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (56)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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

Sur d’autres sites (8165)

  • ffmpeg -var_stream_map Invalid keyval "v:0

    22 septembre 2020, par rmrf fly

    the ffmpeg command is correct,

    


    use ffmpeg command execute at command line is ok,

    


    int windows10 use java exec the command is ok ,

    


    by only in linux when i use java exec the ffmpeg command throw expection

    


    the command :

    


    ffmpeg -i /data/vsftpd/Anchor.mp4 -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" -hls_segment_filename 'file_%v_%03d.ts' out_%v.m3u8


    


    enter image description here

    


    [hls @ 0xd31b5c0] Invalid keyval "v:0
[hls @ 0xd31b5c0] Variant stream info update failed with status ffffffea
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument


    


    jar

    


    <dependency>&#xA;   <groupid>org.apache.commons</groupid>&#xA;   <artifactid>commons-exec</artifactid>&#xA;   <version>1.3</version>&#xA;</dependency>&#xA;

    &#xA;

    java code

    &#xA;

    public static int exeCommand(String command, OutputStream out) throws ExecuteException, IOException {&#xA;    CommandLine commandLine = CommandLine.parse(command);&#xA;    PumpStreamHandler pumpStreamHandler = null;&#xA;    if (null == out) {&#xA;        pumpStreamHandler = new PumpStreamHandler();&#xA;    } else {&#xA;        pumpStreamHandler = new PumpStreamHandler(out);&#xA;    }&#xA;&#xA;    // time out 10s&#xA;    ExecuteWatchdog watchdog = new ExecuteWatchdog(10000);&#xA;&#xA;    DefaultExecutor executor = new DefaultExecutor();&#xA;    executor.setStreamHandler(pumpStreamHandler);&#xA;    //executor.setWatchdog(watchdog);&#xA;&#xA;    return executor.execute(commandLine);&#xA;}&#xA;

    &#xA;

  • Ffmpeg H264_qsv encoder memory leak

    12 août 2020, par Expressingx

    I'm using h264_qsv encoder if available. If its available I'm scaling the frame to NV12

    &#xA;

        public AVFrame* GetOutputFrame(AVFrame* sourceFrame, AVPixelFormat targePixFmt)&#xA;    {&#xA;        AVPixelFormat sourcePixFmt = (AVPixelFormat)sourceFrame->format;&#xA;&#xA;        if (_pConvertContext == null)&#xA;        {&#xA;            _pConvertContext = CreateContext(sourcePixFmt, targePixFmt);&#xA;        }&#xA;&#xA;        if (_convertedFrameBufferPtr == IntPtr.Zero)&#xA;        {&#xA;            int buffSize = ffmpeg.av_image_get_buffer_size(targePixFmt, sourceFrame->width, sourceFrame->height, 1);&#xA;            _convertedFrameBufferPtr = Marshal.AllocHGlobal(buffSize);&#xA;            ffmpeg.av_image_fill_arrays(ref _dstData, ref _dstLinesize, (byte*)_convertedFrameBufferPtr, targePixFmt, sourceFrame->width, sourceFrame->height, 1);&#xA;        }&#xA;&#xA;        return ScaleImage(_pConvertContext, sourceFrame, targePixFmt, _dstData, _dstLinesize);&#xA;    }&#xA;

    &#xA;

    ScaleImage. Here if I commend out av_buffer_alloc I still get memory leak, but a lot less

    &#xA;

    private AVFrame* ScaleImage(SwsContext* ctx, AVFrame* sourceFrame, AVPixelFormat targePixelFormat, byte_ptrArray4 dstData, int_array4 dstLinesize)&#xA;    {&#xA;        var outFrame = ffmpeg.av_frame_alloc();&#xA;&#xA;        int ret = ffmpeg.sws_scale(ctx, sourceFrame->data, sourceFrame->linesize, 0, sourceFrame->height, dstData, dstLinesize);&#xA;&#xA;        if (ret &lt; 0)&#xA;            //throw;&#xA;&#xA;        var data = new byte_ptrArray8();&#xA;        data.UpdateFrom(dstData);&#xA;        var linesize = new int_array8();&#xA;        linesize.UpdateFrom(dstLinesize);&#xA;&#xA;        outFrame->data = data;&#xA;        outFrame->linesize = linesize;&#xA;        outFrame->width = sourceFrame->width;&#xA;        outFrame->height = sourceFrame->height;&#xA;        outFrame->format = (int)targePixelFormat;&#xA;        //outFrame->buf[0] = ffmpeg.av_buffer_alloc(&#xA;        //    ffmpeg.av_image_get_buffer_size(targePixelFormat, sourceFrame->width, sourceFrame->height, 1) &#x2B; ffmpeg.AV_INPUT_BUFFER_PADDING_SIZE); ;&#xA;&#xA;        return outFrame;&#xA;    }&#xA;

    &#xA;

    After the frame is ready send to codec

    &#xA;

        private void EncodeFrameToFile(AVCodecContext* ctx, AVFrame* outFrame, int streamIndex)&#xA;    {&#xA;        _outPkt->stream_index = streamIndex;&#xA;&#xA;        // let the encoder assume what should be the type&#xA;        if (outFrame != null)&#xA;        {&#xA;            outFrame->pict_type = AVPictureType.AV_PICTURE_TYPE_NONE;&#xA;        }&#xA;&#xA;        int ret = ffmpeg.avcodec_send_frame(ctx, outFrame);&#xA;&#xA;        if (ret &lt; 0)&#xA;        {&#xA;            ffmpeg.av_packet_unref(_outPkt);&#xA;            return;&#xA;        }&#xA;&#xA;        while (ret >= 0)&#xA;        {&#xA;            ret = ffmpeg.avcodec_receive_packet(ctx, _outPkt);&#xA;&#xA;            if (ret == ffmpeg.AVERROR(ffmpeg.EAGAIN) || ret == ffmpeg.AVERROR_EOF)&#xA;            {&#xA;                ffmpeg.av_packet_unref(_outPkt);&#xA;                return;&#xA;            }&#xA;&#xA;            if (ret &lt; 0)&#xA;            {&#xA;                ffmpeg.av_packet_unref(_outPkt);&#xA;                ffmpeg.av_log(null, ffmpeg.AV_LOG_ERROR, "Error during encoding.");&#xA;                break;&#xA;            }&#xA;&#xA;            int out_stream_index = _inputContext.GetStreamIndex(_outPkt->stream_index);&#xA;            AVStream* out_stream = _outputContext.OutputFormatContext->streams[out_stream_index];&#xA;&#xA;            ffmpeg.av_packet_rescale_ts(_outPkt, ctx->time_base, out_stream->time_base);&#xA;&#xA;            ret = ffmpeg.av_interleaved_write_frame(_outputContext.OutputFormatContext, _outPkt);&#xA;&#xA;            if (ret &lt; 0)&#xA;            {&#xA;                ffmpeg.av_packet_unref(_outPkt);&#xA;                ffmpeg.av_log(null, ffmpeg.AV_LOG_ERROR, "Error muxing packet.");&#xA;                break;&#xA;            }&#xA;&#xA;            ffmpeg.av_packet_unref(_outPkt);&#xA;        }&#xA;    }&#xA;

    &#xA;

    And when the frame is written to the file

    &#xA;

    ffmpeg.av_frame_free(&amp;frame);&#xA;

    &#xA;

    If I comment

    &#xA;

    ret = ffmpeg.avcodec_receive_packet(ctx, _outPkt);&#xA;

    &#xA;

    The leak is gone. But of course no file. Any suggestions ? I'm using ffmpeg 4.3.1

    &#xA;

  • Discord BOT Music player : plays 3 songs at once

    15 août 2020, par LaCalienta

    I am developing my Discord bot that plays music, I am using DSahrpPlus as a wrapper and got the bot mostly working

    &#xA;

    Commands get parsed corecly

    &#xA;

    using System;&#xA;using System.Diagnostics;&#xA;using System.IO;&#xA;using System.Threading.Tasks;&#xA;&#xA;using DSharpPlus;&#xA;using DSharpPlus.CommandsNext;&#xA;using DSharpPlus.CommandsNext.Attributes;&#xA;using DSharpPlus.Entities;&#xA;using DSharpPlus.VoiceNext;&#xA;&#xA;using WolfBot.Attributes;&#xA;using WolfBot.Commands.Music;&#xA;&#xA;namespace WolfBot.Commands&#xA;{&#xA;    class MusicCommands : BaseCommandModule&#xA;    {&#xA;        int SongID = 1;&#xA;        MusicPlayer player;&#xA;        [Command("join")]&#xA;        [RequirePermissionsCustom(Permissions.UseVoice)]&#xA;        public async Task Join(CommandContext ctx)&#xA;        {&#xA;            //Initialize music player&#xA;            player = new MusicPlayer(ctx);&#xA;&#xA;            var vnext = ctx.Client.GetVoiceNext();&#xA;&#xA;            var vnc = vnext.GetConnection(ctx.Guild);&#xA;            if (vnc != null)&#xA;            {&#xA;                await ctx.RespondAsync("Already connected in this guild.");&#xA;                throw new InvalidOperationException("Already connected in this guild.");&#xA;            }&#xA;&#xA;            var chn = ctx.Member?.VoiceState?.Channel;&#xA;            if (chn == null)&#xA;            {&#xA;                await ctx.RespondAsync("You need to be in a voice channel.");&#xA;                throw new InvalidOperationException("You need to be in a voice channel.");&#xA;            }&#xA;&#xA;            vnc = await vnext.ConnectAsync(chn);&#xA;            await ctx.RespondAsync(DiscordEmoji.FromName(ctx.Client, ":ok_hand:")); //-