So, maybe this is a concept out of the domain of programming... but I think not.

Lets say we have a 400MB video file that we want to either send somewhere, or stream.

Can we use python to break it into binary, break the binary into chunks, and then send the chunks to be reformed on the opposite end (either in real time or for later use)?

If so, can we create multiple streams to load various parts of the binary chunks simultaneously?

Is binary the wrong format?

I considered just "trying" it, but I figured there might be a "better way" as there always seems to be with Python... so, any thoughts? If this is possible, I would like to try to do a proof of concept on my own, unless it's been done already.. in which case, it would be fun to try and improve on it. Like merging streams, or similar.

EDIT:

Ok, so trying to answer my own question - I guess this is considered serialization. If that is the case, what would be the best way to serialize something of this size? Does it matter? Can we serialize in chunks? Or does that happen automatically?

A video file is already in binary. What operating system are you using? There are a lot of tools to do what you want. Both ffmpeg and vlc (and other tools) have video streaming capabilities. You can also use something like netcat (nc) to send the data to another system, using netcat to receive it and output to a local file. Do you have to use python? In any case, try some Google searches - there are a ton of tools out there to do this.

It was more of a "can I" instead of a "how to"... Im aware of ffmpeg and vlc, but I have never used them.. I should probably take a look and figure them out.

Ultimately, I think it would be cool to figure out how to make a stream merge in real time - something like a picture-in-picture. Using python is preferable, as it makes a lot of things easier, and because I would have to learn the syntax for Java or C/C++

I really am just doing all I can to educate myself on as many technologies as possible, and how to handle, modify, move, or create data, so I can start working on something independently, or apply it to a future job. While I am searching for a job, I am doing all I can to learn as much as I can so I can keep practicing instead of stagnating. With no direction, I am floundering a bit... I know I feel comfortable in Python 3.0, so I am trying to push what I CAN do with it, so I will get major concepts to apply to other languages so I am not learning thoery and syntax if I need to expand to future langauges.

Python is wonderful for manipulating text, but it's easy. Just feel I need to get more involved with current technologies and future applications. Im just sad that it's so difficult to port Python into Android/OSX (I think that's iPod/iPad OS..) But.. the more I learn... the more useful I will be to someone (or myself!).

Thanks for the help :)

Ryan

I know that HDF5 for python understands the concept of chunking and may be a good place to start if you're interested in learning more about handling large data.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.