digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   FFMPEG: QuEnc (http://www.digitalfaq.com/archives/encode/8643-ffmpeg-quenc.html)

GFR 03-17-2004 07:22 AM

QuEnc
 
From doom9 forum, a mpeg encoder based on ffmpeg by Nic:

http://forum.doom9.org/showthread.php?s=&threadid=72827

Quote:

QuEnc 0.2 (AVS->M2V/M1V Encoder)
http://nic.dnsalias.com/QuEnc.exe

This little (700kb) app can be used to encode from an Avisynth Script file to a raw MPEG-1/MPEG-2 video stream. I'm hoping it will be a free alternative to CCE. (it uses a built in FFMPEG library for the encoding)

I made it primarily for use with jdobbs Rebuilder app, so any testing or feedback is appreciated as then jdobbs can decide if it's worth including the support in rebuilder.

It supports command line control. Run it with /? as a parameter to see the command line options.

Let me know what you think,

-Nic

Hydeus 03-17-2004 07:36 AM

Agrrr :evil:
You've outrun me by "turning computer on, and finding this on doom9" time :mrgreen:

Did you made some test :?: I will do some late evening today.

kwag 03-17-2004 07:48 AM

If it uses internal FFMPEG library, then we already know what the results will be ;)

-kwag

rhino 03-17-2004 07:57 AM

Quote:

Very early beta, sent it to jdobbs to see what he thinks. Should work, just feed an avisynth file (that outputs YV12 (or use ConvertToYV12) and get a raw MPEG-1 or MPEG-2 file. Uses the FFMPEG library for encoding. Got around 30-35fps encoding speed on my box...quality seems good too.
Think that answers your question, taken from http://forum.doom9.org/showthread.ph...540#post459540

vhelp 03-17-2004 09:00 AM

Thanks GFR :)

I heard, and went running over to doom9 for more info.

I like it when new toys are discovered. Make things all the more interesting
sometimes. I am pretty busy with other matter at home, and try and find the
time to play :lol:

Cheers everyone,
-vhelp

marcellus 03-17-2004 11:56 AM

Hi everybody!

I briefly tried QuEnc 0.2 with 352x288 PAL source at 700 kbps target.

It's pretty good for an early version (but not good enough for me for the moment). It uses a GOP size of 12, with IBBPBB... pattern.

The good:
-Is incredibly fast (comparing to ffvfw, I still haven't tried mencoder, I'm scared of what I see in that other thread, I believe I have to spend an entire week-end to begin to understand what is going on there :oops: ). I get about 50-55 fps with trellis and 60-75 without.
-I'm under the impression that the bitrate fluctuates much less than with ffvfw (the peaks are lower).
-The GUI is neat.

The bad:
-The GUI is too neat, it lets out very few options for the user. I hope this will change.
-The medium quantization is much higher than with ffvfw for the same source and the q line jumps like hell in BV. This gives easy noticiable quality fluctuation with the GOP. With 2 pass encoding (pretty useable since is very fast anyway) this jumpy q line is a little smoother but the quality is still badly fluctuating.

I hope things could change if we could have acces to more advanced options.

So for the the moment I stick with ffvfw (as it is in heavy developement, as I can see). But who knows... I'll wait for future versions anyway.
marcellus

kwag 03-23-2004 01:56 PM

@All,

Well, Nic has really done it now :)
I just tested his latest version of QueEnc ( 0.45 ), and the results are just excelent.
He has included KVCD's Notch matrix as an option.
Here's the latest version: http://nic.dnsalias.com/QuEnc.exe

Here's my sample with this version: http://www.kvcd.net/quenc-test.m2v

-kwag

vmesquita 03-23-2004 07:00 PM

Great! :D :D :D :D :D :D :D
Now I know what will be the encoder for DIKO... AVS support, full command-line, GOP and KVCD matrix... How could I ask for more?
I'll put QuEnc integration for DIKO this is high priority "To-do" list! Thanks Nic for the great work. :)

