Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (35)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (6389)

  • Load PNG from disk into AVFrame

    15 février 2018, par Pedro Pereira

    I can’t seem to get this to work. This is what I got so far :

    // Variables
    int retOp; // for holding the operations results

    // Initializes FFmpeg
    av_register_all();

    // Open image
    uint8_t *buffer = NULL;
    size_t buffer_size;
    retOp = av_file_map("in.png", &buffer, &buffer_size, 0, NULL);
    if(retOp < 0){
       cerr << "Could not load image!" << endl;
       system("pause");
       return -1;
    }

    // Initialize AVFrame
    AVFrame* frame = av_frame_alloc();
    frame->width = 1920;
    frame->height = 1080;
    frame->format = AV_PIX_FMT_RGBA;

    The examples in the FFmpeg Doxygen don’t really help and there’s no support on the web. If there is let me know.

    Uncompressed RGBA image.

  • How can I read all the data from a pipe and prevent it from closing ?

    23 septembre 2014, par slhck

    I’m trying to read raw YUV data from a compressed file using ffmpeg and pipes with Python.
    The ffmpeg command correctly spits out frames as raw YUV data, and I’m reading it like this :

    def read_from_pipe(pipe, amount):
       raw = pipe.stdout.read(amount)
       pipe.stdout.flush()
       return raw

    pipe_ref = subprocess.Popen('ffmpeg -i "' + input + '" -r 30 -c:v rawvideo -pix_fmt yuv420p -an -f rawvideo -t 5 -',
     shell = True,
     stdout = subprocess.PIPE,
     bufsize=1920*1080*3*2)

    frame_num = 0
    while True:
       data = read_from_pipe(pipe_ref, width*height*3)

       # no more data
       if (len(data) != width*height*3))
           return results

       image = extract_image_data(data, width, height)
       # do something with image, put it into "results" and print frame / SSIM values to console
       frame_num += 1

    The problem is, as soon as ffmpeg is done converting all frames, my program stops. Since the program is a little slower than ffmpeg, it will stop receiving data and exit.

    Basically, for example, I can only work up to frame 30, then ffmpeg finishes at frame 60, and my program also exits. The command line output would say :

    Frame=25 SSIM=0.990472732391
    Frame=26 SSIM=0.98359411819
    Frame=27 SSIM=0.981074433586
    Frame=28 SSIM=0.97850843075
    frame=   60 fps= 27 q=0.0 Lsize=  182250kB time=00:00:02.00 bitrate=746496.0kbits/s dup=12 drop=0    
    video:182250kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead 0.000000%
    Frame=29 SSIM=0.977698849804
    frame=   60 fps= 27 q=0.0 Lsize=  182250kB time=00:00:02.00 bitrate=746496.0kbits/s dup=12 drop=0    
    video:182250kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead 0.000000%

    How can I get it to work on all frames that are output by ffmpeg ? Or is there any other easier way of obtaining the raw YUV data from any file if not through a pipe ? (I need it to work concurrently)

  • how to add duration to mjpeg or how to make mjpeg faster

    10 octobre 2014, par n2v2rda2

    i have ip-cam mjpeg that i made and it have total 240 frames

    encode souce is
    ffmpeg.exe -framerate 25 -i c :\%06d.jpg\ -s 1920x1080 -qscale 1 -vcodec mjpeg -r 25 C :\result.mjpg -y

    now i want to play result.mjpg by mjpeg player i made

    my problem
    1. i can't get mjpeg's play time or duration time

    2. playing is slower then other movie player so i want to sync it and play more faster

    below is ffprobe result

    Input #0, mjpeg, from 'result.mjpg':
    Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg), 1920x1080, 25 tbr, 1200k tbn, 25 tbc

    below is result added -show_frame

    [FRAME]
    media_type=video
    key_frame=1
    pkt_pts=720000
    pkt_pts_time=0.600000
    pkt_dts=720000
    pkt_dts_time=0.600000
    best_effort_timestamp=720000
    best_effort_timestamp_time=0.600000
    pkt_duration=48000
    pkt_duration_time=0.040000
    pkt_pos=4731406
    pkt_size=313289
    width=1920
    height=1080
    pix_fmt=yuvj444p
    sample_aspect_ratio=333:320
    pict_type=I
    coded_picture_number=0
    display_picture_number=0
    interlaced_frame=0
    top_field_first=0
    repeat_pict=0
    [/FRAME]

    ffprobe show me there are Duration : N/A, bitrate : N/A

    how do i set Duration and bitrate
    is there any encode-option i have to set ?

    when i decode mjpeg like below

    i can’t get duration just 0

    AVFormatContext*  pFC;
    int               ret;

    pFC = avformat_alloc_context();

    ret  = avformat_open_input(&pFC, filename, NULL, NULL);
    if (ret < 0) {
       // fail .
    }

    ret  = avformat_find_stream_info(pFC, NULL);
    if (ret < 0) {
       // fail
    }
    printf("duration %ld", pFC->duration);   <----- only 0