Skip to content

Commit caa552c

Browse files
committed
Revert "Video file limit"
This reverts commit dc26555.
1 parent dc26555 commit caa552c

File tree

4 files changed

+10
-31
lines changed

4 files changed

+10
-31
lines changed

superannotate/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ def dump_output(output_dir, platform, classes, files_dict):
244244
save_desktop_format(output_dir, classes, files_dict)
245245

246246

247-
MAX_VIDEO_SIZE = 5 * 1024 * 1024 * 1024 # 5 GB limit
248247
MAX_IMAGE_SIZE = 100 * 1024 * 1024 # 100 MB limit
249248
MAX_IMAGE_RESOLUTION = {
250249
"Vector": 100_000_000,

superannotate/db/projects.py

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ def upload_video_to_project(
233233
:rtype: list of strs
234234
"""
235235
logger.info("Uploading from video %s.", str(video_path))
236-
file_size = Path(video_path).stat().st_size
237-
if file_size > common.MAX_VIDEO_SIZE:
238-
raise SAVideoSizeTooLarge(file_size)
239236
rotate_code = None
240237
try:
241238
meta_dict = ffmpeg.probe(str(video_path))
@@ -416,23 +413,15 @@ def upload_videos_from_folder_to_project(
416413

417414
filenames = []
418415
for path in filtered_paths:
419-
try:
420-
filename = upload_video_to_project(
421-
project,
422-
path,
423-
target_fps=target_fps,
424-
start_time=start_time,
425-
end_time=end_time,
426-
annotation_status=annotation_status,
427-
image_quality_in_editor=image_quality_in_editor
428-
)
429-
except Exception as e:
430-
logger.warning(
431-
"Couldn't upload video %s. Exception: ", path, str(e)
432-
)
433-
pass
434-
else:
435-
filenames += filename
416+
filenames += upload_video_to_project(
417+
project,
418+
path,
419+
target_fps=target_fps,
420+
start_time=start_time,
421+
end_time=end_time,
422+
annotation_status=annotation_status,
423+
image_quality_in_editor=image_quality_in_editor
424+
)
436425

437426
return filenames
438427

superannotate/exceptions.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@ def __init__(self, file_size, file_name=""):
2525
)
2626

2727

28-
class SAVideoSizeTooLarge(SABaseException):
29-
def __init__(self, file_size, file_name=""):
30-
super().__init__(
31-
0, "Video " + file_name + " size " + str(file_size // 1024**3) +
32-
" GB is larger than " + str(common.MAX_VIDEO_SIZE // 1024**3) +
33-
" GB limit."
34-
)
35-
36-
3728
class SAExistingProjectNameException(SABaseException):
3829
pass
3930

superannotate/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.5.5b1"
1+
__version__ = "2.5.4"

0 commit comments

Comments
 (0)