incredible 03-23-2004 07:11 PM

Quote:

Originally Posted by vmesquita
Great! :D :D :D :D :D :D :D
Now I know what will be the encoder for DIKO... AVS support, full command-line, GOP and KVCD matrix... How could I ask for more?
I'll put QuEnc integration for DIKO this is high priority "To-do" list! Thanks Nic for the great work. :)

??

Full command line?

I did a test on a capture and the mencoder-by-hand way resulted in a better quantisation quality :?

:)

vmesquita 03-23-2004 07:15 PM

i didn't try doing quality tests yet. But mencoder can't accept AVS input in a automated way.

kwag 03-23-2004 08:32 PM

There is still some "timing" problems I've found. If you encode with open GOP, when playing back, the movie skips and jumps all over the place.
I'm currently testing with closed GOP, and so far, seems to work correctly.
There's a problem with the encoder when creating short GOPs. Looking at the GOP with an analyzer, I can clearly see the short structure messed up. Look:

Code:

GOP #        TimeCode        GOP Length        Structure        Closed?        Seq. Header?       
1        00:00:00:00        16        IPBBPBBPBBPBBPBB        No        Yes       
2        00:00:00:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
3        00:00:01:10        15        IBBPBBPBBPBBPBB        No        Yes       
4        00:00:02:01        3        IBB        No        Yes       
5        00:00:02:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
6        00:00:02:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
7        00:00:03:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
8        00:00:04:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
9        00:00:05:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
10        00:00:05:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
11        00:00:06:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
12        00:00:07:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
13        00:00:08:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
14        00:00:08:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
15        00:00:09:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
16        00:00:10:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
17        00:00:11:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
18        00:00:11:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
19        00:00:12:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
20        00:00:13:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
21        00:00:14:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
22        00:00:14:22        6        IBBPBB        No        Yes       
23        00:00:15:04        3        IBB        No        Yes       
24        00:00:15:07        3        IBB        No        Yes       
25        00:00:15:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
26        00:00:16:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
27        00:00:16:22        12        IBBPBBPBBPBB        No        Yes       
28        00:00:17:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
29        00:00:18:04        6        IBBPBB        No        Yes       
30        00:00:18:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
31        00:00:19:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
32        00:00:19:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
33        00:00:20:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
34        00:00:21:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
35        00:00:22:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
36        00:00:22:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
37        00:00:23:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
38        00:00:24:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
39        00:00:25:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
40        00:00:25:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
41        00:00:26:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
42        00:00:27:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
43        00:00:28:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
44        00:00:28:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
45        00:00:29:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
46        00:00:30:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
47        00:00:31:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
48        00:00:31:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
49        00:00:32:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
50        00:00:33:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
51        00:00:34:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
52        00:00:34:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
53        00:00:35:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
54        00:00:36:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
55        00:00:37:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
56        00:00:37:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
57        00:00:38:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
58        00:00:39:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
59        00:00:40:04        18        IBBPBBPBBPBBPBBPBB        No        Yes       
60        00:00:40:22        18        IBBPBBPBBPBBPBBPBB        No        Yes       
61        00:00:41:16        18        IBBPBBPBBPBBPBBPBB        No        Yes       
62        00:00:42:10        18        IBBPBBPBBPBBPBBPBB        No        Yes       
63        00:00:43:04        18        IBBPBBPBBPBBPBBPBB        No        Yes

Look at the structure when the GOP size is 3 :!:
There are no P frames.
So a decoder will some times see IBBIBB other times IBBP or IBBIBBPIBBPIBBIBBIBB
so the decoder will "think" to expect IBBP, when in reality, it will receive IBBIBB some of the times. This is throwing off the decoder's sync.
So for the time being, closing the GOP seems to fix this, because the GOP is larger.

-kwag

kwag 03-23-2004 09:11 PM

