strip whitespace from ffprobe output (#386)

This commit is contained in:
Terrance Wang authored and GitHub committed 2022-09-10 15:37:23 -07:00
1 parent 16d02d4c21
commit f34a27511f
1 file changed
+2
+2
View File
@@ -110,6 +110,8 @@ def convert_video_to_images(
-show_entries stream=nb_read_packets -of csv=p=0 {video_path}"
output = run_command(cmd, verbose=False)
assert output is not None
output = output.strip(" ,\t\n\r")
num_frames = int(output)
print("Number of frames in video:", num_frames)