Log in

View Full Version : QuEnc 0.51 (AVS->M2V/M1V Encoder)


Pages : 1 2 [3] 4 5 6 7 8 9 10

tickey
23rd March 2004, 01:23
Did a couple of quick 10 min samples (trim function in avisynth and xvid avi source)for skvdc....WOW
winxppro/amd2200+@1800noOC/1 GB ram
900 kbps.
No HQ or trellis.
KVCD notch matrix /force closed GOP enabled.
GOP=24, Bframes=2
colour=Original Red :D
Speeds of 42 to 45 fps.
Happy with the quality. No Pulsing.

Removed the trim function to get the full file and Woaaaah...Smohhhhhkin' fast.
Started out @ 120+ fps settled down to 60 fps and worked its way back up to 100 and still rising....Holy Shiat :D
Hopefully the vid looks OK!
It's gonna be done in a couple of minutes and I only sarteded it about 15 minutes ago :eek: :eek: :cool:

Edit:
Update: It was only encoding a 2 line "avs access violation error blah blah" after the first 10 mins .:confused: :(
I will have to shut down some proggies, disconnect from internet, etc. and do a proper encode. Sorry to freak yuz all out! :o :D

Edit2: Did a test on same avs (no other proggies/no internet/no firewall) with ffvfw and it crapped out at same place=so problem with the source avi.
Steady 60 fps vs ffvfw @ 30, very nice.
DVD source=testing now and looking good-46-48 fps...sweet!
Better get that donation page up, the cash might come rollin' in :):D

kwag
23rd March 2004, 05:11
@Nic,

There's a problem in the encoder, not related to your GUI, of course. But I wanted you to be aware of this, and maybe you can look into it.
Here's a sample where a quantization fault is clearly shown: www.kvcd.org/quenc.mpg
Look at the "flashes" over the girl.

-kwag

DDogg
23rd March 2004, 06:38
Nic, I see you are still a glutton for punishment :)

Hey, on the by and by and whenever/if ever, do you think you could change the notch matrix to a custom button or something so we could put in whatever our personal preference is? Also, just being curious (you got enough pressure), does the base of this encoder you are using have a quant based technique? I'm more interested in constant quality (to use that term very loosely) than bitrate/size.

Hope you are doing well, and that the ends of those fingernails can still be seen.

sidders
23rd March 2004, 07:39
Hi Nic,
Using that script it plays fine in VirtualDub and Media Player. Just won't encode in QuEnc.

Nic
23rd March 2004, 10:50
@Nocturno: Have you only tried with VBR turned off? If so, then I've found the problem. If not, then im still looking ;)

@Sidders: Hmmm, how weird, ill put in a better error message, see if that helps.

@Ddogg: Ill look into how easy that is to do, I think it's pretty simple.

@kwag: great bug showing clip...any chance you get me that part of the original file? so that I can recreate the error, im sure it can be fixed...

@robw: Hmmm, just confuses matters and I dont like to look back or have to support old versions...

@HarryM: MP2 Encoding in libavcodec is of poor quality, could try adding another library, or doing ac3 encoding though. But I might end this project earlish to concentrate on ReJig.

-Nic

HarryM
23rd March 2004, 11:37
Originally posted by Nic
@HarryM: It's not ;) honestly if you see pulsing now, then it's due to something else. It's not the same pulsing that was there originally. Try it with that script I posted and you'll see it's gone.
Maybe I have I-Frame and P/B-Frame quants factors set too different, please post the settings you used.

-Nic

I use default settings (GOP=12, 2 b-frames). I put at evening any example.

LigH
23rd March 2004, 13:17
As far as I can see, QuEnc worked well with AviSynth 2.5 and YV12 output (I did not even need ConvertToYV12, because YV12 is default in AviSynth 2.5 with MPEG2Source).

Unfortunately, there is no real bitrate control, as long as I cannot define max and min bitrates, VBR is not very useful for encoding in a limited bitrate range environment. But I guess that the fault is on ffmpeg's side, not Nic's.

I even tried to encode MPEG-2 video using the ffmpeg.exe v0.4.8 shipped together with ffmpegGUI beta 0.3 (the one which contains the fixed AC-3 encoder). But this CLI always assumed a target bitrate of "2 kbps" (http://forum.doom9.org/showthread.php?s=&postid=463084#post463084) (not to mention that AVS sources are impossible). From this point of view, QuEnc is at least working... ;)

Good work, Nic, and awaiting the next releases...

Nic
23rd March 2004, 14:27
I've been working on the rate control...
It's working a lot better now, CBR (Non VBR) works, and the rate control will hit pretty much the desired target now. Will be out in the next release.

(@Harry: These ratecontrol changes stop the pulsing you saw two (which was to do with heavy bitrate fluctuation))

The thing is you cant set a minimum or a maximum bitrate with libavcodec. For one minimum always has to be 0 now, or the rate control doesnt work. secondly max birate desired bitrate have to be close together and slightly higher than you want. basicaly ratecontrol isn't working as expected.....

But ill work on it :)

-Nic

kwag
23rd March 2004, 14:41
Originally posted by Nic

@kwag: great bug showing clip...any chance you get me that part of the original file? so that I can recreate the error, im sure it can be fixed...

-Nic
Hi Nic,

Any footage that has a high contrast, like a bright horizontal lamp or bright source against a dark background (like the clip I provided), will show the same faults.
Actually, the faults are dated back to the original MPEG Software Simulation Group sources.
If I recall correctly, It's all in the rate control routines.
When I was working on the KVCD encoder, I recall fixing some of that, but don't remember exactly where in the code. It was back in 2002. But the file is "ratectl.c", which I modified the sources from the MPEG Group, 2mpeg1 project and some things from the same file of the DVDx project. Then the quantization flaw was fixed. If you want, PM me and I'll send you that function, and maybe you can pull out the parts that correct the problem.

Stupid me!, you can get the sources here: http://kvcd.net/forum/viewtopic.php?t=1825

-kwag

Nic
23rd March 2004, 15:45
@kwag:
I tried artificially making some similar footage but to no avail. If you could somehow get me a clip that when encoded illustrates the problem that would be real useful, because then i'd send it to the ffmpeg team.

kwag
23rd March 2004, 15:47
Originally posted by Nic
@kwag:
I tried artificially making some similar footage but to no avail. If you could somehow get me a clip that when encoded illustrates the problem that would be real useful, because then i'd send it to the ffmpeg team.
Let me cut that part from the VOB, and I'll give you a link to download.
Also, check my previous post. I edited it with a link to the sources.

-kwag

SeeMoreDigital
23rd March 2004, 16:04
My god this could be good...

Nics perseverance with a sprinkling of kwags Mpeg1 VCD matrices could add up to the best looking low bitrate Mpeg1 seen in years...

I never could get that ACP application to work properly :(

Cheers guys

kwag
23rd March 2004, 16:05
Hi Nic,

Here you go: http://www.kvcd.org/nic.vob.cut.7.vob
Let me know when you download it, so I can delete it from the server.

-kwag

bilu
23rd March 2004, 16:17
Nic,

If you're able to fix that rate control problem, please submit a patch to the ffmpeg developers. Linux users are people too ;)


Bilu

kwag
23rd March 2004, 16:25
@Nic,

The problem is related to the use of the notch matrix + Trellis.
I just tested using notch + trellis, and the fault is seen.
Disabling Trellis, the fault is gone!
Could you confirm this?

-kwag

Nic
23rd March 2004, 16:27
On that tiny clip I get cant get the problem to reoccur...it actually might be fixed in the latest CVS. Ill post a new version here tonight and see if that solves the issue...

-Nic

@bilu:
It's not a patch :( It's just a workaround on what values to set to get a good outcome....

Nic
23rd March 2004, 16:34
http://nic.dnsalias.com/QuEnc.exe

* Latest CVS (with iDCT permutation fix)
* Ok, hopefully this has better rate control.
* Removed some of the options I'd added. As most of the options people recommend are bad for the video! (time taken > != Better Quality)

-Nic

tickey
23rd March 2004, 17:32
I can't get 0.44 working...
Failed on AVS load
Does wxyz.avs exist?Error code 26
then
-error "could not open input file"

both avi or dvd source
-both open, encode in 0.43

Nic
23rd March 2004, 17:39
That error was in there to try and help sidders....dont know why it doesnt work Grrrrr...

anyway:
http://nic.dnsalias.com/QuEnc.exe (0.45)
turns that error off.

-Nic

tickey
23rd March 2004, 17:46
.45 working,encoding :sly:

sidders
23rd March 2004, 18:08
Still at work - will try that new version when I get home. Cheers Nic

ffroms
23rd March 2004, 18:09
I had same problem like tickey. Also I had problem with simple script and with message "ConvertToYV12()".
I've made script like this one
AviSource("C:\test.avi",false) and QuEnc returns
"Failed on AVS Load!
Does file c:\test.avs exist? (Errorcode: 126)"
Then I changed script to
AviSource("C:\test.avi") then I have message
"AVS File is not outputing
(Use ConvertToYV12()at end of script)"
I've changed script back to
AviSource("C:\test.avi",false) and opened it in VirtualDubMod and then minimized VDubMod (not closing) and try again and everything went well without any error. I guess there is some problem with QuEnc and connecting with avisynth. This test was made with QuEnc0.44
Didn't try it with DVD2AVI project yet.

FFS

Nic
23rd March 2004, 18:20
Try 0.45,

AviSynth has a problem that if you do an AVIFileOpen on a .avs file that does not exist it doesn't return any error ?!? Hence you get the YV12 error even for files that arent there.

0.45 should be ok for everyone else, but still might not work for sidders

Nocturno
23rd March 2004, 19:17
@Nic things are looking better,but not quite fixed

All tests : High quality = on , Trellis = off
Version 0.45 used

tested: 40 second clip at 7909 bitrate

CBR - filesize perfect! : 41,057,389
VBR - Filesize way undersized : 6,882,331
2-pass - No vbr filesize perfect!: 41,192,645
2-pass - vbr : 6,873,084

CCE filesize : 41,274,092

problem still exists if i use VBR.

Nic
23rd March 2004, 19:22
That's really weird...have no idea...on mine im more likely to get oversize than undersize now...i.e.

78 second ( 54meg ) MPEG-2 File
VBR One pass 7909kbps makes a file thats:
75,794,539
Should have been
77,112,750

Hmmm, ill keep on trying....

-Nic

ps
@Nocturno:
Could you give me a few more of your settings....GOP Size, MPEG-1 or MPEG-2, Closed GOP on/off, etc
(just tried with MPEG-1, rate control didnt work as well...was your test with MPEG-1, could you try the same clip with MPEG-2 VBR just to check?)

kwag
23rd March 2004, 19:42
File size target working like a charm here.
The movie I encoded (one pass VBR), with an average bitrate of 1709.2Kbps, created a target size of 1,332,485KB and the wanted size (based on my calculator) was 1,365,477KB.
So that's not bad at all!

@Nic,
With 0.45, you obviously did something different, or something changed on the CVS. I just tested the same clip WITH Trellis + Notch enabled, and there are no artifacts at all! So whatever it was, it's gone :)

Note: Could you change the extension to .m1v when MPEG-1 is selected?

Edit: Sample encoded with version 0.45 + Notch + Trellis. GOP=18. Open GOP. 2 B-frames. Target average bitrate 1709Kbps. (target for ~3 movies per DVD media). Using plain .avs script, with only "Deen()" as filter.
http://www.kvcd.org/quenc-test.m2v

Thanks,
-kwag

ffroms
23rd March 2004, 19:58
Originally posted by Nic
Try 0.45,

AviSynth has a problem that if you do an AVIFileOpen on a .avs file that does not exist it doesn't return any error ?!? Hence you get the YV12 error even for files that arent there.

0.45 should be ok for everyone else, but still might not work for sidders

Acctualy I was using AVI as source. If I set without audio with AVISource("xxxxx.avi",false) than it returns that there is no file to open, but when I set AVISource("xxxxx.avi") then I get error about YV12 even AVI is at right place and AVI is YV12. When I open same AVS with VirtualDubMod and then use QuEnc everything is OK. It looks like QuEnc needs VirtualDubMod to connect with avisynth. I don't know.
I can't test new 0.45 'couse can't get to your site. I'll try later.

FFS

DDogg
23rd March 2004, 20:25
Using 0.45, I can easily reproduce the pulsing problem when using MPEG1 on the segment of frames 2225 to 2400 of "Missing". This is using a standard avisynth script with no resize opening a ff d2v (dg)with mpeg2decDG.

This is with or without trellis, with or without Notch, or with both turned off or on. Nic, would having a vob segment be useful to you? I would have to ftp up to you, Kwag or somebody with space as I don't have any place to put it.

I did a complete reproducible test kit. If needed, it is 9.4 megs.

Nocturno
23rd March 2004, 21:03
@Nocturno:
Could you give me a few more of your settings....GOP Size, MPEG-1 or MPEG-2, Closed GOP on/off, etc
(just tried with MPEG-1, rate control didnt work as well...was your test with MPEG-1, could you try the same clip with MPEG-2 VBR just to check?)


i didn't change any of the default settings, and yes i encoded to mpeg-2

settings where :
Mpeg-2

bitrate:7909
use vbr: checked on
High Quality : checked on
Use trellis : off
2-pass encoding: on (tried on and off .. no difference for VBR problem)

Force closed gop : off
use kvcd matrix : off
gop size : 12
max b-frames : 2
16:9 aspect

Undersizing only occurs at vbr mode .. cbr seems allright now.

TFM_TheMask
23rd March 2004, 21:45
Great Job Nic, I have only a few requests and one problem.

requests:

1) is it possible to add to the cmd line the option to choose between VBR and CBR.

