You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System / Platform => Linux ubuntu 14.04 LTS
Compiler => gcc 4.8,4
Detailed description
I found this strange behavior in cv::VideoWriter class. When I wanted to open a video to write, if the video file name contains character ':', e.g. "abc:8:00.avi" application got crashed and the error report was not very clear. The weird thing was if I insert some special charcter like '_' (underscore) the problem would solve, for example: a_bc:8
I think VideoWriter should handle these namings or at least warn its user about this problem at opening video.
The text was updated successfully, but these errors were encountered:
System information (version)
OpenCV => 3.1.0
Operating System / Platform => Linux ubuntu 14.04 LTS
Compiler => gcc 4.9.4
I tried to reproduce the issue with VideoWriter Class.But the application did not crash but works as expected as it saves with characters .Could you please share more details or sample code where you got this issue.
Thanks for your investigation. I ran this piece of code and got:
Could not open video for writing
int main() {
cv::VideoCapture vc("vid.mp4");
if(vc.isOpened() == false) {
std::cerr << "Could not open video" << std::endl;
return 1;
}
cv::Mat frame;
vc.read(frame);
cv::VideoWriter vw("test:23.mp4", CV_FOURCC('H', '2', '6', '4'), 25, frame.size());
if(vw.isOpened() == false) {
std:: cerr << "Could not open video for writing" << std::endl;
return 1;
}
vw.write(frame);
while(vc.read(frame))
vw.write(frame);
vw.release();
std::cout << "everything is fine" << std::endl;
return 0;
}
Right now with OpenCV 3.2 and Ubuntu 16.04 it behaves much better! It just doesn't write anything and doesn't crash. But why it can't write with this type of naming?
System information (version)
Detailed description
I found this strange behavior in cv::VideoWriter class. When I wanted to open a video to write, if the video file name contains character ':', e.g. "abc:8:00.avi" application got crashed and the error report was not very clear. The weird thing was if I insert some special charcter like '_' (underscore) the problem would solve, for example: a_bc:8
I think VideoWriter should handle these namings or at least warn its user about this problem at opening video.
The text was updated successfully, but these errors were encountered: