Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (33)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

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

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

Sur d’autres sites (2738)

  • What is the commmand line to record destop screen with watermark using ffmpeg ?

    11 septembre 2020, par Yong Ju

    I tried to record screen using ffmpeg commmand line. So, I have complete it using this commmand.
ffmpeg.exe -rtbufsize 1500M -f -y -rtbufsize 100M -f gdigrab -t 00:02:00 -framerate 30 0 0 -probesize 10M 1920 1080 -draw_mouse 1 -i desktop -c:v libx264 -r 30 -preset ultrafast -tune zerolatency -crf 30 -pix_fmt yuv420p output.avi".

    


    Now, I want to add watermark while recording video.
If you have good experience this field, Please give me good advice.
Thanks for your attention.
Sincerely.

    


  • i am trying to record internal audio and screen using ffmpeg. but the video is lagging [closed]

    13 septembre 2020, par super computer

    ffmpeg -rtbufsize 1500M -f dshow -i audio="Stereo Mix (Realtek High Definition Audio)" -f -y -rtbufsize 100M -f gdigrab -t 00:20:00 -framerate 20 -probesize 10M -draw_mouse 1 -i desktop -c:v libx264 -r 20 -preset ultrafast -tune zerolatency -crf 25 -pix_fmt yuv420p "P :/myvideo.mp4"

    


  • ffmpeg record change color

    17 mars 2016, par Антон Михайлов

    Im try record video from screen, for write to video file im use ffmpeg(libavcodec). But on result i see other colors, my example :

    AVCodec *codec;
    AVCodecContext *c= NULL;
    AVStream *video_stream;
    AVOutputFormat *out;
    AVFormatContext *out_context;
    int i, ret, x, y, got_output;

    AVFrame *frame;
    AVPacket pkt;
    uint8_t endcode[] = { 0, 0, 1, 0xb7 };

    printf("Encode video file %s\n", filename);

    out = av_guess_format(NULL, filename, NULL);
    if (!out) {
       std::cout << "Could not deduce output format from file extension: using MPEG.\n" << filename << std::endl;
       out = av_guess_format("mpeg", filename, NULL);
    }

    if (!out) {
       std::cout << "Could not find suitable output format\n" << std::endl;
       return;
    }

    out->video_codec = (AVCodecID)codec_id;

    out_context = avformat_alloc_context();
    if (!out_context) {
       std::cout << "Memory error\n";
       return;
    }

    out_context->oformat = out;

    codec = avcodec_find_encoder((AVCodecID)codec_id);
    if (!codec) {
       fprintf(stderr, "Codec not found\n");
       exit(1);
    }

    video_stream = avformat_new_stream(out_context, codec);
    if (!video_stream) {
       std::cout << "Could not alloc stream\n";
       return;
    }

    c = video_stream->codec;
    if (!c) {
       fprintf(stderr, "Could not allocate video codec context\n");
       exit(1);
    }

    c->bit_rate = 20000000;

    c->width = rect_width;
    c->height = rect_height;

    c->time_base = (AVRational){1,25};
    c->gop_size = 10;
    c->max_b_frames = 1;
    c->pix_fmt = AV_PIX_FMT_YUV420P;

    if (codec_id == AV_CODEC_ID_H264)
       av_opt_set(c->priv_data, "preset", "slow", 0);

    if (avcodec_open2(c, codec, NULL) < 0) {
       fprintf(stderr, "Could not open codec\n");
       exit(1);
    }

    avio_open2(&out_context->pb, filename, AVIO_FLAG_WRITE, NULL, NULL );

    avformat_write_header(out_context, 0);

    frame = av_frame_alloc();
    if (!frame) {
       fprintf(stderr, "Could not allocate video frame\n");
       exit(1);
    }
    frame->format = c->pix_fmt;
    frame->width  = c->width;
    frame->height = c->height;

    ret = av_image_alloc(frame->data, frame->linesize, c->width, c->height,
                        c->pix_fmt, 32);
    if (ret < 0) {
       fprintf(stderr, "Could not allocate raw picture buffer\n");
       exit(1);
    }

    fprintf(stderr, "*0\n");

    SwsContext *m_imageConvertContext = 0;

    fprintf(stderr, "*0.1\n");

    printf("size %3d %5d\n", rect_width, rect_height);

    if ((rect_width % 4 != 0 && rect_width % 8 != 0 && rect_width % 16 != 0)
           || (rect_height % 4 != 0 && rect_height % 8 != 0 && rect_height % 16 != 0)) {
       fprintf(stderr, "Video size dimensions must be multiple of 4,8 or 16.");
       return;
    }

    m_imageConvertContext = sws_getCachedContext(m_imageConvertContext, frame->width, frame->height,AV_PIX_FMT_0RGB32, frame->width, frame->height, c->pix_fmt, SWS_BILINEAR, NULL, NULL, NULL);

    fprintf(stderr, "*0.2\n");

    int pts = 0;

    for (i = 0; i < 25 * 20; i++) {

       QImage image = QGuiApplication::primaryScreen()->grabWindow(0, rect_x, rect_y, rect_width, rect_height).toImage().convertToFormat(QImage::Format_RGB32);


       pts ++;

       av_init_packet(&pkt);
       pkt.data = NULL;    // packet data will be allocated by the encoder
       pkt.size = 0;
       fflush(stdout);

       uint8_t *srcplanes[AV_NUM_DATA_POINTERS];
       srcplanes[0]=(uint8_t*)image.bits();
       srcplanes[1]=0;
       srcplanes[2]=0;
       srcplanes[3]=0;
       srcplanes[4]=0;
       srcplanes[5]=0;
       srcplanes[6]=0;
       srcplanes[7]=0;

       int srcstride[AV_NUM_DATA_POINTERS];
       srcstride[0]=image.bytesPerLine();
       srcstride[1]=0;
       srcstride[2]=0;
       srcstride[3]=0;
       srcstride[4]=0;
       srcstride[5]=0;
       srcstride[6]=0;
       srcstride[7]=0;

       int res = sws_scale(m_imageConvertContext, srcplanes, srcstride, 0,frame->height, frame->data, frame->linesize);

       frame->pts = pts;
       ret = avcodec_encode_video2(c, &pkt, frame, &got_output);
       if (ret < 0) {
           fprintf(stderr, "Error encoding frame\n");
           exit(1);
       }
       if (got_output) {
           printf("Write frame %3d (size=%5d)\n", i, pkt.size);
           av_write_frame(out_context,&pkt);
           av_free_packet(&pkt);
       }
    }

    for (got_output = 1; got_output; i++) {
       fflush(stdout);
       ret = avcodec_encode_video2(c, &pkt, NULL, &got_output);
       if (ret < 0) {
           fprintf(stderr, "Error encoding frame\n");
           exit(1);
       }
       if (got_output) {
           printf("Write frame %3d (size=%5d)\n", i, pkt.size);
           av_interleaved_write_frame(out_context, &pkt);
           av_free_packet(&pkt);
       }
    }

    av_write_trailer(out_context);
    avio_close(out_context->pb);
    avcodec_close(c);

    av_free(c);
    av_freep(&frame->data[0]);
    av_frame_free(&frame);

    resolution 1920x1080. On original display look this http://joxi.ru/p27bbn6u093elm

    on save video colors is a dimmer http://joxi.ru/YmE99W1fZvbdWm

    It seems, white background color changes to gray. Or may be it is brightness. What im do is wrong ? How i can save to color ?

    UDP

    im try use

    int *inv_table, srcRange, *table, dstRange , brightness, contrast, saturation;

    int ret = sws_getColorspaceDetails(m_imageConvertContext, &inv_table, &srcRange, &table, &dstRange, &brightness, &contrast, &saturation);

    sws_setColorspaceDetails(m_imageConvertContext, sws_getCoefficients(SWS_CS_DEFAULT), srcRange, sws_getCoefficients(SWS_CS_ITU709), dstRange, brightness, contrast, saturation);

    but this is never change