2) is it possible to add to the cmd line the option High Quality on/off.

Problem

When I run QuEnc in cmd line mode (with the -close tag) and the encoding has finished Quenc dissapears from the screen but resides in memory (You can still see that Quenc is active in the Task Manager).

When I run QuEnc the normal way and it has finished encoding, and I close Quenc manualy (Quit button) I get a windows read error on memory.

Has someone got this error also?

TFM_TheMask
23rd March 2004, 22:02
A few other issues

In cmd line mode when I choose -aspectratio 4:3 I got a 16:9 encoded video. When I use -aspectratio 16:9 I got a 4:3 encoded video.

When I encoded a mpeg1 movie and then want to make a mpeg2 movie with cmd line mode (so leaving the -mpeg1 tag) QuEnc still encodes a mpeg1 movie.

Is this the same with you Nic?

Nic
23rd March 2004, 22:18
@TFM: Thanks for the bugreport, it's hard for me to test everything so I do miss bits. Ill fix those in the next release.

@Ddogg: you got a PM :)

@Nocturno: I really dont understand that...ill see if I can find a clip of mine that produces the same problems...VBR's worked ok for me so far.

sidders
23rd March 2004, 22:44
SOLVED IT! Having recently reformatted my PC, I was using version 2.08 of AVISynth - changed to 2.54 with compatable version of MPEG2DEc3.dll and everything is fine!

Thanks for the help Nic - seems great so far!

Prosper
24th March 2004, 00:57
First off, let me say thank you for such a useful little program, it rocks!

