Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload 50M vedio(1080p) ,but throw Past duration 0.796791 too large #18

Open
firma opened this issue Nov 8, 2021 · 0 comments
Open

Comments

@firma
Copy link

firma commented Nov 8, 2021

configure info : config.yaml

---
run_local: true #Set this to true if you are running locally, false if you have configured the Google buckets and algorithmia code. 
gpu: true #Set this to true if you want to use the GPU
trim-video: false #Set this to false if you want to process full video
trim-video-length: 3600 #Max number of seconds you want to trim the video from start
original_frame_rate: false #If False output_frame_rate will be used else original video detected frame rate will be used, if no metadata found will use output_frame_rate  
output_frame_rate: '24/1' #Set the output frame rate, if original resolution
colab-mode: true #Set true if you are executing in colab mode
original_resolution: true # Set to true if you don't want to resize the original video
resize-dim: 720 #The width of the video will be resized to specified number maintaining aspect ratio

modify templates/index_cartoonized.html check max_file_size

  const fsize = fi.files.item(i).size; 
                const file = Math.round((fsize / 1024)); 
                // The size of the file.
                //Change the max_file_size as per your need 
                const max_file_size = 33330720;

error info:

ov/2021 13:22:07] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/emma2.jpg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/emma2_cartoonized.jpg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/spice.jpeg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/cake.jpeg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/spice_cartoonized.jpeg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/cake_cartoonized.jpeg HTTP/1.1" 200 -
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 131, in wrapper
    return f(self, stream, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 253, in _parse_multipart
    form, files = parser.parse(stream, boundary, content_length)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 584, in parse
    return self.cls(form), self.cls(files)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/datastructures.py", line 419, in __init__
    for key, value in mapping or ():
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 582, in <genexpr>
    form = (p[1] for p in formstream if p[0] == "form")
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 537, in parse_parts
    for ellt, ell in self.parse_lines(file, boundary, content_length):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 480, in parse_lines
    for line in iterator:
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 761, in make_line_iter
    for item in _iter_basic_lines():
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 737, in _iter_basic_lines
    new_data = next(_iter, "")
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 681, in _make_chunk_iter
    item = _read(buffer_size)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 943, in read
    return self.on_disconnect()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 911, in on_disconnect
    raise ClientDisconnected()
werkzeug.exceptions.ClientDisconnected: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 73, in cartoonize
    if flask.request.files.get('image'):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/utils.py", line 90, in __get__
    value = self.func(obj)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wrappers/base_request.py", line 514, in files
    self._load_form_data()
  File "/usr/local/lib/python3.7/dist-packages/flask/wrappers.py", line 168, in _load_form_data
    RequestBase._load_form_data(self)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wrappers/base_request.py", line 319, in _load_form_data
    self._get_stream_for_parsing(), mimetype, content_length, options
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 232, in parse
    return parse_func(self, stream, mimetype, content_length, options)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 135, in wrapper
    exhaust()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 925, in exhaust
    self.read(chunk)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 943, in read
    return self.on_disconnect()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 911, in on_disconnect
    raise ClientDisconnected()
werkzeug.exceptions.ClientDisconnected: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
None
[2021-11-08 13:27:16,006] ERROR in app: Exception on /cartoonize [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 131, in wrapper
    return f(self, stream, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 253, in _parse_multipart
    form, files = parser.parse(stream, boundary, content_length)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 584, in parse
    return self.cls(form), self.cls(files)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/datastructures.py", line 419, in __init__
    for key, value in mapping or ():
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 582, in <genexpr>
    form = (p[1] for p in formstream if p[0] == "form")
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 537, in parse_parts
    for ellt, ell in self.parse_lines(file, boundary, content_length):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 480, in parse_lines
    for line in iterator:
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 761, in make_line_iter
    for item in _iter_basic_lines():
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 737, in _iter_basic_lines
    new_data = next(_iter, "")
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 681, in _make_chunk_iter
    item = _read(buffer_size)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 943, in read
    return self.on_disconnect()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 911, in on_disconnect
    raise ClientDisconnected()
werkzeug.exceptions.ClientDisconnected: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 73, in cartoonize
    if flask.request.files.get('image'):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/utils.py", line 90, in __get__
    value = self.func(obj)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wrappers/base_request.py", line 514, in files
    self._load_form_data()
  File "/usr/local/lib/python3.7/dist-packages/flask/wrappers.py", line 168, in _load_form_data
    RequestBase._load_form_data(self)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wrappers/base_request.py", line 319, in _load_form_data
    self._get_stream_for_parsing(), mimetype, content_length, options
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 232, in parse
    return parse_func(self, stream, mimetype, content_length, options)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 135, in wrapper
    exhaust()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 925, in exhaust
    self.read(chunk)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 943, in read
    return self.on_disconnect()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 911, in on_disconnect
    raise ClientDisconnected()
werkzeug.exceptions.ClientDisconnected: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "app.py", line 168, in cartoonize
    flash("Our server hiccuped :/ Please upload another file! :)")
  File "/usr/local/lib/python3.7/dist-packages/flask/helpers.py", line 410, in flash
    session['_flashes'] = flashes
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/local.py", line 350, in __setitem__
    self._get_current_object()[key] = value
  File "/usr/local/lib/python3.7/dist-packages/flask/sessions.py", line 101, in _fail
    raise RuntimeError('The session is unavailable because no secret '
RuntimeError: The session is unavailable because no secret key was set.  Set the secret_key on the application to something unique and secret.
127.0.0.1 - - [08/Nov/2021 13:27:16] "POST /cartoonize HTTP/1.1" 500 -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant