[MPlayer-users] Divide video file into fixed-time chunks

Larry Reznick lreznick at idistream.com
Thu Jun 4 17:44:44 CEST 2009


Thawxx wrote:
> ..After that I am going to merge it again, so which mencoder options 
> could I use for that too?
>
> The thing I am trying to do is for example divide a video file in 1 
> second chunks, send the chunks separately througth the network, and 
> then merging them again at the receiver side.
> So when merging I shall not see that it is a merged video, I would 
> like to get the original video at the end.
>
> Thank you!
>
>
>
> Thawxx schrieb:
>> Hello
>> Is it possible to divide a video file in chunks of a specific time 
>> length, for example one second?
>> Using mencoder for example
>>
>> Thank you!

If you don't need to be able to play the separate chunks, merely 
transfer them, recombine them, then play the recombination, you can use 
the UNIX/Linux split program. For example, assuming that you want a 
100,000 byte chunk size:

mkdir chunks
cd chunks
split -b 100kb - filename < ../filename

Then transfer the entire chunks subdir. At the destination, recombine 
the chunks using cat:

cd chunks
cat filename* > ../filename

Once this finishes, you can remove the chunks subdir from the 
destination. The recombined file is as playable as the original.

--Larry


More information about the MPlayer-users mailing list