Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit b771600

Browse files
committed
Fix anti-pattern flagged in vid_stab.by
1 parent 757e3eb commit b771600

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎Scripts/Miscellaneous/video_stabilization/vid_stab.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
x = bytearray(vectors)
2121

22-
f=open(original_path, 'wb')
23-
f.write(x)
24-
f.close()
22+
withopen(original_path, 'wb')asf:
23+
f.write(x)
24+
f.close()
2525

2626
os.system('ffmpeg -loglevel panic -i ' + infile + ' -vf vidstabtransform=input='+ original_path +':smoothing='+smoothing+':crop=keep,unsharp=5:5:0.8:3:3:0.4 -vcodec libx264 -preset slow -tune film -crf 18 -acodec copy ' + outfile )
2727

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /