Results 1 to 9 of 9
Does anyone know how can I splitt a file of 750MB in one file of 690MB and one file for the rest?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-05-2005 #1Just Joined!
- Join Date
- Jul 2005
- Posts
- 2
Video file is too big
Does anyone know how can I splitt a file of 750MB in one file of 690MB and one file for the rest?
- 07-05-2005 #2
Erm, I'm not sure about splitting them, but can you compress it maybe?
Code:tar cjvf file.tar.bz2 file
- 07-05-2005 #3Just Joined!
- Join Date
- Jul 2005
- Posts
- 2
It's not working. the compressed file is only about 7-8 MB smaller then the original. but THX
- 07-05-2005 #4
How did u get the video file?
I remember using an app called dvdrip (imaginitively enough for ripping DVD's), (no this isn't illegal, as long as u dont sell them on, backing up is legal
)
I have only used this once, but i seem to remember there being the option to split the AVI up after encoding etc. and iirc, you can specify the size, so u could specify disk 1 as 690MB and then it'll just make the other disk the rest."I am not an alcoholic, alcoholics go to meetings"
Registered Linux user = #372327
- 07-05-2005 #5Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
It's really simple to split it up. Just use the `dd' command, as follows.
For two parts, as you described:
That will take 690 MiBs into the first part, and the rest into the second part.Code:dd if=your-input-file of=part1 bs=1M count=690 dd if=your-input-file of=part2 bs=1M skip=690
Just as an example, here's how to split a file into 3 parts of 10 MiBs each, and then the rest into a fourth part:
Code:dd if=input-file of=part1 bs=1M count=10 dd if=input-file of=part2 bs=1M count=10 skip=10 dd if=input-file of=part3 bs=1M count=10 skip=20 dd if=input-file of=part4 bs=1M skip=30
- 07-05-2005 #6Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Oh, I forgot. To recombine the part again, just use `cat':
Or, in the last example:Code:cat part1 part2 >merged-file
Of course, the shell does have a couple of ways to make that shorter. Just a few examples -- these won't be on the test.Code:cat part1 part2 part3 part4 >merged-file
Code:cat part{1,2,3,4} >merged-file cat part[14] >merged-file # Okay, not really shorted, but arguably more flexible: (for f in $(seq 1 4); do cat "part$f"; done) >merged-file # If these are the only "parts" in the CWD: cat part* >merged-file
- 07-05-2005 #7Just Joined!
- Join Date
- Mar 2005
- Posts
- 38
I assume you want to fit the files onto CDs or something. If that's the case and you want them to be individually playable, then splitting them as proposed won't work.
Instead, what you'll need to do is use some sort of video encoder and transcode it into two pieces. The problem is (I'm fairly certain), you'd actually have to re-encode the video, which means you will lose some quality. mencoder does provide the ability to do stream copying, but I don't think you can specify the start/end positions with stream copying. I could be wrong.
There are a number of different tools for doing this and each is different in how it operates. You might want to look at mencoder which comes with mplayer (http://www.mplayerhq.hu)
If you choose mencoder, I'd suggest joining the mencoder mailing list (see the web site) for help.
Pete
- 07-05-2005 #8Just Joined!
- Join Date
- Mar 2005
- Posts
- 38
Unless you're a lawyer, you should be careful about giving legal advice. There is actually some question about the legality of backing up DVDs from MPAA affiliates in some countries, even for personal use. While doing so may not violate copyright law, it may violate the DMCA in the US, depending on the tools being used. Ridiculous, and it's highly unlikely you would be prosecuted for doing so for personal use, but still...
Originally Posted by sdousley
- 07-05-2005 #9hehe ok, noted. in future, i will keep an eye out for such things.
Originally Posted by pdavis68
"I am not an alcoholic, alcoholics go to meetings"
Registered Linux user = #372327


Reply With Quote
