Python Forum

Full Version: Python and SQL BLOB Streaming
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I have some videos I am storing on an SQL BLOB column. Is there a way I could read from the columns in byte chunks to create a stream in python?

Any help on this would be greatly, greatly appreciated.
this looks to be about reading blob data in chunks, (SQL Server): https://stackoverflow.com/questions/1377...le_rich_qa
Ok so I can get the bytes, is there a way I can convert them to a image using PIL or something and feed them to a video player?

Thanks
Please refer to: https://code-maven.com/create-images-wit...pil-pillow
as there are several writing modes, including text.
Read through that, still not sure how I can shove bytes in there to create an image. If I have the bytes there has to be a way to get frames out of them right? How else are streams created? I tried this

image.open(io.BytesIO(values[0][0]))

my values[0][0] contains a portion of my video file in bytes

I get this error cannot identify image file <_io.BytesIO object at 0x0000025D891FF200>.