Skip to content

Commit 7b90b3f

Browse files
committed
clean up
1 parent 02174f5 commit 7b90b3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

demo_video.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def process_frame(frame, body=True, hands=True):
3030
canvas = util.draw_handpose(canvas, all_hand_peaks)
3131
return canvas
3232

33-
# writing video with ffmpeg
33+
# writing video with ffmpeg because cv2 writer failed
3434
# https://stackoverflow.com/questions/61036822/opencv-videowriter-produces-cant-find-starting-number-error
3535
import ffmpeg
3636

@@ -55,7 +55,6 @@ def to8(img):
5555
assert len(video_file.split(".")) == 2, \
5656
"file/dir names must not contain extra ."
5757
output_file = video_file.split(".")[0]+".processed.avi"
58-
# fourcc = cv2.VideoWriter_fourcc(*'XVID')
5958

6059

6160
class Writer():
@@ -68,6 +67,7 @@ def __init__(self, output_file, input_fps, input_framesize, gray=False):
6867
format='rawvideo',
6968
pix_fmt='gray' if gray else 'rgb24',
7069
s='%sx%s'%(input_framesize[1],input_framesize[0]))
70+
.filter('fps', fps=input_fps, round='up')
7171
.output(output_file, pix_fmt='yuv420p')
7272
.run_async(pipe_stdin=True)
7373
)

0 commit comments

Comments
 (0)