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))

Already tried proposed solutions at:

Please refer to this post:

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