File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ def get_projection(
187187 '-'
188188 ]
189189
190- # print('cmd', command)
190+ # print('cmd: ', ' '.join( command) )
191191 pipe = sp .Popen (
192192 command ,
193193 stdin = sp .PIPE ,
@@ -196,6 +196,8 @@ def get_projection(
196196 )
197197
198198 pipe .stdin .write (frame .tobytes ())
199+ try : pipe .stdin .close ()
200+ except : pass
199201 projection = np .frombuffer (
200202 pipe .stdout .read (config ['parameter' ]['width' ] * width_factor * config ['parameter' ]['height' ] * height_factor * 3 ),
201203 dtype = 'uint8'
@@ -336,6 +338,7 @@ def get_frame(
336338 '-ss' , str (seek ),
337339 '-hwaccel' , 'auto' ,
338340 '-i' , video_path ,
341+ '-vframes' , '1' ,
339342 '-f' , 'image2pipe' ,
340343 '-pix_fmt' , 'bgr24' ,
341344 '-vsync' , 'passthrough' ,
@@ -345,6 +348,7 @@ def get_frame(
345348 '-'
346349 ]
347350
351+ # print('cmd:', ' '.join(command))
348352 pipe = sp .Popen (
349353 command ,
350354 stdout = sp .PIPE ,
You can’t perform that action at this time.
0 commit comments