Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mCodecContext= m_outputVideoStream->codec;
- mCodecContext->bit_rate = 500000;
- mCodecContext->width= m_size.width();
- mCodecContext->height= m_size.height();
- mCodecContext->pix_fmt = AV_PIX_FMT_YUV420P;
- mCodecContext->time_base =AVRational{1,31};
- mCodecContext->gop_size= 12; /* emit one intra frame every twelve frames at most */
- //av_opt_set(mCodecContext->priv_data, "preset", "ultrafast", 0);
- av_dict_set(&m_dictionary, "preset","veryslow",0);
- if (m_FormatContext->oformat->flags & AVFMT_GLOBALHEADER)
- mCodecContext->flags |= CODEC_FLAG_GLOBAL_HEADER;
- avcodec_open2(mCodecContext, mCodec, &m_dictionary);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement