Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

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

Autres articles (53)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • L’utiliser, en parler, le critiquer

    10 avril 2011

    La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
    Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
    Une liste de discussion est disponible pour tout échange entre utilisateurs.

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

Sur d’autres sites (11402)

  • lavf : move a variable declaration to the block where it’s used

    25 août 2013, par Anton Khirnov
    lavf : move a variable declaration to the block where it’s used
    
    • [DBH] libavformat/utils.c
  • avcodec/wavpack : Treat the first block coding too many channels as an error

    7 décembre 2016, par Michael Niedermayer
    avcodec/wavpack : Treat the first block coding too many channels as an error
    

    Fixes memleak
    Fixes : 236/8aeebc9ca49b91bf71c114dcefac56c154a3a563

    Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/wavpack.c
  • Rotating a video during encoding with ffmpeg and libav API results in half of video corrupted

    11 mai 2020, par Daniel Kobe

    I'm using the C API for ffmpeg/libav to rotate a vertically filmed iphone video during the encoding step. There are other questions asking to do a similar thing but they are all using the CLI tool to do so.

    &#xA;&#xA;

    So far I was able to figure out how to use the AVFilter to rotate the video, base off this example https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/filtering_video.c

    &#xA;&#xA;

    The problem is that half the output file is corrupt.&#xA;Corrupt Video Screenshot

    &#xA;&#xA;

    Here is the code for my encoding logic. Its written with GOLANG using CGO to interface with the C API.

    &#xA;&#xA;

    // Encode encode an AVFrame and return it&#xA;func Encode(enc Encoder, frame *C.AVFrame) (*EncodedFrame, error) {&#xA;    ctx := enc.Context()&#xA;&#xA;    if ctx.buffersrcctx == nil {&#xA;        // initialize filter&#xA;        outputs := C.avfilter_inout_alloc()&#xA;        inputs  := C.avfilter_inout_alloc()&#xA;        m_pFilterGraph := C.avfilter_graph_alloc()&#xA;        buffersrc := C.avfilter_get_by_name(C.CString("buffer"))&#xA;        argsStr := fmt.Sprintf("video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", ctx.avctx.width, ctx.avctx.height, ctx.avctx.pix_fmt, ctx.avctx.time_base.num, ctx.avctx.time_base.den, ctx.avctx.sample_aspect_ratio.num, ctx.avctx.sample_aspect_ratio.den)&#xA;        Log.Info.Println("yakotest")&#xA;        Log.Info.Println(argsStr)&#xA;        args := C.CString(argsStr)&#xA;        ret := C.avfilter_graph_create_filter(&amp;ctx.buffersrcctx, buffersrc, C.CString("my_buffersrc"), args, nil, m_pFilterGraph)&#xA;        if ret &lt; 0 {&#xA;            Log.Info.Printf("\n problem creating filter %v\n", AVError(ret).Error())&#xA;        }&#xA;&#xA;        buffersink := C.avfilter_get_by_name(C.CString("buffersink"))&#xA;        ret = C.avfilter_graph_create_filter(&amp;ctx.buffersinkctx, buffersink, C.CString("my_buffersink"), nil, nil, m_pFilterGraph)&#xA;        if ret &lt; 0 {&#xA;            Log.Info.Printf("\n problem creating filter %v\n", AVError(ret).Error())&#xA;        }&#xA;&#xA;        /*&#xA;         * Set the endpoints for the filter graph. The filter_graph will&#xA;         * be linked to the graph described by filters_descr.&#xA;         */&#xA;&#xA;        /*&#xA;         * The buffer source output must be connected to the input pad of&#xA;         * the first filter described by filters_descr; since the first&#xA;         * filter input label is not specified, it is set to "in" by&#xA;         * default.&#xA;         */&#xA;        outputs.name       = C.av_strdup(C.CString("in"))&#xA;        outputs.filter_ctx = ctx.buffersrcctx&#xA;        outputs.pad_idx    = 0&#xA;        outputs.next       = nil&#xA;&#xA;        /*&#xA;         * The buffer sink input must be connected to the output pad of&#xA;         * the last filter described by filters_descr; since the last&#xA;         * filter output label is not specified, it is set to "out" by&#xA;         * default.&#xA;         */&#xA;        inputs.name       = C.av_strdup(C.CString("out"))&#xA;        inputs.filter_ctx = ctx.buffersinkctx&#xA;        inputs.pad_idx    = 0&#xA;        inputs.next       = nil&#xA;&#xA;        ret = C.avfilter_graph_parse_ptr(m_pFilterGraph, C.CString("transpose=clock,scale=-2:1080"),&#xA;            &amp;inputs, &amp;outputs, nil)&#xA;        if ret &lt; 0 {&#xA;            Log.Info.Printf("\n problem with avfilter_graph_parse %v\n", AVError(ret).Error())&#xA;        }&#xA;&#xA;        ret = C.avfilter_graph_config(m_pFilterGraph, nil)&#xA;        if ret &lt; 0 {&#xA;            Log.Info.Printf("\n problem with graph config %v\n", AVError(ret).Error())&#xA;        }&#xA;    }&#xA;&#xA;    filteredFrame :=  C.av_frame_alloc()&#xA;&#xA;    /* push the decoded frame into the filtergraph */&#xA;    ret := C.av_buffersrc_add_frame_flags(ctx.buffersrcctx, frame, C.AV_BUFFERSRC_FLAG_KEEP_REF)&#xA;    if ret &lt; 0 {&#xA;        Log.Error.Printf("\nError while feeding the filter greaph, err = %v\n", AVError(ret).Error())&#xA;        return nil, errors.New(ErrorFFmpegCodecFailure)&#xA;    }&#xA;&#xA;    /* pull filtered frames from the filtergraph */&#xA;    for {&#xA;        ret = C.av_buffersink_get_frame(ctx.buffersinkctx, filteredFrame)&#xA;        if ret == C.AVERROR_EAGAIN || ret == C.AVERROR_EOF {&#xA;            break&#xA;        }&#xA;        if ret &lt; 0 {&#xA;            Log.Error.Printf("\nCouldnt find a frame, err = %v\n", AVError(ret).Error())&#xA;            return nil, errors.New(ErrorFFmpegCodecFailure)&#xA;        }&#xA;&#xA;        filteredFrame.pts = frame.pts&#xA;        frame = filteredFrame&#xA;        defer C.av_frame_free(&amp;filteredFrame)&#xA;    }&#xA;&#xA;    if frame != nil {&#xA;        frame.pict_type = 0 // reset pict type for the encoder&#xA;        if C.avcodec_send_frame(ctx.avctx, frame) != 0 {&#xA;            Log.Error.Printf("%&#x2B;v\n", StackErrorf("codec error, could not send frame"))&#xA;            return nil, errors.New(ErrorFFmpegCodecFailure)&#xA;        }&#xA;    }&#xA;&#xA;    for {&#xA;        ret := C.avcodec_receive_packet(ctx.avctx, ctx.pkt)&#xA;        if ret == C.AVERROR_EAGAIN {&#xA;            break&#xA;        }&#xA;        if ret == C.AVERROR_EOF {&#xA;            return nil, fmt.Errorf("EOF")&#xA;        }&#xA;        if ret &lt; 0 {&#xA;            Log.Error.Printf("%&#x2B;v\n", StackErrorf("codec error, receiving packet"))&#xA;            return nil, errors.New(ErrorFFmpegCodecFailure)&#xA;        }&#xA;&#xA;        data := C.GoBytes(unsafe.Pointer(ctx.pkt.data), ctx.pkt.size)&#xA;        return &amp;EncodedFrame{data, int64(ctx.pkt.pts), int64(ctx.pkt.dts),&#xA;            (ctx.pkt.flags &amp; C.AV_PKT_FLAG_KEY) != 0}, nil&#xA;    }&#xA;&#xA;    return nil, nil&#xA;}&#xA;

    &#xA;&#xA;

    It seems like I need to do something with the scaling here but I'm struggling to find helpful information online.

    &#xA;