[PyQt] QMediaResource::dataSize() returns zero byte size for online video
redstone-cold at 163.com
Tue Oct 18 14:30:12 BST 2016
I am trying to use QMediaResource::dataSize() to get online video byte size, however ,it just returns zero , it is hard to believe in this case
This may be zero if the size is unknown.
especially for the first url.
just want to know (1) if it is a bug with PyQt5 or Qt5 and (2)Does the equivalent code in Qt5 returns nonzero result ?(3) Any way to get the video byte size an m3u8 url referenced to ?
>>> from PyQt5.QtMultimediaimport*>>> from PyQt5.QtCoreimport*>>>QMediaResource(QUrl('http://downdb.51voa.com/201610/will-philippines-cut-ties-with-us-and-grow-closer-to-china.mp3')).dataSize()0>>>QMediaResource(QUrl('https://www.the5fire.com/static/demos/diaosi.m3u8'),"application/vnd.apple.mpegurl").dataSize()0>>>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt