diff options
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
| -rw-r--r-- | rotord/src/libavwrapper.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp index e70fddc..225d01e 100644 --- a/rotord/src/libavwrapper.cpp +++ b/rotord/src/libavwrapper.cpp @@ -207,15 +207,16 @@ bool libav::exporter::record(std::string filename){ video_st->codec->gop_size = 75; /* emit one intra frame every 75 frames */ video_st->codec->pix_fmt = PIX_FMT_YUV420P; - cerr<<"Libav::exporter setting bitrate to "<<bitRate<<endl; + if (bitRate){ + cerr<<"Libav::exporter setting bitrate to "<<bitRate<<endl; + video_st->codec->bit_rate = bitRate; //need to deal with resolution etc + video_st->codec->rc_max_rate = bitRate; + video_st->codec->rc_min_rate = 0; - video_st->codec->bit_rate = bitRate; //need to deal with resolution etc - video_st->codec->rc_max_rate = bitRate; - video_st->codec->rc_min_rate = 0; - - //added 131113 - video_st->codec->rc_buffer_size = bitRate * 2; + //added 131113 + video_st->codec->rc_buffer_size = bitRate * 2; + } //av_dict_set(&options, "profile", "baseline", 0); //video_st->codec->flags2 = CODEC_FLAG2_FASTPSKIP; |
