Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (53)

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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (9039)

  • Specify timestamp in ffmpeg video segment command

    25 mars 2019, par Soumya

    I have a continuous RTSP stream coming from a camera over the network.
    I want to dump the stream but in video files of length 1 min each.

    I an using the following command

    ffmpeg -i "rtsp://user:pass@example.com"  -f mp4 -r 12 -s 640x480 -ar 44100 \
    -ac 1 -segment_time 60 -segment_format mp4 "out%03d.mp4"

    The name of the files being created are of the form out001.mp4, out002.mp4, etc.

    I want to include the timestamp (hour and minute) in the name of the file segments eg. 09-30.mp4, 09-31.mp4, etc.

    If it is mandatory to provide a serial number for the segment, is it possible to get something like 09-30-001.mp4, 09-31-002.mp4 ?

  • Set H264 high quality encoding in FFMPEG

    25 décembre 2015, par hiitiger

    I’m working on a function, using ffmpeg to encode a serial images to a MP4 file.
    I use H264 codec, and want to have a high quality output.

    Other things now goes well, but the video quality looks obvious loss.

    After some Google, I set codec context like this

    video_st = avformat_new_stream(oc, 0);
    ....
    pVideoCodec  = avcodec_find_encoder(fmt->video_codec); //AV_CODEC_ID_H264
    ....
    avcodec_get_context_defaults3(video_st->codec, pVideoCodec);
    video_st->codec->codec_id =  fmt->video_codec;
    video_st->codec->width = m_outWidth;
    video_st->codec->height = m_outHeight;
    video_st->codec->time_base.den = m_fps;
    video_st->codec->time_base.num = 1;
    video_st->codec->pix_fmt = AV_PIX_FMT_YUV420P;

    AVDictionary *param = nullptr;
    av_dict_set(&param, "qp", "0", 0);
    av_dict_set(&param, "preset", "medium", 0);

    I also try to set bit_rate. But all turned out to be bad.

    I want a visually loss less output video.

    So what parameters should I set or anything else did I missed ?

  • How to understand the given ffplay C code snippet ?

    20 juillet 2015, par Jerikc XIONG

    The following code snippet is from ffplay :

    static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
       int got_frame = 0;

       do {
           int ret = -1;

           if (d->queue->abort_request)
               return -1;

           if (!d->packet_pending || d->queue->serial != d->pkt_serial) {
               AVPacket pkt;
               do {
                   if (d->queue->nb_packets == 0)
                       SDL_CondSignal(d->empty_queue_cond);
                   if (packet_queue_get(d->queue, &pkt, 1, &d->pkt_serial) < 0)
                       return -1;
                   if (pkt.data == flush_pkt.data) {
                       avcodec_flush_buffers(d->avctx);
                       d->finished = 0;
                       d->next_pts = d->start_pts;
                       d->next_pts_tb = d->start_pts_tb;
                   }
               } while (pkt.data == flush_pkt.data || d->queue->serial != d->pkt_serial);
               av_free_packet(&d->pkt);
               d->pkt_temp = d->pkt = pkt;
               d->packet_pending = 1;
           }

           switch (d->avctx->codec_type) {
               case AVMEDIA_TYPE_VIDEO:
                   ret = avcodec_decode_video2(d->avctx, frame, &got_frame, &d->pkt_temp);
                   if (got_frame) {
                       if (decoder_reorder_pts == -1) {
                           frame->pts = av_frame_get_best_effort_timestamp(frame);
                       } else if (decoder_reorder_pts) {
                           frame->pts = frame->pkt_pts;
                       } else {
                           frame->pts = frame->pkt_dts;
                       }
                   }
                   break;
               case AVMEDIA_TYPE_AUDIO:
                   ret = avcodec_decode_audio4(d->avctx, frame, &got_frame, &d->pkt_temp);
                   if (got_frame) {
                       AVRational tb = (AVRational){1, frame->sample_rate};
                       if (frame->pts != AV_NOPTS_VALUE)
                           frame->pts = av_rescale_q(frame->pts, d->avctx->time_base, tb);
                       else if (frame->pkt_pts != AV_NOPTS_VALUE)
                           frame->pts = av_rescale_q(frame->pkt_pts, av_codec_get_pkt_timebase(d->avctx), tb);
                       else if (d->next_pts != AV_NOPTS_VALUE)
                           frame->pts = av_rescale_q(d->next_pts, d->next_pts_tb, tb);
                       if (frame->pts != AV_NOPTS_VALUE) {
                           d->next_pts = frame->pts + frame->nb_samples;
                           d->next_pts_tb = tb;
                       }
                   }
                   break;
               case AVMEDIA_TYPE_SUBTITLE:
                   ret = avcodec_decode_subtitle2(d->avctx, sub, &got_frame, &d->pkt_temp);
                   break;
           }

           if (ret < 0) {
               d->packet_pending = 0;
           } else {
               d->pkt_temp.dts =
               d->pkt_temp.pts = AV_NOPTS_VALUE;
               if (d->pkt_temp.data) {
                   if (d->avctx->codec_type != AVMEDIA_TYPE_AUDIO)
                       ret = d->pkt_temp.size;
                   d->pkt_temp.data += ret;
                   d->pkt_temp.size -= ret;
                   if (d->pkt_temp.size <= 0)
                       d->packet_pending = 0;
               } else {
                   if (!got_frame) {
                       d->packet_pending = 0;
                       d->finished = d->pkt_serial; // FLAG
                   }
               }
           }
       } while (!got_frame && !d->finished);

       return got_frame;
    }

    It’s difficult for me to understand the following code :

    d->finished = d->pkt_serial; // FLAG

    Can anyone help me ?

    Thanks.