Insta360Develop / MediaSDK-Cpp

MediaSDK-Cpp is a C++ library to handle stitching, editing of media from Insta360 Cameras.
59 stars 8 forks source link

SDK gives bad video stitching result #2

Open nickponline opened 3 years ago

nickponline commented 3 years ago

@zhangyabin_nature @capjason I get a very bad result compared to Insta360 Studio. Insta360 gives:

image

Where as using the MediaSDK I get: image

Input videos: https://www.dropbox.com/s/grbomf1vadkbozs/df.zip?dl=0 My code is simply:

std::vector<std::string> input_paths;
input_paths.push_back("VID_20171231_175657_00_002.insv");
input_paths.push_back("VID_20171231_175657_10_002.insv");
std::string output_path = "result.mp4";

STITCH_TYPE stitch_type = STITCH_TYPE::DYNAMICSTITCH;
HDR_TYPE hdr_type = HDR_TYPE::ImageHdr_NONE;

int output_width = 5760;
int output_height = 2880;
int output_bitrate = 40000000;
bool bEnableFlowState = true;

std::string strExt = input_paths[0].substr(input_paths[0].find_last_of(".") + 1);
std::transform(strExt.begin(), strExt.end(), strExt.begin(), ::tolower);
auto videoStitcher = std::make_shared<ins_media::VideoStitcher>();
videoStitcher->SetInputPath(input_paths);
videoStitcher->SetOutputPath(output_path);
videoStitcher->SetStitchType(stitch_type);
videoStitcher->SetOutputSize(output_width, output_height);
videoStitcher->SetOutputBitRate(output_bitrate);
videoStitcher->EnableFlowState(bEnableFlowState);
videoStitcher->SetStitchProgressCallback(process_callback, 0);
videoStitcher->SetStitchStateCallback(error_callback, 0);
videoStitcher->StartStitch();
getchar();
return 0;
Hiroaki-K4 commented 1 year ago

@nickponline Did this issue get resolved?

Tianweihaihaihai commented 1 year ago

would you pls update sdk version to try?