Advertisement
Guest User

Untitled

a guest
Aug 17th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. mCodecContext= m_outputVideoStream->codec;
  2. mCodecContext->bit_rate = 500000;
  3. mCodecContext->width= m_size.width();
  4. mCodecContext->height= m_size.height();
  5. mCodecContext->pix_fmt = AV_PIX_FMT_YUV420P;
  6. mCodecContext->time_base =AVRational{1,31};
  7. mCodecContext->gop_size= 12; /* emit one intra frame every twelve frames at most */
  8. //av_opt_set(mCodecContext->priv_data, "preset", "ultrafast", 0);
  9. av_dict_set(&m_dictionary, "preset","veryslow",0);
  10. if (m_FormatContext->oformat->flags & AVFMT_GLOBALHEADER)
  11. mCodecContext->flags |= CODEC_FLAG_GLOBAL_HEADER;
  12. avcodec_open2(mCodecContext, mCodec, &m_dictionary);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement