My cv2 code is printing the terminal message to the Jupyter
Missing reference picture, default is 0
decode_slice_header error
I understand that the problem might be because of the video file but I just want to hide this message so I can export the a clean output from Jupyter to my client
The log above seem not effect anything on my processing.
Sample of my code.
cap = cv2.VideoCapture(video_path)
cap.set(cv2.CAP_PROP_POS_FRAMES, frame_index)
ret, frame = cap.read()
I tried capture
and redirect_stdout
. But it seem to work with only print not the terminal.
Honestly, I am not sure where is message come from whether the cv2 print it? or ffmpeg print it? or Jupyter capture it from terminal. But what I want to now is just hiding it.
Can someone suggest me the best approach for this?