Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (112)

  • 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

  • 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 (5172)

  • linux write permission for multiple users [on hold]

    8 avril 2014, par Naveen Gamage

    I have a folder with these permissions 775 owner : user group : user

    I'm trying to convert files in above folder to MP4 using ffmpeg and write converted files back into above folder.

    ffmpeg use www-data to write so every time it gives me permission denied error.

    I tried adding www-data to group user and above folder has group write access (775) but I still getting the error. Error goes away when I chmod the folder to 777.

    Is there a way to give www-data write access to above folder without changing current ownership ?

  • How to call a Rust function that expects a double pointer to buffer

    7 octobre 2020, par Guerlando OCs

    I'm trying to map the following ffmpeg function : http://ffmpeg.org/doxygen/4.0/group__lavc__parsing.html#ga0dd9af605377fcbb49fffd982672d377 to Rust code

    


    int av_parser_parse2    (   AVCodecParserContext *      s,
        AVCodecContext *    avctx,
        uint8_t **      poutbuf,
        int *   poutbuf_size,
        const uint8_t *     buf,
        int     buf_size,
        int64_t     pts,
        int64_t     dts,
        int64_t     pos 
    )   


    


    Here's my Rust code sketch :

    


    fn parse2(
    &self, 
    av_codec_context: CodecContext,
    poutbuf: &mut [u8],
    poutbuf_size: &mut i32,
    buf: &[u8],
    pts: i64,
    dts: i64,
    pos: i64,
) -> Result {
    unsafe {// ptr::null(), ptr::null_mut()
        match av_parser_parse2(self.as_mut_ptr(),
        av_codec_context.as_mut_ptr(),
        poutbuf.as_mut_ptr(),
        poutbuf_size.as_mut_ptr(),
        buf.as_mut_ptr(),
        buf.len() as i32,
        pts,
        dts,
        pos
) {
        }
    }
}


    


    Here's the av_parser_parse2 generated by Rust's C bindings :

    


    pub fn av_parser_parse2(
    s: *mut AVCodecParserContext,
    avctx: *mut AVCodecContext,
    poutbuf: *mut *mut u8,
    poutbuf_size: *mut libc::c_int,
    buf: *const u8,
    buf_size: libc::c_int,
    pts: i64,
    dts: i64,
    pos: i64,
) -> libc::c_int


    


    I'm having problems in 2 arguments :

    


            poutbuf.as_mut_ptr(),
        poutbuf_size.as_mut_ptr(),


    


    How can I make a double pointer ? In ffmpeg the user would provide a pointer to an empty buffer and to a size, which would be ovewritten by the function av_parser_parse2. I think I don't want the poutbuf: &mut [u8], poutbuf_size: &mut i32, arguments. Maybe I need to return a fresh new Vec for every parse2 call ? So the return value for parse2 would be the tuple Vec, i32.

    


    So I think I should take off poutbuf and poutbuf_size from the arguments, and call av_parser_parse2 with something that will become the Vec to return. However, I cannot pass a Vec as a double pointer, because I do not know the size of the returned packet.

    


    How can I deal with the returned buffer ?

    


  • Gstreamer convert and display video v4l2 - tee problems in rust

    27 mars 2023, par d3im

    I have USB grabber v4l2 source and I want to tee stream to autovideosink and x264enc to file (now as fake black hole)

    


    When I disable one or another branch it works but together Pipeline goes :

    


    Pipeline state changed from Null to Ready
Pipeline state changed from Ready to Paused


    


    and stays there never switches to Playing

    


    gst-launch-1.0 with similar functionality works well.

    


        gst::Element::link_many(&[&pw_video, &v_caps, &vid_queuey, &vid_tee]).unwrap();
    gst::Element::link_many(&[&vid_queue1, &autovideoconvert, &vid_queuex, &autovideosink]).unwrap();
    gst::Element::link_many(&[&vid_queue2, &autovideoconvert_x264, &vid_queue3, &x264, &vid_queue4, &fake]).unwrap();

    let tee_display_pad = vid_tee.request_pad_simple("src_10").unwrap();
    let vid_queue1_pad = vid_queue1.static_pad("sink").unwrap();

    tee_display_pad.link(&vid_queue1_pad).unwrap();

    let tee_convert_pad = vid_tee.request_pad_simple("src_20").unwrap();
    let vid_queue2_pad = vid_queue2.static_pad("sink").unwrap();

    tee_convert_pad.link(&vid_queue2_pad).unwrap();


    


    How can I use tee in rust properly to have playable pipeline with two branches ?

    


    Update : I read some posts about increasing queue size, so I tried for this and then all queues :

    


        let vid_queue1 = gst::ElementFactory::make("queue")
        .name("queue1")
        .property("max-size-buffers", 5000 as u32)
        .property("max-size-bytes", 1048576000 as u32)
        .property("max-size-time", 60000000000 as u64)
        .build()
        .expect("queue1");


    


    but it didn't help so I tried set zero latency :

    


        let x264 = gst::ElementFactory::make("x264enc")
        .name("x264")
        .property_from_str("speed-preset", "ultrafast")
        .property_from_str("pass", "qual")
        .property_from_str("tune", "zerolatency")
        .property("quantizer", 0 as u32)
        .property("threads", 8 as u32)
        .build()
        .expect("!x264");


    


    and it works now. But comparable gst-launch-1.0 settings didn't had such option - only queues sizes increased.

    


    Is there any other option than setting zerolatency ?