allow user to specify bitrate of stego video
This commit is contained in:
parent
6faa2c0ae0
commit
c83a0716c1
@ -57,6 +57,10 @@ Positional<std::string> src {
|
||||
parser, "path", "source video file path",
|
||||
};
|
||||
|
||||
ValueFlag<int32_t> bitrate {
|
||||
parser, "bitrate", "bitrate of stego video", {"bitrate"}, 5000*1000,
|
||||
};
|
||||
|
||||
// from stdin
|
||||
std::vector<std::vector<int32_t>> indices;
|
||||
|
||||
@ -177,11 +181,11 @@ static void Exec() {
|
||||
Enforce(0 == WelsCreateSVCEncoder(&enc), "encoder creation failure");
|
||||
|
||||
SEncParamBase encp = {};
|
||||
encp.iUsageType = SCREEN_CONTENT_REAL_TIME;
|
||||
encp.iUsageType = CAMERA_VIDEO_REAL_TIME;
|
||||
encp.fMaxFrameRate = fps;
|
||||
encp.iPicWidth = w;
|
||||
encp.iPicHeight = h;
|
||||
encp.iTargetBitrate = 5000000;
|
||||
encp.iTargetBitrate = args::get(param::bitrate);
|
||||
Enforce(0 == enc->Initialize(&encp), "encoder init failure");
|
||||
|
||||
int enclv = WELS_LOG_INFO;
|
||||
|
Loading…
x
Reference in New Issue
Block a user