@vmesquita,

The good thing about this GUI/Encoder combo, is that we can forget about file size prediction :)
I already encoded Red Planet, targetting 1,332,485KB, and the final encode size was 1,365,477KB. So this is really sweet :D

-kwag

audioslave 03-23-2004 10:56 PM

Yes, I encoded a clip from Shrek and it looks amazing! Only one problem, when I burned the clip and watched it on my stand alone DVD it looked almost interlaced?! Any ideas why? BTW I encoded the clip with open GOP. Will try another clip with closed GOP...

kwag 03-23-2004 10:59 PM

Quote:

Originally Posted by audioslave
Yes, I encoded a clip from Shrek and it looks amazing! Only one problem, when I burned the clip and watched it on my stand alone DVD it looked almost interlaced?! Any ideas why? BTW I encoded the clip with open GOP. Will try another clip with closed GOP...

Was this PAL :?:
I've only tested on progressive matereial, and then I run PULLDOWN.EXE on the .m2v, and then multiplex with audio. Looks great on the standalone DVD player. :)

-kwag

audioslave 03-23-2004 11:15 PM

No, it was the NTSC version of the movie. So, maybe I should try running pulldown on this sucker to make it work?

EDIT: BTW where can I download this program :?:

kwag 03-23-2004 11:17 PM

Quote:

Originally Posted by audioslave
No, it was the NTSC version of the movie. So, maybe I should try running pulldown on this sucker to make it work?

Definitely :D

-kwag

jorel 03-23-2004 11:17 PM

i only did tests changing to the KVCD notch matrix and 16:9,nothing more
i need to learn how to do/use command lines for QuENC!
who can help me?
some samples and hints are welcome!
:wink:






@ all:
hey, come back here..... :P

audioslave 03-23-2004 11:20 PM

Where can I find this program :?: (PullDown.exe)

kwag 03-23-2004 11:21 PM

Quote:

Originally Posted by audioslave
EDIT: BTW where can I download this program :?:

http://www.kvcd.net/PULLDOWN.EXE

Edit: Remember this is a command line utility :!:

audioslave 03-23-2004 11:25 PM

Thanks. I found this - a GUI version called DoPulldown here:
http://www.doom9.org/Soft21/SupportU...wn.1.0.0.0.zip
Is it the same program exept for the GUI?

kwag 03-23-2004 11:26 PM

Quote:

Originally Posted by audioslave
Thanks. I found this - a GUI version called DoPulldown here:
http://www.doom9.org/Soft21/SupportU...wn.1.0.0.0.zip Is it the same program exept for the GUI?

Yes, I believe so :)

-kwag

audioslave 03-23-2004 11:30 PM

Burning right now...
I'll let you know in a second or two...

audioslave 03-23-2004 11:35 PM

YES :!: That was it. Works like a charm :wink: Damn, this looks good. The quality of QuEnc 0.45 is really something else :!: :)
Thank you for the tip Kwag.

kwag 03-23-2004 11:58 PM

Now try encoding the complete movie using CalcuMatic (or other bitrate calcs) to get your average bitrate. Then see if the final size matches closely the wanted size ;)

-kwag

incredible 03-24-2004 02:06 AM

Kwag, the GOP 3 Frames issue to me seems like an Scene Change issue.

kwag 03-24-2004 02:17 AM

Quote:

Originally Posted by incredible
Kwag, the GOP 3 Frames issue to me seems like an Scene Change issue.

Yes it does. But only when very close scenes are detected. If you look when the GOP was 6, there is no problem. There should be a constraint in the encoder to limit the GOP size to a minimum of IBBP (4 frames), and that should correct the issue. Or really: minGOPSize = number_of_B_Frames + 2 ;)

-kwag

marcellus 03-24-2004 05:15 AM

Quote:

Originally Posted by kwag
Quote:

Originally Posted by incredible
Kwag, the GOP 3 Frames issue to me seems like an Scene Change issue.

Yes it does. But only when very close scenes are detected. If you look when the GOP was 6, there is no problem. There should be a constraint in the encoder to limit the GOP size to a minimum of IBBP (4 frames), and that should correct the issue. Or really: minGOPSize = number_of_B_Frames + 2 ;)

-kwag

I think this issue can be resolved. ffvfw has an option for minimum interval between I frames and since is also libavcodec based I think that nic can expose that setting as an advanced option.

Anyway, QuEnc made a lot of progress but it's output is still under the quality of ffvfw (ffdshow actually) and the gain in speed does not pay the quality loss. But it's still 0.45 release...

Edit: Well, I forgot, another big advantage of QuEnc is VBV compliancy. I wonder why ffvfw is the only libavcodec incarnation thas has this issue, why milan does not fix it...

marcellus

incredible 03-24-2004 06:15 AM

As I got the actual QuEnc vers. .... where can you see a command line option??? My vers. does not show one, neither shurely to alter it as its not avaiable.

He should offer more options of ffmpeg in his GUI .... for example processing interlaced sources.

vmesquita 03-24-2004 06:23 AM

Man, it's very fast!!!!! :D 8)
I am currently encoding a AVI movie using the latest Dialhot v4 script:
With Trellis, GOP 18 and KVCD Notch I get 19.5 fps,
Without trellis, it goes up to 24 fps (realtime!)
Amazing speed.
Can't comment on quality yet, let's wait for the outcome. I am doing 2 pass VBR. I had previously encoded this movie using CCE so I'll be able to do a good comparison.

@incredible:
Do this:
QuEnc /?
A window will pop up with command-line options.

marcellus 03-24-2004 07:33 AM

Quote:

Originally Posted by marcellus
I think this issue can be resolved. ffvfw has an option for minimum interval between I frames and since is also libavcodec based I think that nic can expose that setting as an advanced option.

I have to retract what I said. In ffvfw the minimum I interval setting doesn't work as expected. With any value other than 1 for min I interval all GOPs are screwed, it puts a lot of consecutive P frames
Normal GOP: IBBPBBPBB....
Screwed (example): IPPPBBPPPPPPBBPPP..

kwag 03-24-2004 10:24 AM

Quote:

Originally Posted by marcellus

Edit: Well, I forgot, another big advantage of QuEnc is VBV compliancy. I wonder why ffvfw is the only libavcodec incarnation thas has this issue, why milan does not fix it...

Well, you can use VBVPatcher on your ffvfw encodes, and then the MPEG file will be "branded" compliant.
But the way I see it, I find QuEnc much more simpler and flexible than ffvww, and I'm getting extremely good results.
I think we will all be using QuEnc more often ;)

-kwag

marcellus 03-24-2004 11:37 AM

@kwag
I agree with you, QuEnc is very good. I would like though to have all the libavcodec options out to play with them. :twisted: I hope it will be in 1.0 release.
I know that QuEnc has a very good quality right now but I'm targeted on small resolution (352x288) and any artifact is more annoying than with full resolution (I have double size blocks on TV screen). So thats why I am very picky and since the speed of ffvfw is acceptable at 352x288 (25-30 fps) and VBV issue is ignored by my player, you know what I choose for the moment. I am sure that QuEnc could do a better job with the right settings but we still have not access to them.
marcellus

audioslave 03-24-2004 04:45 PM

As I posted earlier; my encode of Shrek looks amazing! Even though I encoded it in MPEG-2 and SVCD resolution (480x480). Have anyone tried QuEnc with MPEG-1 output? Results :?:

kwag 03-24-2004 04:46 PM

Quote:

Originally Posted by audioslave
Have anyone tried QuEnc with MPEG-1 output? Results :?:

I did, and I also liked the MPEG-2 results better. Seems the encoder creates better results at MPEG-2.

-kwag

audioslave 03-24-2004 05:00 PM

Yes. And another thing that's great about being able to encode good looking KSVCD's (MPEG-2) is that they're playable almost everywhere - on almost everybody's stand alone DVD players :D Even at my parents' house... :wink:

audioslave 03-24-2004 05:13 PM

From what I understand it's best to use a closed GOP?
The setting I used for Shrek (NTSC) were the following:

Main window
* MPEG-2
* Use VBR - Checked
* High Quality - Checked
* Use Trellis Quant - Checked (But have no clue what this is :roll: )
Advanced options
* Force Closed GOP - Checked
* Use KVCD "Notch" Matrix - Checked
* GOP Size=18
* Max B-Frames=2
* 4:3 Aspect Ratio

Then, in the main window, I simply pasted the average bitrate I got from CalcuMatic and clicked Encode. Ta-da!
Please, inform me if I should use some other settings for my encodes.

Question: Can we use the GOP from the TMPEnc templates with QuEnc (PAL=25, NTSC=30, Film=24)?

@Kwag
Very nice quality on your Red Planet clip :!:

EDIT: If you use HybridFuPP to encode your movies - Take the average bitrate from CalcuMatic and multiply it by 1.05 :wink:

vmesquita 03-24-2004 05:17 PM

Well, my test got a very wierd result. I asked to encode 480x480 at 976 kbps, and used trellis, 2 pass VBR, Notch, GOP 18.
The file came out at 725 kbps. I opened it with BitrateViewer, and The Q line was constant at 2.67. I have the same file encoded with CCE at "real" 976 kbps, but still could not do a side by side comparisson. I opened the encoded file and it looked good, but in 17" monitor most stuff do. :D

kwag 03-24-2004 05:20 PM

Quote:

Originally Posted by audioslave
From what I understand it's best to use a closed GOP?
The setting I used for Shrek (NTSC) were the following:

Main window
* MPEG-2
* Use VBR - Checked
* High Quality - Checked
* Use Trellis Quant - Checked (But have no clue what this is :roll: )
Advanced options
* Force Closed GOP - Checked
* Use KVCD "Notch" Matrix - Checked
* GOP Size=18
* Max B-Frames=2
* 4:3 Aspect Ratio

Then, in the main window, I simply pasted the average bitrate I got from CalcuMatic and clicked Encode. Ta-da!
Please, inform me if I should use some other settings for my encodes.

You got them all right :D
Quote:


Question: Can we use the GOP from the TMPEnc templates with QuEnc (PAL=25, NTSC=30, Film=24)?
Yes, but I think this encoder doesn't like longer GOPs very much. Stick to 15(PAL) or 18(NTSC)
Quote:


@Kwag
Very nice quality on your Red Planet clip :!:
Thanks :D
Quote:


EDIT: If you use HybridFuPP to encode your movies - Take the average bitrate from CalcuMatic and multiply it by 1.05 :wink:
No. It shouldn't make any difference, because the encoder is trying to maintain average bitrate.
BTW, what was your final file size on "Shrek", compared to the size wanted by CalcuMatic :?:

-kwag

audioslave 03-24-2004 05:26 PM

kwag wrote
Quote:

No. It shouldn't make any difference, because the encoder is trying to maintain average bitrate.
BTW, what was your final file size on "Shrek", compared to the size wanted by CalcuMatic
Actually, when I first encoded Shrek (my first try with QuEnc) with the average bitrate from CalcuMatic the final vide file got about 40 MB too small. But then I multiplied the avg.bitr. by 1.05 and the final movie - muxed - is 806 MB, perfect!

Note: When I use Incredible's Slicer routine to predict I also have to multiply the wanted sample size by 1.05 to get the final encode right.

EDIT: This is when I use HybridFuPP to encode the DVD's

vmesquita 03-24-2004 05:28 PM

Wait a minute....
So the average bitrate is not the average bitrate that the movie will be encoded? :? :? :?


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.