gnomecast icon indicating copy to clipboard operation
gnomecast copied to clipboard

Videos fail to report conversion rate

Open OverkillGuy opened this issue 7 years ago • 3 comments

Loading a short (<10s) video to investigate other bugs, I got the following in my logs:

Traceback (most recent call last):
  File "/home/jiby/Documents/dev/foss/gnomecast/gnomecast.py", line 312, in f
    self.update_status()
  File "/home/jiby/Documents/dev/foss/gnomecast/gnomecast.py", line 288, in update_status
    notes.append('Converting: %i%%' % (self.transcoder.progress_seconds*100 // self.duration))
TypeError: unsupported operand type(s) for //: 'float' and 'NoneType'

I suspect the video's length is at fault, causing the update_status to be too small == None.

Probably related: after successful video playback on Chromecast, the Gnomecast GUI is frozen to ~80% of video, instead of 100%, which is not neat, and could cause users to worry about missing out a bit of video. I'll make a PR for that separately if needed.

OverkillGuy avatar Feb 28 '18 00:02 OverkillGuy

Update: a TV series (length 28 mins) has shown the same behaviour, invalidating the assumption about video length (too short) directly being cause.

OverkillGuy avatar Feb 28 '18 00:02 OverkillGuy

can you upload the 10s file somewhere i can test?

keredson avatar Feb 28 '18 01:02 keredson

almost certainly i'm parsing the duration out of ffmpeg's output wrong, or it's not there in the output. either way needs to be handled!

keredson avatar Feb 28 '18 01:02 keredson