Some of our videos in .mp4 format with mono sound downloaded from Cisco Webex staying unencoded for a month. When we convert videos in the .mov format with mono sound works like a charm. Any suggestions.
![Screen Shot 2021-03-09 at 9 25 20 AM](https://user-images.githubusercontent.com/28447079/110514226-5270c680-80c4-11eb-9838-4cfb299c4d13.png)
Internal Server Error: /fu/upload/
Traceback (most recent call last):
File "/home/mediacms.io/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/mediacms.io/lib/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/home/mediacms.io/mediacms/uploader/views.py", line 48, in dispatch
return super(FineUploaderView, self).dispatch(request, *args, **kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/views/generic/base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/views/generic/edit.py", line 142, in post
return self.form_valid(form)
File "/home/mediacms.io/mediacms/uploader/views.py", line 67, in form_valid
new = Media.objects.create(media_file=myfile, user=self.request.user)
File "/home/mediacms.io/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/db/models/query.py", line 447, in create
obj.save(force_insert=True, using=self.db)
File "/home/mediacms.io/mediacms/files/models.py", line 418, in save
super(Media, self).save(*args, **kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/db/models/base.py", line 754, in save
force_update=force_update, update_fields=update_fields)
File "/home/mediacms.io/lib/python3.6/site-packages/django/db/models/base.py", line 803, in save_base
update_fields=update_fields, raw=raw, using=using,
File "/home/mediacms.io/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 179, in send
for receiver in self._live_receivers(sender)
File "/home/mediacms.io/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 179, in
for receiver in self._live_receivers(sender)
File "/home/mediacms.io/mediacms/files/models.py", line 1460, in media_save
instance.media_init()
File "/home/mediacms.io/mediacms/files/models.py", line 490, in media_init
self.encode()
File "/home/mediacms.io/mediacms/files/models.py", line 652, in encode
#if self.video_height and self.video_height < int(profile.resolution or 0):
TypeError: '<' not supported between instances of 'int' and 'NoneType'
Here's the code that generates that error…
else:
for profile in profiles:
if profile.extension != "gif":
if self.video_height and self.video_height < int(profile.resolution or 0): <<<<<<<<HERE
if (
profile.resolution
not in settings.MINIMUM_RESOLUTIONS_TO_ENCODE
):
continue
encoding = Encoding(media=self, profile=profile)
encoding.save()
enc_url = settings.SSL_FRONTEND_HOST + encoding.get_absolute_url()
if profile.resolution in settings.MINIMUM_RESOLUTIONS_TO_ENCODE:
priority = 9
else:
priority = 0
tasks.encode_media.apply_async(
args=[self.friendly_token, profile.id, encoding.id, enc_url],
kwargs={"force": force},
priority=priority,
)
More information:
this is the command thats being ran on the server once the video file is uploaded.
www-data 28524 7078 99 12:35 ? 00:00:18 ffmpeg -y -i /home/mediacms.io/mediacms/media_files/original/user/admin/8101b53cdea84b59bc3f930c5869bb03.1_min_webex.mp4 -c:v libx264 -filter:v scale=-2:720,fps=fps=90 -pix_fmt yuv420p -crf 23 -c:a aac -b:a 128k -ac 2 -maxrate 5250k -bufsize 5250k -force_key_frames expr:gte(t,n_forced4) -x264-params keyint=720:keyint_min=360 -preset faster -profile:v main -level 4.2 -strict -2 /tmp/tmp_g8efv2i/tmp98j9r_sl.mp4
www-data 28526 7079 99 12:35 ? 00:00:25 ffmpeg -y -i /home/mediacms.io/mediacms/media_files/original/user/admin/8101b53cdea84b59bc3f930c5869bb03.1_min_webex.mp4 -c:v libx264 -filter:v scale=-2:1080,fps=fps=90 -pix_fmt yuv420p -crf 23 -c:a aac -b:a 128k -ac 2 -maxrate 11250k -bufsize 11250k -force_key_frames expr:gte(t,n_forced4) -x264-params keyint=720:keyint_min=360 -preset faster -profile:v main -level 4.2 -strict -2 /tmp/tmph4yraciz/tmpzlzo32ai.mp4
And this is debug txt file
Internal Server Error: /fu/upload/
Traceback (most recent call last):
File "/home/mediacms.io/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/mediacms.io/lib/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/home/mediacms.io/mediacms/uploader/views.py", line 48, in dispatch
return super(FineUploaderView, self).dispatch(request, *args, **kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/views/generic/base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/views/generic/edit.py", line 142, in post
return self.form_valid(form)
File "/home/mediacms.io/mediacms/uploader/views.py", line 67, in form_valid
new = Media.objects.create(media_file=myfile, user=self.request.user)
File "/home/mediacms.io/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/db/models/query.py", line 447, in create
obj.save(force_insert=True, using=self.db)
File "/home/mediacms.io/mediacms/files/models.py", line 418, in save
super(Media, self).save(*args, **kwargs)
File "/home/mediacms.io/lib/python3.6/site-packages/django/db/models/base.py", line 754, in save
force_update=force_update, update_fields=update_fields)
File "/home/mediacms.io/lib/python3.6/site-packages/django/db/models/base.py", line 803, in save_base
update_fields=update_fields, raw=raw, using=using,
File "/home/mediacms.io/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 179, in send
for receiver in self._live_receivers(sender)
File "/home/mediacms.io/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 179, in
for receiver in self._live_receivers(sender)
File "/home/mediacms.io/mediacms/files/models.py", line 1460, in media_save
instance.media_init()
File "/home/mediacms.io/mediacms/files/models.py", line 490, in media_init
self.encode()
File "/home/mediacms.io/mediacms/files/models.py", line 652, in encode
#if self.video_height and self.video_height < int(profile.resolution or 0):
TypeError: '<' not supported between instances of 'int' and 'NoneType'