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 > Video Encoding > MPEG-2 Encoding
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st November 2004, 02:37   #121  |  Link
Fl0ppy
Registered User
 
Join Date: May 2002
Posts: 26
Hi!! i'm just trying to make a xvcd with this great tool, but i have some questions about it:
Where i can found some explanations about the options like
Mb decision (compare fn, least bits, rd), Compare fn (SAd and satd)and wich it's the best search size?

i tried to make a simple comparasion with an xvid file to vcd, but if i want a loot of quality i need to put Min quant in 1 (but when it plays i see some artifacts).

i tried this conf:
gopsize 12
Min Quant:2 Max quant: 31
Md decision: Copmnf
Compfn: SaTD
Search size: Diamond 0
Aspect ratio 4:3
Noise reduction: 0
Rate control: 0.5
Min bitrate 300
Max bitrate 2500
CQ: 100

Any mini-howto-explanation?
Fl0ppy is offline   Reply With Quote
Old 21st November 2004, 05:16   #122  |  Link
dragongodz
....
 
dragongodz's Avatar
 
Join Date: May 2002
Location: Australia
Posts: 2,797
SATD is slightly better quality than SAD.
least bits good for low bitrate while rate distortion(rd) may be better for high bitrates.
diamond size should be atleast 1 really if you expect reasonable quality. higher should increase quality(slightly) each step.


how technical do you want the information ?
dragongodz is offline   Reply With Quote
Old 21st November 2004, 08:40   #123  |  Link
freelock7
High beam
 
freelock7's Avatar
 
Join Date: Apr 2004
Location: Belgium
Posts: 290
Encountered problem with NuEnc01.01b mirror:
If <nuEnc.exe> don't run after installation, just go in the registry at
1)<HKey_LOCAL_MACHINE_/SOFTWARE/NuEnc>
2)<HKey_LOCAL_MACHINE_/SOFTWARE/QuEnc>
3)Delete both of them.
It resets all default parameters.

Last edited by freelock7; 28th November 2004 at 22:04.
freelock7 is offline   Reply With Quote
Old 21st November 2004, 08:55   #124  |  Link
Peter1234
Registered User
 
Join Date: Aug 2004
Posts: 130
dragongodz,
Thanks for the helpful hints. I tried the following and got much better results at low bit rates (and much longer encode times).

Mode = VBR
Passes = 2
Scene Detection = checked
MB Decision = Least bits
Compare Fn = SATD
Search Size = Diamond 6
RC Variability = 0.5
Matrix = KVCD Notch
Noise Reduction = 0
Use Trellis Quantisation = unchecked
Turbo 1st Pass = checked
Peter1234 is offline   Reply With Quote
Old 21st November 2004, 10:45   #125  |  Link
Peter Cheat
Just a Member
 
Join Date: Aug 2004
Location: Australia
Posts: 225
@Peter1234
A search size of 6 isn't worth the extra encode time. Try 3 or 4 (or less). The difference between 3 and 6 is small.

@freelock7
The mirror is the exactly the same file. Shouldn't be any problems.

@dragongodz
Ok, first GOP will always start IP then. It isn't a good idea to have only 1 reference for b-frames .

Some of the options in FreeEnc don't even refer to MPEG1 or 2. That is what I think is silly.
__________________
If you want it done properly, do it yourself!
Modified Libavcodec Site
Peter Cheat is offline   Reply With Quote
Old 21st November 2004, 12:13   #126  |  Link
Fl0ppy
Registered User
 
