Multi-threaded compression on multiple boxes
- DJ_Izumi
- Joined: Wed Oct 03, 2001 8:29 am
- Location: Canada
- Contact:
Multi-threaded compression on multiple boxes
I had this idea in my head and I'm wondering if it's stupid. To me, it sounds like a good idea and that it's almost suprising that no one has done it before, which leads me to believe that I'm failing to understand something and the idea is infesable.
The idea is to design a Windows based video encoder, probably for x264 that can operate in a sort of Server/Client situation. You install the server/encoder on the 'main' computer and install the client program on other computers on your network, the encoding job will then be shared by the other computers on the network like cluster computing only idiot proof for the lamen, and you're encoding is boosted by the work being shared by any computers available on the network.
So tell me why this is a stupid idea, cause there just has to be a huge hole in it. :/
The idea is to design a Windows based video encoder, probably for x264 that can operate in a sort of Server/Client situation. You install the server/encoder on the 'main' computer and install the client program on other computers on your network, the encoding job will then be shared by the other computers on the network like cluster computing only idiot proof for the lamen, and you're encoding is boosted by the work being shared by any computers available on the network.
So tell me why this is a stupid idea, cause there just has to be a huge hole in it. :/
- Coderjo
- Joined: Sat Mar 03, 2001 11:46 am
This sort of thing has been done before. At some point someone had an MPEG2 encoder that could be run in a cluster. Also, x264 already has a multithreaded mode. It won't compress as well as using single-threaded mode, though, since it splits the video into pieces somewhat randomly, and the video encoded by one thread cannot reference frames in video encoded by the other thread. Also, I think it would be really hard to idiotproof the cluster mode, and would wind up being fragile.
- Kalium
- Sir Bugsalot
- Joined: Fri Oct 03, 2003 11:17 pm
- Location: Plymouth, Michigan
It would be difficult. Before any actual encoding could be done, the i-frames would have to be determined. Once you had that, you could pass the segments intelligently around.
The biggest problem is that video encoding with inter-frame compression is not easily parallelized without loss. So yeah, you're right Izumi: there is a huge hole in it - the amount of pre-processing that would need to be done, although perhaps some of that could be parallelized.
The biggest problem is that video encoding with inter-frame compression is not easily parallelized without loss. So yeah, you're right Izumi: there is a huge hole in it - the amount of pre-processing that would need to be done, although perhaps some of that could be parallelized.
- Zarxrax
- Joined: Sun Apr 01, 2001 6:37 pm
- Contact:
-
TaranT
- Joined: Wed May 16, 2001 11:20 pm
Sony Vegas already supports "render farms" over a network. When you buy it you also get two render-only licenses. And their update to v 6.0d apparently added H264 encoding.
- DJ_Izumi
- Joined: Wed Oct 03, 2001 8:29 am
- Location: Canada
- Contact:
- Coderjo
- Joined: Sat Mar 03, 2001 11:46 am
With h264, you would have to find the IDR frames. Nothing can refer to frames before the last IDR frame, but they can refer to frames before the last I frame. I don't know whose crazy-ass idea this was...Kalium wrote:It would be difficult. Before any actual encoding could be done, the i-frames would have to be determined. Once you had that, you could pass the segments intelligently around.
But otherwise, yeah. you could do one pass to determine where the IDR frames are and then slice it up into each IDR chunk and have different systems encode the video between the IDR frames. You shouldn't lose too much in the way of efficiency this way, since you are splitting on a boundary anyway.
- DJ_Izumi
- Joined: Wed Oct 03, 2001 8:29 am
- Location: Canada
- Contact:
- Kalium
- Sir Bugsalot
- Joined: Fri Oct 03, 2003 11:17 pm
- Location: Plymouth, Michigan
I'm willing to bet that there's no good way to parallelize the first pass, too...Coderjoe wrote:But otherwise, yeah. you could do one pass to determine where the IDR frames are and then slice it up into each IDR chunk and have different systems encode the video between the IDR frames. You shouldn't lose too much in the way of efficiency this way, since you are splitting on a boundary anyway.
Which means you do a nasty serial job, and then you can parallelize the second part within limits. Seems like a lot of work.
- DJ_Izumi
- Joined: Wed Oct 03, 2001 8:29 am
- Location: Canada
- Contact: