from new_reader import reader
rdr = reader('udp://@235.35.3.5:3535')
rdr.read()
# print a mpegts packet header via https
>>>> from new_reader import reader
>>>> with reader('https://so.slo.me/longb.ts') as rdr:
.... packet = rdr.read(188)
.... print(packet[:4])
....
b'G@\x11\x10'
-
Files
from new_reader import reader
with reader("/home/you/video.ts") as data:
fu = data.read()
-
HTTP(S)
from new_reader import reader
with reader('http://iodisco.com/') as disco:
disco.read()
# Add http headers like this
with reader('http://iodisco.com/',headers={"myHeader":"DOOM"}) as doom:
doom.read()
-
Multicast
from new_reader import reader
with reader("udp://@227.1.3.10:4310") as data:
data.read(8192)
-
UDP
from new_reader import reader
udp_data =reader("udp://1.2.3.4:5555")
chunks = [udp_data.read(188) for i in range(0,1024)]
udp_data.close()
- reader will set
socket.SO_RCVBUF
to twice the maximum value set in the OS forUDP
andMulticast
.- On
OpenBSD
sysctl net.inet.udp.recvspace
- On
Linux
sysctl net.core.rmem_max
- On
Windows
I.have.no.idea
- On