Join Date: May 2002
Posts: 26
i'm looking the best (if it's possible) configuration for convert mpeg4 to mpeg 1 and 2.
Now tmpgenc offer better quality (i now it's relative).
And if it's possible a doc with explanations about the options in Advanced.

When a version with sse2-p4-ht?

Cheers.

Last edited by Fl0ppy; 21st November 2004 at 12:24.
Fl0ppy is offline   Reply With Quote
Old 21st November 2004, 12:31   #127  |  Link
dragongodz
....
 
dragongodz's Avatar
 
Join Date: May 2002
Location: Australia
Posts: 2,797
Quote:
Ok, first GOP will always start IP then.
sorry Peter i didnt explain that well enough. what i meant is that when closed GOP is not selected then MainConcept, CCE and Tmpgenc all have the first GOP closed and then following GOPs are open. with avcodec the first GOP is open aswell. as i said just a minor thing really which may not make much difference in the scheme of things.
i also checked their first GOP patterns and they all did IP.

Quote:
When a version with sse2-p4-ht?
avcodec has mmx,sse,sse2(bit buggy) already. as for HT well thats also meant to be rather buggy so should probably wait until everything else is ok. 1 problem at a time.
dragongodz is offline   Reply With Quote
Old 21st November 2004, 12:42   #128  |  Link
Peter Cheat
Just a Member
 
Join Date: Aug 2004
Location: Australia
Posts: 225
Is there a reason for closing the first GOP? I don't see any benefits of closing the first gop (unless it is a new scene).

@Fl0ppy
Try the 'HVS Good' matrix.
__________________
If you want it done properly, do it yourself!
Modified Libavcodec Site
Peter Cheat is offline   Reply With Quote
Old 21st November 2004, 12:59   #129  |  Link
dragongodz
....
 
dragongodz's Avatar
 
Join Date: May 2002
Location: Australia
Posts: 2,797
Quote:
Is there a reason for closing the first GOP? I don't see any benefits of closing the first gop (unless it is a new scene).
no idea. have had a search for a possible reason but havnt found any yet. its just strange that they all do it. as i said it may not make much difference in the scheme of things. if i do eventually find a reason i will let you know.
dragongodz is offline   Reply With Quote
Old 21st November 2004, 13:31   #130  |  Link
dragongodz
....
 
dragongodz's Avatar
 
Join Date: May 2002
Location: Australia
Posts: 2,797
hmm ok found this snippet

http://www.geocities.com/medinotes/vcd/chapters.html

if you go down to the Tmpgenc part it says
Quote:
Another excellent MPEG encoder all round. This one does insert regular MPEG sequence headers, but there is a setting should probably be changed from default in the template:

1. If encoding a VCD, make sure that either the PAL VCD or NTSC VCD template is loaded. Then click on "Configure"
2. Click on GOP structure
3. Now, click and tick the option "Create bitstream for editing"

This will ensure that there are regular closed GOPs and thus regular MPEG sequence headers (as you can see in figure 3, TMPGEnc automatically puts in 1 sequence header per GOP).

If this setting isn't ticked, TMPGEnc can sometimes encode the MPEG in such a way that the GOP isn't closed for an extended interval (> 2 seconds). During that interval, no MPEG sequence header will be present and thus there may be an issue with entrypoint (and thus chapter) placement.
so maybe thats why Tmpgenc does the first GOP closed(big maybe i say).

still for dvd all GOPs should have sequence headers anyway.
http://www.pioneeraus.com.au/compute...dvdInfo_9.html

so long as sequence headers are neing written every GOP then i dont think it really matters. still as i said before it is strange that the other encoders do it aswell.
dragongodz is offline   Reply With Quote
Old 21st November 2004, 13:41   #131  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
FWIW, premiere pro has problems with i-frames. editing is fine, but on export it places the b-frame after the i-frame on the other side of it, causing a kind of "double-take" at scenechanges. this only happens when the user has placed an edit on that scenechange.

i learnt this one the hard way.

whether this has anything at all to do with sequence headers and p-frames immediately proceeding i-frames on closed GOPs, i don't know.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 21st November 2004, 19:36   #132  |  Link
hank315
HCenc author
 
Join Date: Nov 2003
Location: Netherlands
Posts: 570
Quote:
Is there a reason for closing the first GOP?
No, there is no real reason.
If you create the first GOP as IPBBPBB... than the closed gop flag may be set to 0 or 1.
But if the first GOP looks like IBBPBB... and the closed gop flag is not set, a lot of decoders and editors will complain even if the first B-frames are backward predicted so it could be decoded fine.

According to the specs:
closed_gop
This is a one-bit flag which indicates the nature of the predictions used in the first consecutive B-pictures (if any) immediately following the first coded I-frame following the group of picture header .
closed_gop is set to ‘1’ to indicate that these B-pictures have been encoded using only backward prediction or intra coding.
This bit is provided for use during any editing which occurs after encoding. If the previous pictures have been removed by editing, broken_link may be set to ‘1’ so that a decoder may avoid displaying these B-Pictures following the first I-Picture following the group of picture header. However if the closed_gop bit is set to ‘1’, then the editor may choose not to set the broken_link bit as these B-Pictures can be correctly decoded.

broken_link
This is a one-bit flag which shall be set to ‘0’ during encoding. It is set to ‘1’ to indicate that the first consecutive B-Pictures (if any) immediately following the first coded I-frame following the group of picture header may not be correctly decoded because the reference frame which is used for prediction is not available (because of the action of editing).
A decoder may use this flag to avoid displaying frames that cannot be correctly decoded.


To be on the safe side and make the stream fully compatible with all decoders just create the first GOP in the same manner as after a scene change and make it IPBBPBB... and set the closed gop flag.
hank315 is offline   Reply With Quote
Old 22nd November 2004, 10:17   #133  |  Link
Peter Cheat
Just a Member
 
Join Date: Aug 2004
Location: Australia
Posts: 225
AFAIK, closed GOP is about how a GOP ends, not how it starts.

Not Closed
I B B P B B P B B I B B P B B

Closed GOP
I B B P B B P B P I B B P B B

(In decoded or display order)

The B-frames in bold are referencing a frame which is unrelated to the current frame - which is wasteful. A closed GOP means that a P frame precedes the next I frame.

CCE and TMPGEnc both start:
I B B P B B P in decoded order (or display order)
1 2 3 4 5 6 7

I P B B P B B in encoded order
1 4 2 3 7 5 6

Avcodec already does this, so I don't have to change anything there. Avcodec also inserts a sequence header with every I frame, regardless of whether the GOP is closed or not, so no problems there.
__________________
If you want it done properly, do it yourself!
Modified Libavcodec Site
Peter Cheat is offline   Reply With Quote
Old 22nd November 2004, 12:48   #134  |  Link
hank315
HCenc author
 
Join Date: Nov 2003
Location: Netherlands
Posts: 570
Quote:
AFAIK, closed GOP is about how a GOP ends, not how it starts.
It's about the start of a GOP. If a GOP is closed you can make a cut before that GOP and both parts will decode OK.
Also in the case of a scene change you start with a closed GOP so you can make a cut before that GOP.
The order I was referring to was the encoding order so:
IBBPBB --> open GOP --> temporal reference 2 0 1 5 3 4
IPBBPBB --> closed GOP --> temporal reference 0 3 1 2 6 4 5

If you write in display order I B B P B B P B B I B B P B B than the bold B-pics actually belong to the next GOP.

If AVcodec starts with IPBBPBB... (encoding order) it's OK but I still think you should set the closed gop flag.
hank315 is offline   Reply With Quote
Old 22nd November 2004, 13:06   #135  |  Link
dragongodz
....
 
dragongodz's Avatar
 
Join Date: May 2002
Location: Australia
Posts: 2,797
wow what a can of worms i opened with 1 little observation.

actually something else i was thinking about Peter, would it be possible for you to make your RC a seperate and selecatable RC ? that way have both old RC and new usable from the 1 program. no need for Nic to release 2 versions of QuEnc for people to test and compare the 2 RC's then.

i know Michael(from FFMpeg) said thats what he planned for a second ,better, RC but as far as i know he has still only half done it(the second RC that is).
dragongodz is offline   Reply With Quote
Old 22nd November 2004, 13:40   #136  |  Link
Peter Cheat
Just a Member
 
Join Date: Aug 2004
Location: Australia
Posts: 225
Quote:
Originally posted by hank315
If you write in display order I B B P B B P B B I B B P B B than the bold B-pics actually belong to the next GOP.
True, but this would depend on the definition of GOP (true if considering decoded order).
EDIT: Since the B-frames are referring to 2 different GOPs, how can you say which GOP it belongs to. Is a bisexual person gay or straight?

@dragongodz
Can be easily done. I've finished the code for closed gop and it seems to work as it should. I'll separate RC next.
__________________
If you want it done properly, do it yourself!
Modified Libavcodec Site

Last edited by Peter Cheat; 22nd November 2004 at 13:44.
Peter Cheat is offline   Reply With Quote
Old 22nd November 2004, 18:12   #137  |  Link
Fl0ppy
Registered User
 
Join Date: May 2002
Posts: 26
Hi again
After severals tests (converting xvid and dvd to mpeg1) i tried nuenc 0.01b and tmpgenc.
If in nuenc i put CQ 100, the quality is great, but if i put CQ 80 or 90 the quality in less than tmpgenc at same quality (80 or 90)
And the file created by nuenc/ffmpeg is half of tmpgenc
And the speed is 32fps (at 352x288 mpeg1) (i can wait)
Fl0ppy is offline   Reply With Quote
Old 23rd November 2004, 00:56   #138  |  Link
dragongodz
....
 
dragongodz's Avatar
 
Join Date: May 2002
Location: Australia
Posts: 2,797
Quote:
if i put CQ 80 or 90 the quality in less than tmpgenc at same quality (80 or 90)
And the file created by nuenc/ffmpeg is half of tmpgenc
if the nuenc encodes are half the size then i am not surprised they are of less quality. you can only fairly judge the quality with encodes of the same size.

two things to also remember.
1. mpeg1 encoding with avcodec is not meant to be the absolute best.
2. the CQ mode is brand new so will probably take a little time and tweaking to get towards optimal.
dragongodz is offline   Reply With Quote
Old 23rd November 2004, 01:10   #139  |  Link
Fl0ppy
Registered User
 
Join Date: May 2002
Posts: 26
Quote:
1. mpeg1 encoding with avcodec is not meant to be the absolute best.

okay, it's better codify with tmpgencoder actually?,'coz i'm trying to migrate to nuenc.
Thanks.
Fl0ppy is offline   Reply With Quote
Old 23rd November 2004, 05:05   #140  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
also, TMPG uses a different scale. so 80 in TMPGenc ≠ 80 in QuEnc.

i'd be interested in seeing what equal sized encodes look like between TMPG and QuEnc.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Reply


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 22:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.