Commit e8f7cc25 authored by Ilya Simonov's avatar Ilya Simonov

add logs for generate_thumbnail

parent afa111ce
......@@ -35,11 +35,14 @@ def handle_uploaded_file(f, file_name):
def generate_thumbnail(video_path, video_name):
clip = VideoFileClip(video_path)
print('get clip successfully!')
thumbnail_name = video_name.split('.')[0]
thumbnail_name = f'{settings.DOMAIN_NAME}{settings.MEDIA_ROOT}{thumbnail_name}.jpg'
print('thumbnail big name', thumbnail_name)
clip.save_frame(thumbnail_name, t=1.00)
thumbnail_name = thumbnail_name.split('/')[-1]
print('thumbnail_name', thumbnail_name)
return thumbnail_name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment