[MPlayer-users] Re: Question on "trans-coding" with mencoder...

Oliver Fromme olli at secnetix.de
Mon Aug 18 18:06:14 CEST 2003

Rainer Hantsch <rainer at hantsch.co.at> wrote:
 > On Mon, 18 Aug 2003, Oliver Fromme wrote:
 > | Did you try to concatenate the MPEG files first, and then encode the result
 > | as a whole?  That should work.
 > I could find no tool within the last 4 years, which allows me to do anything
 > with MPEG files within LINUX.

Then maybe you didn't look hard enough.  There are quite a
lot of tools that read, create or manipulate MPEG files,
such as the mjpegtools, mpgtx and others.

 > | Again, I would recommend you do the cutting on the source MPEG, not on the
 > | resulting AVI file.  You can use the mpgtx tool for that purpose.
 > I hear the first time of it. Is it part of mplayer/mencoder? Where to get it?

Ever heard of search engines, such as Google?
I did it for you, here's the homepage:


mpgtx can split, join and demultiplex MPEG system streams.

 > But how to convert a "any" MP3 into a constant bitrate MP3 without any change
 > in playing length and quality loss?

That's not possible.  However, I'm not convinced that the
variable bitrate is your problem.  It never was for me, and
I _always_ use variable bitrate audio (except for VCDs,
because the standard requires 224 kbps fixed bitrate).

 > | It's a bit tedious because several different tools are
 > | involved, so I wrote a small script to make that task
 > | easier.  Maybe it's helpful:
 > | http://www.secnetix.de/~olli/scripts/dvd-to-vcd.tar.gz
 > |
 > | (The name might imply it's only to convert DVDs to VCDs,
 > | but that's not true anymore.  You can feed it almost
 > | anything that mplayer is capable of reading, and it can
 > | produce VCD, SVCD, or generic MPEG1 or MPEG2 streams.)
 > I did something similar. A bash script which does the documented 3-pass
 > conversion with re-scaling and so on. Works great from VOB files, but I prefer
 > dvd::rip when starting on DVD sources, it is easier. I use mencoder only when
 > I do have only VOB files because dvd::rip forces the INF file.

I never use VOB files.  Usually I use mplayer -dumpstream
to decrypt the MPEG stream to harddisk, then use that file.

 > | Not that I'm aware of.  personally I prefer to do such
 > | things with CLI tools, not GUI.  Because CLI tools are
 > | much easier to automate, and easier to control, and the
 > | actions are always exactly reproducible.
 > My words and opinion, too. But without a highly detailled documentation and
 > many samples, you waste a lot of time until you get first "acceptable"
 > results.

I think the documentation is pretty detailed.  Of course,
documentation includes the manual page, FAQ, web pages,
and (last but not least!) the mailing list archives.

 > | Having said that, there are tools which might come somewhat close to what
 > | you're looking for, such as the video editor which is part of the
 > | NuppelVideo tool set.  Disclaimer: I haven't tried any of those GUI tools.
 > Well, I always see tools which need extremely much dependices, because they
 > are often written for KDE. X11 apps would be much simpler, because they do
 > not have so many dependices, and also work under KDE, so I do not understand
 > why everybody codes for KDE. =8-/

Maybe I'm blessed ... I'm not using Linux, but FreeBSD, whose
ports collection makes it extremely simple to install software
which has lots of dependencies.  Compiling the NuppelVideo set
of tools (including all dependencies) was typing "make", done.
(I needed it for its frame-grabber recording tool, not for the
GUI editor.)

Also, for most KDE tools, it is sufficient to install the KDE
libs, but not the actual KDE desktop.  The ports collection
of FreeBSD also handles that automatically.  I have several
KDE tools installed without ever having seen a KDE desktop.

 > But - Cutting/pasting videos without a GUI is not really usable - isn't it?
 > How to cut out commercials from recordings without a GUI? Here it is a must to
 > cut exactly!

Well, it depends.  If you do it often, then a GUI tool will
probably help, indeed.  I wish mplayer had a way to step
forward frame-by-frame (and also display the frame number
in the OSD).  That would be very helpful.  I wonder how
difficult it would be to implement ...  don't think it's
very tough.

Personally, I do not record TV shows, so I have no need for
cutting commercials.  However, I've had a few cases where
I needed to cut videos, but seconds precision was enough
for me; I didn't need precision on frame level.  YMMV.


Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"In My Egoistical Opinion, most people's C programs should be indented
six feet downward and covered with dirt."
        -- Blair P. Houghton

More information about the MPlayer-users mailing list