escaped / django-video-encoding

django-video-encoding helps to convert your videos into different formats and resolutions.
BSD 3-Clause "New" or "Revised" License
116 stars 45 forks source link

Updating progress should yield consistent value. #36

Open siteshen opened 3 years ago

siteshen commented 3 years ago

https://github.com/escaped/django-video-encoding/blob/master/video_encoding/backends/ffmpeg.py#L110-L112 yield value [0, 1]

            percent = round(time / total_time, 2)
            logger.debug('yield {}%'.format(percent))
            yield percent

while https://github.com/escaped/django-video-encoding/blob/master/video_encoding/backends/ffmpeg.py#L124 yield value 100

        yield 100