OpenCV Video Write Problem

I’ve been trying to write the infered frames to a mp4 file on a TX2. However even if the output video appears in the output folder it is not playable neither on TX2 or my PC. I can run the same python script on my pc and obtain the output mp4.

self.fourcc = 'mp4v'
...
self.vid_writer = cv2.VideoWriter(save_path, cv2.VideoWriter_fourcc(*(self.fourcc)), frame_thres[1], (vid_width,vid_height))
self.vid_writer.write(im0)

Already tried proposed solutions at:
https://devtalk.nvidia.com/default/topic/1029451/jetson-tx2/-python-what-is-the-four-characters-fourcc-code-for-mp4-encoding-on-tx2/post/5237323/#5237323

Hi,
Please refer to this post:
https://devtalk.nvidia.com/default/topic/1061384/jetson-nano/cv2-videowriter-doesn-t-work-well-on-jetson-nano/post/5374790/#5374790

Didnt work. Issue solved by recompiling OpenCV. Was using the one set by SDK manager.