Skip to content

Commit 7e64009

Browse files
Video can be saved without render_pose
1 parent b44b83c commit 7e64009

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

include/openpose/wrapper/wrapper.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ namespace op
456456
__LINE__, __FUNCTION__, __FILE__);
457457
if (!renderOutput && (!wrapperStructOutput.writeImages.empty() || !wrapperStructOutput.writeVideo.empty()))
458458
{
459-
const auto message = "In order to save the rendered frames (`write_images` or `write_video`), you must"
460-
" set `render_output` to true.";
461-
error(message, __LINE__, __FUNCTION__, __FILE__);
459+
const auto message = "In order to save the rendered frames (`write_images` or `write_video`), you"
460+
" cannot disable `render_pose`.";
461+
log(message, Priority::High);
462462
}
463463
if (!wrapperStructOutput.writeHeatMaps.empty() && wrapperStructPose.heatMapTypes.empty())
464464
{

src/openpose/filestream/videoSaver.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
namespace op
44
{
5-
VideoSaver::VideoSaver(const std::string& videoSaverPath, const int cvFourcc, const double fps, const Point<int>& cvSize) :
5+
VideoSaver::VideoSaver(const std::string& videoSaverPath, const int cvFourcc, const double fps,
6+
const Point<int>& cvSize) :
67
VideoSaver::VideoSaver{std::vector<std::string>{videoSaverPath}, cvFourcc, fps, cvSize}
78
{
89
}
910

10-
VideoSaver::VideoSaver(const std::vector<std::string>& videoSaverPaths, const int cvFourcc, const double fps, const Point<int>& cvSize)
11+
VideoSaver::VideoSaver(const std::vector<std::string>& videoSaverPaths, const int cvFourcc, const double fps,
12+
const Point<int>& cvSize)
1113
{
1214
try
1315
{
@@ -23,8 +25,10 @@ namespace op
2325

2426
if (!mVideoWriters.crbegin()->isOpened())
2527
{
26-
const std::string errorMessage{"Video to write frames could not be opened on " + videoSaverPath + ". Please, "
27-
"check OpenCV is properly compiled with the FFmpeg codecs in order to save video."};
28+
const std::string errorMessage{"Video to write frames could not be opened as `" + videoSaverPath
29+
+ "`. Please, check that:\n\t1. The path ends in *.avi."
30+
"\n\t2. OpenCV is properly compiled with the FFmpeg codecs in"
31+
" order to save video."};
2832
error(errorMessage, __LINE__, __FUNCTION__, __FILE__);
2933
}
3034
}

0 commit comments

Comments
 (0)