Quantcast FFmpeg: FFmpeg Status on MPEG-2 Encoding - digitalFAQ.com Forums [Archives]
  #1  
01-28-2004, 11:21 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I'm a n00b on a lot of things here: MPEG-2, FFMPEG and this forum
I also registed on another forum: http://dvdripping-guid.berlios.de/fo...wforum.php?f=2 and I'm willing to hear about other good resources for MPEG-2 encoding under Linux.

My previous experience is MPEG-4 and Avisynth in Doom9, particularly automatic IVTC procedures. None of this needed for MPEG-2

Now let's get to the point.

From what I could check so far it seems that FFMPEG-based encodings are about 4 times faster than mjpegtools-based encodings, and quality seems nice too, compared with TMPGEnc. The main problem about FFMPEG current build is not respecting the maximum bitrate and still needs some improvement on motion estimation.

All of this is in Michael's TODO list:
http://www1.mplayerhq.hu/cgi-bin/cvs...cvsroot=FFMpeg

Quote:
Michael's TODO list: (unordered) (if anyone wanna help with sth, just ask)
-------------------
- finish implementation of WMV2 j-picture
- H264 encoder
- H264 deblock filter
- H264 B frames
- H264 CABAC
- per MB ratecontrol (so VCD and such do work better)
- more optimizations
- simper rate control
- split h263.c
- mpeg2 encoding (after the ME impovements)
- format idependant quality parameter
It seems that Michael has a lot more work to do on the H.264 part and may be more interested in knowing better this new codec than to enable 4 times faster quality MPEG-2 backups using open-source tools that work according to specifications

I'd like to know if anyone has tried FFMPEG MPEG-2 encoding under FreeBSD, if there are any new developments on the max bitrate problem, and if there is any way to use a requantizer tool like M2VRequantizer to post-process the FFMPEG output that overlaps max bitrate.

Cheers to all,
Bilu
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
01-28-2004, 11:28 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by bilu

I'd like to know if anyone has tried FFMPEG MPEG-2 encoding under FreeBSD, if there are any new developments on the max bitrate problem, and if there is any way to use a requantizer tool like M2VRequantizer to post-process the FFMPEG output that overlaps max bitrate.

Cheers to all,
Bilu
Hi Bilu, and welcome

ffmpeg will work the same on FreeBSD and on Linux, and all bugs are identically reproduceable on both systems
And if you do encode to MPEG-2 (.m2v), yes, you can use M2VRequant to fit your desired target

-kwag
Reply With Quote
  #3  
01-28-2004, 12:37 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
What would be really neat was to requantize ONLY the parts which exceed a certain bitrate. This way it would still be a faster process than mjpegtools and we'd be able to garantee the maximum bitrate specifications.

I sure would like to backup DVD5 to DVD9 with FFMPEG under FreeBSD


Bilu
Reply With Quote
  #4  
01-31-2004, 06:18 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Quick link for searching in the FFMPEG-devel mailing list archive:
http://sourceforge.net/search/?type=...&forum_id=1506

Bilu
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
FFMPEG: Current libavcodec status japie Video Encoding and Conversion 5 03-14-2004 05:52 AM
FFMPEG: Status Report about alternative Tools to create KDVD Jellygoose Video Encoding and Conversion 22 02-25-2004 05:46 PM
FFMPEG: Do ffvfw and mencoder/ffmpeg give the same results? Razorblade2000 Video Encoding and Conversion 4 02-06-2004 04:23 PM
FFMPEG: Linux kvcd status (so far) japie Video Encoding and Conversion 20 11-28-2003 03:13 PM
FFMPEG: Encoding Audio: toolame,mp2enc or ffmpeg Razorblade2000 Video Encoding and Conversion 0 10-18-2003 03:04 PM

Thread Tools



 
All times are GMT -5. The time now is 12:32 AM  —  vBulletin © Jelsoft Enterprises Ltd