Recherche avancée

Médias (1)

Mot : - Tags -/berlin

Autres articles (56)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (10844)

  • ffmpeg : sws_scale not able to convert image from YUV to RGB

    1er octobre 2020, par Abhinav Singh

    I m trying to convert my image from YUV420P to RGB24 below is my code for extracting the frame and decoding it,

    


    frame extracting

    


    while(av_read_frame(avc,avpacket) == 0){
        if(avpacket->stream_index == videoStream){
            int res = avcodec_send_packet(avctx,avpacket);
            if(res == AVERROR(EAGAIN)){
                continue;
            }
            else if(res<0){
                std::cout<<"error reading packet\n";
                break;
            }
            else{
                AVFrame* avframeRGB = av_frame_alloc();
                res = avcodec_receive_frame(avctx,avframeRGB);
                if(res == AVERROR(EAGAIN)){
                    continue;
                }
                else if(res<0){
                    std::cout<<"Error reading frame";
                    break;
                }
                else{
                    ++i;
                    convertImage(&avframeRGB,avctx->pix_fmt,AV_PIX_FMT_RGB24);
                    displayImage(avframeRGB);
                }
            }
        }
    }


    


    Function convertImage

    


    void convertImage(AVFrame** frame, AVPixelFormat srcFmt, AVPixelFormat destFmt){
    AVFrame* tframe = *frame;
    struct SwsContext* swscaler = sws_getContext(tframe->width,tframe->height,srcFmt,tframe->width,tframe->height,destFmt, SWS_BILINEAR,NULL,NULL,NULL);
    AVFrame* tmp = av_frame_alloc();
    tmp->width = tframe->width;
    tmp->height = tframe->height;
    tmp->format = destFmt;
    if(av_frame_get_buffer(tmp,32) !=0)
        return;
    int res = sws_scale(swscaler,(uint8_t const * const*)tframe->data,tframe->linesize,0,tframe->height,tmp->data,tmp->linesize);
    *frame = tmp;
}


    


    Before calling convertImage
avframeRGB

    


    data : {0x555555988ec0 &#x27;\020&#x27; <repeats 200="200" times="times">..., 0x555555a6f940 &#x27;\200&#x27; <repeats 200="200" times="times">..., 0x555555aa9440 &#x27;\200&#x27; <repeats 200="200" times="times">..., 0x0, 0x0, 0x0, 0x0, 0x0}&#xA;height : 720&#xA;width : 1280&#xA;</repeats></repeats></repeats>

    &#xA;

    after calling convertImage

    &#xA;

    data : {0x7fffdde19040 "", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}&#xA;height : 0&#xA;width : 0&#xA;

    &#xA;

    I m not able to understand why my data is NULL and my height and width is 0 ?

    &#xA;

    ffmpeg version - 4.3.2

    &#xA;

  • FFMpeg overlay and fade images and text in and out at over video background

    28 décembre 2019, par grootester

    Prior to applying the drawbox and drawtext text option I was able to fade in and out images easily. However, attempting to incorporate the drawtext produces unwanted errors. Any ideas how this could be rememdied ? Love to show multi-line text (different fonts) centered over box at specific times with fade in fade out times that works alongside images fading in out at specific times.

    ffmpeg -i vids/testVid.mp4 -loop 1 -i slideshow/pic1.png -loop 1 -i slideshow/pic2.png -loop 1 -i slideshow/pic3.png -i slideshow/pic4.png -filter_complex "[0:v]drawbox=x=40:y=40:w=250:h=75:color=white,drawtext=fontfile=arialb.ttf:fontsize=24:font color=black:text=Micky Mouse,drawtext=fontfile=arial.ttf:fontsize=24 : font color=black:text=January 1st 1938 — December 19th 2019fade=st=0:d=1:alpha=1,fade=out:st=5:d=1:alpha=1,trim=0:6,setpts=PTS+4/TB[ovr1] ; [2]fade=st=0:d=1:alpha=1,fade=out:st=5:d=1:alpha=1,trim=0:6,setpts=PTS+10/TB[ovr2] ; [3]fade=st=0:d=1:alpha=1,fade=out:st=5:d=1:alpha=1,trim=0:6,setpts=PTS+16/TB[ovr3] ; [4]fade=st=0:d=1:alpha=1,fade=out:st=5:d=1:alpha=1,trim=0:6,setpts=PTS+22/TB[ovr4] ; [0:v][ovr1]overlay=(main_w-overlay_w)/2 :(main_h-overlay_h)/2:enable=’between(t,4,10)’[base1] ; [base1][ovr2]overlay=(main_w-overlay_w)/2 :(main_h-overlay_h)/2:enable=’between(t,10,16)’[base2] ; [base2][ovr3]overlay=(main_w-overlay_w)/2 :(main_h-overlay_h)/2:enable=’between(t,16,22)’[base3] ; [base3][ovr4]overlay=(main_w-overlay_w)/2 :(main_h-overlay_h)/2:enable=’between(t,22,28)’[out]" -map "[out]" -c:v libx264 -c:a copy -flags +global_header -crf 27 -preset veryfast -s 1920x1080 -y slideshow/outTest.mp4

  • How to create a video from images on a .tif format with FFmpeg ?

    18 décembre 2018, par ecjb

    I just discovered FFmpeg : awesome software. After reading this this stackoverflow question I could efficiently create a movie with pictures in a .png format with the following line :

    ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -vf "fps=25,format=yuv420p" out.mp4

    In an experiment, however, I took high quality pictures on a .tif format and would like to create a movie out of them. I just copied the line above and replaced the name of the files as well as the format .png by .tif but I got a message error saying "This format is not supported". Here is the report :

    [tiff @ 0x7fce5c02a600] This format is not supported (bpp=12, bppcount=1)
    Last message repeated 1 times
    Error while decoding stream #0:0: Invalid data found when processing input
    [tiff @ 0x7fce5c01bc00] This format is not supported (bpp=12, bppcount=1)
    Last message repeated 7 times
    Cannot determine format of input stream 0:0 after EOF
    Error marking filters as finished
    Conversion failed!

    Should I just forget it or is there a workaround with ffmpeg ?