How do you split mpg files using a ffmpeg command?
Linux - NewbieThis forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
thanks to anyone that can help me i want to split a mpg file so that i can burn it onto a cd because the one i have now is too big to fit on a cd... i want to be able to use a ffmpeg command because its easier for me, but if there is another easy way i would like to know iv'e been searching google for ages but i havent found anything.. so i thought i could find out how to here soooooooooooooooooooo... if anyone could help me i will be very happy
Did you try the man page? ffmpeg has two options, '-ss' (seek to position), and '-t' (recording duration). Basically, you set up a stream copy, use -ss to go to the point where you want to start the segment, then use -t to set the length of the recording from that position. You'll have to do it once for each segment you want to create.
An easier way would be to get mpgtx, which includes a variety of mpg tools including a splitter, and can do splits in a variety of ways.
Did you try the man page? ffmpeg has two options, '-ss' (seek to position), and '-t' (recording duration). Basically, you set up a stream copy, use -ss to go to the point where you want to start the segment, then use -t to set the length of the recording from that position. You'll have to do it once for each segment you want to create.
An easier way would be to get mpgtx, which includes a variety of mpg tools including a splitter, and can do splits in a variety of ways.
You'll find that the *nix community is very big on encouraging people to 'RTFM' before they ask for help.
And people who have made the attempt usually indicate it in some way. Something like "I read the instructions, but I still don't understand what to do", followed by some detailed questions on use, would tell us that you at least gave it the effort first.
FYI, your first stop should always be the man page. In a terminal/console, simply type "man <command>" and you'll (usually) get a general how-to-use manual page for it. The mpgtx man page, in this case, is fairly detailed and should give you enough info on how to use it. If it's still unclear to you, then you can come back and ask about it. Be sure to make it clear what you do understand, as well as what you don't.
You'll find that the *nix community is very big on encouraging people to 'RTFM' before they ask for help.
And people who have made the attempt usually indicate it in some way. Something like "I read the instructions, but I still don't understand what to do", followed by some detailed questions on use, would tell us that you at least gave it the effort first.
FYI, your first stop should always be the man page. In a terminal/console, simply type "man <command>" and you'll (usually) get a general how-to-use manual page for it. The mpgtx man page, in this case, is fairly detailed and should give you enough info on how to use it. If it's still unclear to you, then you can come back and ask about it. Be sure to make it clear what you do understand, as well as what you don't.
the -vcodec option chooses the video codec to use, more options are:
-vcodec <string> : Force video codec.
copy : Copy raw codec data as is.
dvvideo : DV Video (for video editing, I've heard)
ffv1 : FFV1 lossless video codec
h264 : H.264 (best mpeg-4 codec, I've heard)
mpeg2video : MPEG-2 Video
rawvideo : RAW Video
xvid : XviD ( MPEG-4 Part 2 )
(-vcodec options from http forum dot videohelp dot com slash topic338564 dot html ) I can not post proper url's yet.
The above will extract 3 minutes of mpg file from the 1 minute mark using same quality as the source file. This is useful for Variable Bit Rate (VBR) encoded files.
The -sameq parameter tells ffmpeg to use same quality as input file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.