View Full Version : Working MPEG-2 encoding solutions under Linux?
bilu
26th January 2004, 17:05
Hi,
Anyone knows working MPEG-2 encoding stuff for Linux?
It looks like Mencoder does it, but the docs are too MPEG-4 based :/
Bilu
mikeX
26th January 2004, 19:32
u could use transcode with ffmpeg's mpeg2 codec, or ffmpeg by itself...
http://zebra.fh-weingarten.de/~transcode/
http://ffmpeg.sourceforge.net/
i don't know if this mpeg2 codec is any good though...
(i suppose mencoder also uses ffmpeg for mpeg2 encoding-though i'm not really sure)
checking out ffmpeg's documentation would be a good idea
http://ffmpeg.sourceforge.net/ffmpeg-doc.html
--:edit
i think bbmpeg in windows uses ffmpeg's mpeg-2 codec (in case u'r familiar with windows mpeg-2 encoding)
The Shemeta
26th January 2004, 20:52
Check this out:
Avidemux (http://avidemux.tuxfamily.org)
peace out!
bilu
27th January 2004, 10:46
Found one more, will post others:
Requantize frontend
http://dvdripping-guid.berlios.de/forum/viewtopic.php?p=642#642
http://openfacts.berlios.de/index-en.phtml?title=lxdvdrip
Bilu
bilu
27th January 2004, 11:21
Reencoding instead of requantizing:
Most solutions seem based on mjpegtools or ffmpeg.According to this:
http://dvdripping-guid.berlios.de/forum/viewtopic.php?p=421#421
ffmpeg is 4 times faster than mjpegtools and quality is OK :) but the bitrate adjustment seems to be problematic.
Investigation continues. I don't even have Linux installed at the moment, just checking for the available approaches.
EDIT: FFMPEG problems seem to be b-frames and not respecting max bitrate.
Bilu
bilu
27th January 2004, 18:28
Some resources here:
KVCD.net
http://kvcd.net/forum/viewforum.php?f=68
dvdripping-guid.berlios.de
http://dvdripping-guid.berlios.de/forum/viewforum.php?f=2
Bilu
bilu
30th January 2004, 14:24
FFMPEG rate control status
====================
IMHO these were the most significative mails on the mailing list archive of ffmpeg-devel:
http://sourceforge.net/mailarchive/message.php?msg_id=6399189
From: D Richard Felker III <dalias@ae...>
Re: mpeg1video and VCD stream
2003-10-29 09:05
On Wed, Oct 29, 2003 at 08:42:43AM +0100, Erik Slagter wrote:
> > > It is possible to use ffmpeg for generation conformant MPEG1 video
> > > stream?
>
> > I think ffmpeg is fully mpeg1-conformant. The problem is
> > vcd-conformance. Make sure you're setting the maxrate and bufsize
> > options to within vcd spec. Some people have reported success with
> > this; I was never able to get it to work myself. Searching the
> > mailing list archives might help too.
>
> I have spent some weeks finding out why ffmpeg does not generate a
> dvd-compliant stream (that is: within the min_rate and max_rate I set).
> The rate control code, especially the buffer control, is very obscure,
> but it seems (from experimenting) that the rate control does not
> function aggressively enough to prevent large bitrate peaks from
> overrunning the buffer, even if you set rc_buffer_aggressivity to a
> large number.
>
> What sort of helps is finding out a range of qmin,qmax that yields a
> stream within the desired bitrate range and set rc_eq to 1. I am not
> sure whether that is enough for vcd though.
>
> So I still think that the rate control doesn't function quite well (if
> at all) and limits the usability of mpeg1 and mpeg2 very much. Sorry but
> I don't know enough of mpeg to fix it myself....
I agree that lavc's rate control does not function properly for
generating highly constrained bitstreams like *vcd. All I can say in
its defense is that it does an excellent job on unconstrained output
where all you care about is target filesize, and IMO this case is many
orders of magnitude more important.
By the way, are you doing 1pass encoding, or 2pass?
Rich
http://sourceforge.net/mailarchive/message.php?msg_id=6406622
From: <fixounet@fr...>
Re: mpeg1video and VCD stream
2003-10-30 04:50
Quoting Erik Slagter <erik@ol...>:
> > That's what i did in avidemux2 (using the stable xvid 2 pass code).
> > It is not that xvid rate control is better (it completly lacks real
> min/max
> > bitrate control), but it is simpler than libavcodec.
> >
> > So i added a brutal (but effective) max bitrate enforcement.
> >
> > The problem is that it solves overflows but not underflows, which are as
> bad
> > (hiccup / freeze).
>
> Looks like a partial solution. I assume from this that you do understand
> how ffmpeg ratecontrol works?
Nope :), that's why i used xvid 2 pass instead (and had to modify it a bit).
FFmpeg ratecontrol is very powerfull but quite hard to follow.
Xvid one is pretty simple and easy to interface with other codecs.
For example i also used it to add dual pass capabilities to mpeg2enc
It is mostly working (sligh undershot) but slowly.
It is easier with mpeg2enc as it has its own ratecontrol, so the dual pass has
just to ask for a given quantizer without having to bother about bitrate and the
ratecontrol will modify it / add padding to pop a 100% compliant stream.
Maybe we could do the same for ffmpeg ?
Add a third layer only used in certain case that will enforce bitrate to avoid
under/over flow without modifying the existing bitrate control that works well
for mpeg4/h263 encoding.
It may not be a 100% clean approach, but would allow "old format" lovers to
happily use the fastest / best available encoder available to produce legit
stream and not modify the other part of the code mostly targetted toward mpeg4
encoding.
I think these two posts are a pretty good synthesis about the MPEG-2 rate control in FFMPEG right now.
Bilu
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.