title: How to calculate video length and Thumbnail of video in django
body: <p>I doing django project. I'm trying to calculate length of upload video and tring to create Thumbnail of the video. How to do this.</p>
  
  <p>models.py</p>
  
  <pre><code>class Video(models.Model):
      video_format = models.CharField(max_length=15, blank=True, null=True)
      video_name = models.CharField(max_length=15, blank=True, null=True)
      video_size = models.CharField(max_length=15, blank=True, null=True)
      video_duration = models.IntegerField(blank=True, null=True)
      created_date = models.DateTimeField(default= datetime.now(), blank=True, null=True)
      status = models.CharField(max_length=15, blank=True, null=True)
      thumbline = models.CharField(max_length=15, blank=True, null=True)
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>def home(request):
      if request.method == 'POST':
          video = request.FILES.get('video')
          video_file = FileSystemStorage()
          file_upload = Video(video_file= video_file.save(video.name, video))
          file_upload.save()
          return render(request, 'home.html', {})
  </code></pre>