One thing that I have noticed though - it doesn't like it when I run multiple instances, working on different videos simultaneously (2 processor machine). The first pass works OK but once that's finished, both instances start trying to encode the same video on the second pass. IE Instance 1 encoding clip 'A,' instance 2 encoding clip 'B.' Once the first pass for 'A' and 'B' is finished, instance 1 and 2 start on the second pass, both encoding clip 'A.'

vmesquita
24th March 2004, 00:58
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. :)

Matthaeus
24th March 2004, 01:18
@Nic:
Hey, the VBV sizes are correct now! (reported by
bbMPEG's multiplexer). Thanks a lot! However the maximum bitrate is ~2.6 Mbps when encoding MPEG-1 video (should be 1150 kbps for VCD compliance).

Btw, would you add more Aspect ratio options or Custom AR option?

Some common PAR values for VideoCD:
1.0000 (Square pels) - already exists in QuEnc
PAL:
0.9375 (CCIR601 625 lines)
0.7031 (16:9 625 lines)
NTSC:
1.1250 (CCIR601 525 lines)
0.8437 (16:9 525 lines)

jdobbs
24th March 2004, 01:25
@Nic

Great job. This encoder is getting to be quite the tool!

Thanks.

human75
24th March 2004, 01:27
This is my old message

"Create AVS script DoITFAST4U.Tested QuEnc 0.41 an average bitrate of VBR 4000. I didn't get a good quality.CCE is good on VBR 4000 but QuEnc 0.41 bad quality.what is wrong?Thanks for ideas. "

this is my new message :=))
everything is same (my avs script and avi file and other)
but quality is wonderfull with QuEnc 0.45,but i have some question.
i encode my .avs file with QuEnc 0.45 and CCE. and I check my .m2v and .mpv file with bitrate viewer program.
Bitrate viewer report this results:
QuEnc 0.45 .m2v results
---------------------------------------------
Num. of picture read: 8394
Stream type: MPEG-2 MP@ML VBR
Resolution: 720*480
Aspect ratio: 4:3 Generic
Framerate: 23.98
Nom. bitrate: 13333600 Bit/Sec
VBV buffer size: 112
Constrained param. flag: No
Chroma format: 4:2:0
DCT precision: 8
Pic. structure: Frame
Field topfirst: No
DCT type: Frame
Quantscale: Linear
Scan type: ZigZag
Frame type: Progressive
Notes:
-------------------------------------------------
CCE .mpv results
Num. of picture read: 11192
Stream type: MPEG-2 MP@ML VBR
Resolution: 720*480
Aspect ratio: 4:3 Generic
Framerate: 23.98
Nom. bitrate: 9800000 Bit/Sec
VBV buffer size: 112
Constrained param. flag: No
Chroma format: 4:2:0
DCT precision: 9
Pic. structure: Frame
Field topfirst: Yes
DCT type: Frame
Quantscale: Linear
Scan type: ZigZag
Frame type: Progressive
Notes:
-----------------------------------------------
.avs is same.
My questions
QuEnc Nom. bitrate: 13333600 Bit/Sec!!! but CCE Nom. bitrate: 9800000 Bit/Sec
and
Field topfirst: Yes in CCE but Field topfirst: No in QuENC 0.45.This is normal and DVD compliant!If your answer is no!How can i fix this problem.Thanks for great encoder.

Sorry for bad english

DDogg
24th March 2004, 02:26
human75, regarding "Nom. bitrate: 9800000 Bit/Sec", first check if you have "DVD compliant" checked in CCE. If so, uncheck it and rerun your test.

HarryM
24th March 2004, 08:17
Originally posted by Nic
@TFM: Thanks for the bugreport, it's hard for me to test everything so I do miss bits. Ill fix those in the next release.




I notice this bug too.
And another bug - If I select MPEG1 instead MPEG2, I get suffix="M2V" still, paradoxly for MPEG1 too.

Corectly is - "M1V" for MPEG1, "M2V" for MPEG2

"Pulsation" don't exists anymore with v0.45. :D
Tmpgenc produces better quality still, unfortunately with half speed.
Quenc is devil quick. :devil:

Nic
24th March 2004, 09:54
Im not around for the rest of the day, but thanks for the feedback.

@Matthaeus: MPEG-1 Does have wacky Aspect Ratio info, I noticed that...ill add a drop downlist.

@Prosper: It's because they'll both be trying to use the same logfile. Ill make it so the logfiles are created using the name of the encoding avs and then deleted afterwards.

Nocturno
24th March 2004, 18:57
@nic

i did another test , this time with pal material,same settings..same problem as before.. it came out 16mb instead of 40.

my .avs reads:

LoadPlugin("D:\avi2dvd\filters\mpeg2dec3.dll")
v1 = avisource("D:\scary\(ASH)Nissan Skyline GTR.avi",False)
v2 = Blankclip()
AudioDub(v1,v2)
LanczosResize(720,424,0.0,0.6)
AddBorders(0,28,0,28)
trim(0,1000)

using avisynth 2.54

source=704x528.

only difference in avisynth script is with CCE is use :
converttoyuy2()
and with Quenc i leave that line out as avisynth outputs YV12

have you tried divx/xvid to dvd res with my script?

(and i know aspect is wrong, it's just a test script ;) )

djan
25th March 2004, 00:09
Hi Nic, just to let you know your Encoder is amazing, I see no difference with CCE. I'm sorry about when I said the quality was poor at low bitrates. Now that you resolved the major bugs, your encoder works very well. Keep up your great work on both ReJig and QuEnc.

Nic
25th March 2004, 12:31
@djan: Thanks :) And hopefully it will get better and better

@Ddogg: Have you tried your test clip with QuEnc 0.45? I can't repeat the problems you were having...

-Nic

dragongodz
25th March 2004, 12:47
Nic - did you get my message and email ?

Nic
25th March 2004, 15:54
Yup, havent had chance to reply...been busy. But will soon! :)

DDogg
25th March 2004, 16:44
@Ddogg: Have you tried your test clip with QuEnc 0.45? I can't repeat the problems you were having... That is surprising. Yes, I did use .045 for the test. The settings were mpeg1 @2500, VBR, HQ, trellis, notch, 4:3. ALthough I could reproduce it with any settings so long as MPEG1 was selected.

So that you can see, I uploaded the encoded segment to the same place as last time - "ddogg-test-clip.rar". You should see obvious pulsing.

Nic
25th March 2004, 16:53
Didn't realise it was with MPEG-1 you got that effect. Tried again, and I get it too. Thanks for the clip, ill get that fixed :)

edit:ok, found out why, due to parameter: rc_buffer_aggressivity
Will be fixed with new release.

edit: I take that back...it's actually to do with the VBV size...what frame size were you encoding this at 720x? something?

edit: Ok, happens at all frame sizes. Raising the VBV to 224 removes it, but that isn't VCD compliant. Hopefully it will be fixed in libavcodec soon.

-Nic

tuco
25th March 2004, 18:37
I recently tried .45 and with mpeg1 VBR, 2pass, I get severely undersized files (target was 700 mpeg but got 135 mpeg) with peaks above 3000 kbps. I just did a test trying to create VCD complaint file and no problems whatsoever :) If it is possible, could you add support to add min/max bitrates.

thanks

Nic
25th March 2004, 18:49
I know, not much I can do, rate control is broken for small buffersizes (like MPEG-1 VCD 40kb VBV), should be fixed soon. No I can't add min and max bitrates because they don't work the same way as something like CCE and you'll end up with severely undersized files again. (also you no longer set minimum bitrates in ffmpeg...and setting minimum quantizer to force bigger files hurts the quality)

-Nic