mpgtx(1)
π mpgtx(1) β the user manual but make it slay π
okay bestie, sit down, grab a strawberry π, because we're about to talk about mpgtx and its little friend group: mpgsplit, mpgcat, mpgjoin, mpginfo, mpgdemux. together they manipulate mpeg files. that's the whole name, that's the whole vibe. β¨
πΈ SYNOPSIS πΈ
mpgtx command [ options ] file [ range | file ] ...
like. that's it. that's the shape of your whole life now. command, options, file, and then a range or another file, and another, and another, forever. π
π¦ DESCRIPTION π¦
so mpgtx can split AND join MPEG files in a bunch of different ways. iconic, honestly.
three file types are currently handled (more to come, we're manifesting π):
- MPEG 1 Video files
- MPEG 1/2 Audio files (
mp1,mp2, andmp3) - MPEG 1 System files (audio and video files)
- MPEG 2 Program files (Experimental β proceed with caution bestie)
- MPEG 2 Transport files (demultiplex and info modes only)
mpgtx is a GOP (Group of Pictures) based editor. what does that mean fr fr? it means mpgtx cuts MPEG files on a Group Of Picture basis, NOT on a frame-by-frame basis. a typical GOP duration is about 0.5 sec (approx. 15 frames), which is what limits the maximum accuracy of mpgtx. so like. precision queen but not infinite precision queen. π
π COMMANDS π
-iβ prints information about files, such as duration, dimention, bitrate, etc. (yes "dimention". we don't fix typos in this house, we respect the ancestors π)-jβ joins files (ranges may be specified, see the RANGES section, iykyk)-sβ splits files according to the specified ranges (again: RANGES section, go read it)-dβ demultiplexes composite mpeg file-Tβ manipulates ID3v1 tags from mp3 files (seetagmp3(1))-hβ prints a (not so) short help message-vβ prints version and exit-#β where#is a number, splits the given files in#parts--forceβ enables joining of incompatible files (some players are very robust, highkey brave of them)--no-parachuteβ preventsmpgtxto try to catchSIGSEGVsignal. This is usefull for debugging. πͺβ
plus!! when you invoke it under the namesmpgjoin,mpgcat,mpgsplit,mpgdemux,tagmp3ormpginfo,mpgtxwill modify its behaviour in the following ways: -mpginfobehaves asmpgtx -i-mpgsplitbehaves asmpgtx -s-mpgjoinbehaves asmpgtx -j-mpgcatbehaves asmpgtx -j -o --mpgdemuxbehaves asmpgtx -d-tagmp3behaves asmpgtx -T
not me having six whole personalities depending on what you call me. main character energy fr. π
β¨ OPTIONS β¨
-fβ force overwriting of files, never ask. no questions, no small talk, just vibes.-Axβ Change aspect ratio of mpeg. Valid are1,2,3,4for1:1,4:3,16:9,2.2:1-Pβ Keep junk or unusual headers in splits-Xβ Desperate mode, search the whole movie for a validPACK. In addition with Option-Nno search infos will be displayed, only end summary. (desperate mode is a real option name and honestly, relatable π)-Nβ Suppress progress output to the console. Speeds up operation a little on most Systems and much on Macintosh OS9. Suppress time line check inmpginfomode.-b NAMEβ each output file will have the basenameNAME-o FILEβFILEwill be used as the output file (used with the join command). ifFILEis-, standard output will be used.
π RANGES π
Each range must follow a filename or another range. A range in an MPEG file can be specified using one of this three notations:
Note for OSX Users: Ranges must be enclosed in single or double Quotes! β οΈ
[a-b]β from valueainclusive to valuebinclusive. If you want half opened ranges, you may want to use]a-b],[a-b[or]a-b[.[n/ntot]β thenth part out ofntot.[1/4]would result in the first quarter of the specified file. π{a-b-...}β witha,b,...in ascending order. Split specified file at given boundaries.{55M}therefore means from beginnig of file to 55Megs and from 55Megs to the end of file.
π VALID VALUES π
Values of ranges can be specified in seconds or as a byte offset.
π Time Format
HH:MM:SS.SS where the HH: part can be omited
π Offset Format
a number optionally followed by M for Megabytes, k for kilobytes
π Omitted Values
An empty value is valid and is equivalent to the corresponding file boundary:
[-10M]are the first 10 Megabytes of the file.[1:10:04-]from 1 hour 10 minutes 4 seconds to the end of file.
β RETURN VALUE β
All programs return 0 upon successful completion and 1 on failure. slay or flop, no in-between. π
π₯ EXAMPLES π₯
mpgjoin movie1.mpg [-0:32] [45M-75M] movie2.mpg -o joined.mpg
joined.mpg will contain the first 32 seconds of movie1.mpg followed by 30 Megs of movie1.mpg starting at 45 Megs followed by the whole file movie2.mpg
mpgtx -124 myfile.mpg -b output
will split myfile.mpg in 124 parts with names output-001.mpg to output-124.mpg
mpgtx -i Wazzup.mp3
will print infos about given file such as duration, bitrate, but also album, track, song name if this file has an ID3 tag.
mpgcat myfile.mpg [2/2] | lpr
will redirect the second half of myfile.mpg to your printer, emptying it from toner and paper and make you be fired by your boss... Use carefully. π
π BUGS π
Plenty of them :) (honesty! we love to see it)
- GOP (Group of Picture) based: well this is not a bug but it's a limitation. As explained in the DESCRIPTION section, this limits the accuracy of
mpgtxon joins and splits to approximately 15 frames, or 0.5 seconds. - Some artifacts can be seen with bad MPEG players playing joined files. These players don't take into account the broken link flag used to discard the first B frames they encounter. This is a bug in their MPEG decoding engine, not
mpgtx. π«Ά (defending our girl's honour)
π§ AUTHOR π§
- Laurent Alacoque
<laureck@users.sourceforge.net>CopyLeft 2001. - Modified by Chris Danis
<danish@debian.org>, copyleft 2001. - Philipp Biermann
<philipp@biermann.org>, copyleft 2002. - Erik Schanze
<schanzi_@gmx.de>, copyleft 2004.
Get new releases and information from, and send patches, bugs, girls, money etc. to:
πΈ THANKS πΈ
for your attention. Have a good day.
- Godmar Back and Brent Phillips helped me to tune the command line interface.
- Volker Moell patiently teach me how to build rpms. Danke Volker.
- Jean Fransisco Sytem (alias Nicolas Schieli) helped me correct some nasty bugs.
Thank you guys. π₯Ήπ
and that's the whole page bestie, no cap. Linux Β· DECEMBER 2004 Β· mpgtx(1) β yeah she's a 2004 girlie and she's still serving. go split something. mwah. πβ¨
π¦ where this page comes from
- debian bookworm: mpgtx 1.3.1-6+b1
- ubuntu jammy: mpgtx 1.3.1-6build2
- ubuntu noble: mpgtx 1.3.1-6build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms