Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

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

Autres articles (89)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

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

  • How does Rust work with process arguments ?

    1er octobre 2022, par SoptikHa

    I'm really confused about Rust processes. I'm trying to call something like this :

    



    ffmpeg -i path/to/test-video.webm -ab 160k -ac 2 -vn -f mp3 -


    



    This should extract sound out of video and send it to stdout. So I've done this :

    



    let sound: std::process::Output = Command::new("ffmpeg")
    .arg(format!("-i {}", args.input.to_str().unwrap()))
    .arg("-ab 160k")
    .arg("-ac 2")
    .arg("-vn")
    .arg("-f mp3")
    .arg("-")
    .stdout(Stdio::piped())
    .stdin(Stdio::inherit())
    .stderr(Stdio::inherit())
    .output()
    .unwrap();


    



    But for some reason, this doesn't work. It prints this to stderr :

    



    Unrecognized option 'i path/to/test-video.webm'.
Error splitting the argument list: Option not found


    



    When I remove the slashes from args (so it looks like .arg(format!("i {}", ...)).arg("ab 160k")..., I get this :

    



    Output file #0 does not contain any stream


    



    I think I misunderstood how this works, but I tested it on other applications and it seemed to work the way I'm doing it now. What did I miss, how does Rust work with these arguments ?

    



    And just to be clear, I know about the ffmpeg crates, but they don't work for me for some reason, I can't even compile them.

    


  • How to decode h264 video encoded from yuv444p frames ?

    22 octobre 2015, par Bing Liu

    I had an h264 video stream encoded from yuv444p frames, it was played well using vlc or mpv player.

    But when I tried to decode it using libavcodec, it just looked like this.

    wrong result ;

    The source frame is an upsize down vlc-player logo.

    Here is the intialization of the decoder :

    AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_H264);
    AVCodecContext *codecCtx = avcodec_alloc_context3(codec);
    avcodec_open2(codecCtx, codec, NULL);

    The decoder worked well when decoding packets encoded from yuv420p.
    Did I miss anything when decoding those packets encoded from yuv444p frames ?

    Update:I converted the yuv444p output into BGRA with sws_scale(), then I make a transforment with the follow codes ;

    int offset_out = 0, offset_tmp = 0;
    uint32_t *tmp = (uint32_t *)malloc(width * height * 4);
    for (int i = 0; i < width * height; i++) {
       if ((i + width + 9) % (width + 9) > width) {
           out[offset_out++] = in[i];
       } else {
           tmp[offset_tmp++] = in[i];
       }
    }
    memcpy(out + offset_out, tmp, offset_tmp);
    free(tmp);

    Then the picture looked all right.

    There is a number 9 in i + width + 9. I guessed that cause I knew the width and height of the source picture. But what if the width or height was changed to some value else, 9 didn’t work.

    I want to know what’s wrong with the decoder.

  • opencv V3 mixing shared and non shared

    31 décembre 2015, par Kellerspeicher

    The current stable (V3.0.0) and unstable (V3.1.0) version of openCV is mixing shared and non shared libraries if compiled on an Ubuntu 14.04.3 LTS.

    Linking CXX shared library ../../lib/libopencv_videoio.so
    /usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
    /usr/local/lib/libavcodec.a: error adding symbols: Bad value
    collect2: error: ld returned 1 exit status
    make[2]: *** [lib/libopencv_videoio.so.3.1.0] Error 1
    make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
    make: *** [all] Error 2

    Trying to create libopencv_videoio.so using libavcodec.a seems to be the problem. There is a bug report about that, but it is only giving the advice to check if libavcodec.so is installed (which is) and a workaround to use -DBUILD_SHARED_LIBS=OFF to prevent creation of shared libraries. Does anyone knows the reason for this problem. The openCV people just state the Ubuntu packaged ffmpeg library to be not correct. Any idea ?

    The problem seems to be old. I just found a very similar question not answered but commented with the advice of compiling ffmpeg with ./configure --enable-shared. But there is already a shared library /usr/lib/x86_64-linux-gnu/libavcodec.so which obviously is not found. I am not a cmake expert but couldn’t it be a problem of a miss leaded build process ?