Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Linux, Mac OS X, & Co

Reply
 
Thread Tools Display Modes
Old 26th January 2004, 18:05   #1  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Working MPEG-2 encoding solutions under Linux?

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
bilu is offline   Reply With Quote
Old 26th January 2004, 20:32   #2  |  Link
mikeX
yakisoooobaaa!!
 
mikeX's Avatar
 
Join Date: Sep 2003
Location: Greece
Posts: 329
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)

Last edited by mikeX; 26th January 2004 at 20:35.
mikeX is offline   Reply With Quote
Old 26th January 2004, 21:52   #3  |  Link
The Shemeta
Registered User
 
Join Date: May 2003
Posts: 51
Check this out:

Avidemux

peace out!

Last edited by The Shemeta; 26th January 2004 at 21:55.
The Shemeta is offline   Reply With Quote
Old 27th January 2004, 11:46   #4  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Found one more, will post others:

Requantize frontend
http://dvdripping-guid.berlios.de/fo....php?p=642#642

http://openfacts.berlios.de/index-en...title=lxdvdrip

Bilu

Last edited by bilu; 27th January 2004 at 12:16.
bilu is offline   Reply With Quote
Old 27th January 2004, 12:21   #5  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Reencoding instead of requantizing:

Most solutions seem based on mjpegtools or ffmpeg.According to this:

http://dvdripping-guid.berlios.de/fo....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

Last edited by bilu; 28th January 2004 at 13:57.
bilu is offline   Reply With Quote
Old 27th January 2004, 19:28   #6  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Some resources here:

KVCD.net
http://kvcd.net/forum/viewforum.php?f=68

dvdripping-guid.berlios.de
http://dvdripping-guid.berlios.de/fo...wforum.php?f=2


Bilu
bilu is offline   Reply With Quote
Old 30th January 2004, 15:24   #7  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
FFMPEG rate control status
====================

IMHO these were the most significative mails on the mailing list archive of ffmpeg-devel:

http://sourceforge.net/mailarchive/m...msg_id=6399189
Quote:
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/m...msg_id=6406622
Quote:
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
bilu is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:37.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.