Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (22)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (4700)

  • Sync video and data with ffmpeg

    31 août 2022, par plj

    I join a video and data where I copy the video from the vid1.ts along with the data (klv) from the vid2.ts :

    


    ffmpeg -y -i vid1.ts -i vid2.ts -c copy -map 0:0 -map 1:2 -shortest full_exclude.ts

    


    When I probe the resulting video I see that the packets don't line up :

    


    ffprobe -show_packets full_exclude.ts

    


    The 1st data packet is :

    


    [PACKET]
codec_type=data
stream_index=1
pts=126000
pts_time=1.400000
dts=126000
dts_time=1.400000
duration=N/A
duration_time=N/A
size=324
pos=564
flags=K_
[SIDE_DATA]
side_data_type=MPEGTS Stream ID
id=252
[/SIDE_DATA]
[/PACKET]


    


    The 1st video packet is :

    


    [PACKET]
codec_type=video
stream_index=0
pts=341392
pts_time=3.793244
dts=341392
dts_time=3.793244
duration=N/A
duration_time=N/A
size=9270
pos=28952
flags=K_
[SIDE_DATA]
side_data_type=MPEGTS Stream ID
id=224
[/SIDE_DATA]
[/PACKET]
[PACKET]


    


    How do I get the data and video in sync with each other ?

    


  • how to set nVidia video bitrate in a system service ?

    12 septembre 2021, par qycx

    I use an nvidia card for compression and decompression in a video conferencing software. The program uses ffmpeg. The program is a system service. Need to control the bit rate. But I found that I didn't control it. The setting code rate was 700k, and the actual value was 10M. What went wrong ?

    


    /* put sample parameters */
    pUnit->encV_var.c->bit_rate = bitrate;//400000;
    /* resolution must be a multiple of two */
    pUnit->encV_var.c->width = in_w;//352;
    pUnit->encV_var.c->height = in_h;//288;
    pUnit->encV_var.c->qmin=10;
    pUnit->encV_var.c->qmax=30;
    /* frames per second */
    AVRational t1={1,25};
    t1.den=fps;
    pUnit->encV_var.c->time_base = t1;//(AVRational){1, 25};
    AVRational t2={25,1};
    t2.num=fps;
    pUnit->encV_var.c->framerate = t2;//(AVRational){25, 1};

    /* emit one intra frame every ten frames
     * check frame pict_type before passing frame
     * to encoder, if frame->pict_type is AV_PICTURE_TYPE_I
     * then gop_size is ignored and the output of encoder
     * will always be I frame irrespective to gop_size
     */
    pUnit->encV_var.c->gop_size = 256;//10;
    pUnit->encV_var.c->max_b_frames = 0;//1;
    pUnit->encV_var.c->pix_fmt = AV_PIX_FMT_YUV420P;


    


  • how to improve image quality when I write c++ using ffmpeg( avcodec)

    6 septembre 2021, par qycx

    I am writing a c++ program, using ffmpeg to encode video.
but the image quality is very bad.
can you help me to improve the video quality ?

    


    following is my code :

    


        pUnit->encV_var.pkt = av_packet_alloc();
    if (!pUnit->encV_var.pkt) {
        goto errLabel;
    }

    /* put sample parameters */
    pUnit->encV_var.c->bit_rate = bitrate;//400000;
    pUnit->encV_var.c->rc_max_rate=bitrate;
    pUnit->encV_var.c->rc_min_rate=bitrate;
    AVCodecContext *c=pUnit->encV_var.c;
    int br = bitrate;
    c->bit_rate_tolerance = br;
c->rc_buffer_size=br;
c->rc_initial_buffer_occupancy = c->rc_buffer_size*3/4;
//c->rc_buffer_aggressivity= (float)1.0;
//c->rc_initial_cplx= 0.5; 



    /* resolution must be a multiple of two */
    pUnit->encV_var.c->width = in_w;//352;
    pUnit->encV_var.c->height = in_h;//288;
    /* frames per second */
    AVRational t1={1,25};
    t1.den=fps;
    pUnit->encV_var.c->time_base = t1;//(AVRational){1, 25};
    AVRational t2={25,1};
    t2.num=fps;
    pUnit->encV_var.c->framerate = t2;//(AVRational){25, 1};

    /* emit one intra frame every ten frames
     * check frame pict_type before passing frame
     * to encoder, if frame->pict_type is AV_PICTURE_TYPE_I
     * then gop_size is ignored and the output of encoder
     * will always be I frame irrespective to gop_size
     */
    pUnit->encV_var.c->gop_size = 256;//10;
    pUnit->encV_var.c->max_b_frames = 0;//1;
    pUnit->encV_var.c->pix_fmt = AV_PIX_FMT_YUV420P;

    //
    pUnit->encV_var.c->flags|=AV_CODEC_FLAG_GLOBAL_HEADER;

    //
    if (codec_id == AV_CODEC_ID_H264) {
        int ret;
        ret = av_opt_set(pUnit->encV_var.c->priv_data, "preset", "fast", 0);
        //ret = av_opt_set(pUnit->encV_var.c->priv_data, "preset", "slow", 0);
        //ret = av_opt_set(pUnit->encV_var.c->priv_data, "preset", "medium", 0);

        //
        ret = av_opt_set(pUnit->encV_var.c->priv_data, "tune","zerolatency",0);

        //
        ret = av_opt_set(pUnit->encV_var.c->priv_data, "profile","main",0);

    }

    /* open it */
    ret = avcodec_open2(pUnit->encV_var.c, pUnit->encV_var.codec, NULL);
   


    


    please help me to improve image quality

    


    mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm