CenterTrack icon indicating copy to clipboard operation
CenterTrack copied to clipboard

Can not open the videos

Open DEEPMINDing opened this issue 3 years ago • 2 comments

I used the fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v') and fourcc = cv2.VideoWriter_fourcc(*'XVID'),But the results video still won't open

DEEPMINDing avatar Sep 24 '21 08:09 DEEPMINDing

I solved the problem by changing video_wh and save_framerate

DEEPMINDing avatar Sep 24 '21 09:09 DEEPMINDing

This worked for me.

Note : create a folder CenterTrack/results

In demo.py file Line 48:

change this

if opt.save_video:
  fourcc = cv2.VideoWriter_fourcc(*'XVID')
  out = cv2.VideoWriter('results/{}.mp4'.format(
  opt.exp_id + '_' + out_name),fourcc, opt.save_framerate, (opt.video_w, opt.video_h))

to this

if opt.save_video:
    fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v')
    out = cv2.VideoWriter('results/{}'.format(
      opt.exp_id + '_' + out_name),fourcc, opt.save_framerate, (
        opt.video_w, opt.video_h))

Use this Command to run

Specify the height and width of video : --video_h 450 --video_w 800 !python src/demo.py tracking,ddd --load_model models/nuScenes_3Dtracking.pth --dataset nuscenes --pre_hm --track_thresh 0.1 --demo videos/nuscenes_mini.mp4 --test_focal_length 633 --video_h 450 --video_w 800 --save_video

RATHOD-SHUBHAM avatar Feb 11 '22 21:02 RATHOD-SHUBHAM