Log in

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


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

Nic
30th April 2004, 19:28
http://nic.dnsalias.com/QuEnc.exe

Changes:


Hack to stop the "Could not open Video Codec". It now doesn't allow MPEG-2 video to be done with a two pass, when the bitrate is under 200 kbps. Instead it does a one pass. This hack will suffice until a better fix can be made.
Now can set vbr and hq from the commandline options (use QuEnc /? ) for help
Now has process priority control


Cheers,
-Nic

JDay
30th April 2004, 20:16
The 200 kbps cap doesn't seem to be sufficient. Would it be feasable to automaticically re-do a job without 2-pass if the error is encountered?

Nic
30th April 2004, 20:21
@JDay: Damn it...I thought 200 would suffice. Your solution is exactly what I tried. But it doesn't work. After you call libavcodec and get the error, I can't get it to accept the parameters again, without fiddling around...
What cap should I use? (It's only for MPEG-2)

samuraijack
30th April 2004, 20:31
Dont know if it will help, but there is a similar conversation going on in the thread:http://forum.doom9.org/showthread.php?s=&postid=484530#post484530

Might be a relationship?

JDay
30th April 2004, 21:02
Originally posted by Nic
What cap should I use?
It depends on the framerate... 1600-2000 should be good. Can't test now, though.

Edit: I think 1561 is the cap for 23.976 fps. You normally won't encode with a lower framerate, so that should be good.

darkluna
30th April 2004, 21:26
Nic: Thanks for the new versions to try

Earlier there was a request for a "pause" feature. Is this feasible? Priority class is easily changed in Windows with Task Manager, but a pause button would be great. Sometimes encoding isn't quite done when it's time to record something else :)

DDogg
30th April 2004, 21:54
Now has DC Precision for MPEG-2 Was that as hard to do as it sounds?

Nic
30th April 2004, 22:09
@DDogg: Michael (of ffmpeg) did the real work...I couldn't track down the last bug. He did for me :) (it shouldn't have been hard...it's quite simple really)

@darkluna: Just written the code for it :) In the next version you'll just be able to hit the pause button on the keyboard and it will pause until pause is hit again....

-Nic

winny
1st May 2004, 09:48
New version 0.49 has solved the codec not found errors, thanks for an amazingly quick fix Nic.

CavalloPazzo
1st May 2004, 10:32
I'd like to see 1 pass VBR constant quality...It seems all libavcodec encoders when doing 1 pass quantizer use same quantizer even for i/bframe, that's not good.

Teegedeck
1st May 2004, 15:02
Constant quality equals constant quantizer in all implementations I know of. Having an I-frame boost or P/B-frame spoilage is another thing.

CavalloPazzo
1st May 2004, 17:18
Yes I know costant quality = costant quantizer...
I'd like to have a libavcodec encoder that can make constant quantizer mode encodes with different i/p/b as with other libavcodec based encoders (ffmpeg, mencoder, ffvfw) encoding with constant quantizer disable q-offset and q-multiplier for i/b frames and all frames are encoded with same quantizer.

dragongodz
2nd May 2004, 02:27
Nic - i would think <600 would be a better amount personally. also the quant conditions i messaged you about should help with that i would think.
actually compressing down to that low for things like half D1 is questionable. i mean if the ABR is going to be that low its not going to be anything like reasonable quality. again setting quant rules would be the only way of maintaning at least a half decent video IMHO.

kwag
2nd May 2004, 03:48
May I ask, where can I download the program sources for the new QueEnc version? Or, well how do I get them?
Thanks.

Best regards
kwag

dragongodz
2nd May 2004, 04:46
kwag - short answer, you cant. :D

Nic already commented on page 13 about the source. the relevant bit is
seeing that libavcodec is LGPL, I don't have to release the source.

and from the lgpl
We use this license for certain libraries in order to permit linking those libraries into non-free programs.
non-free meaning closed source and/or commercial programs not money.

kwag
2nd May 2004, 05:16
Originally posted by dragongodz
kwag - short answer, you cant. :D

Nic already commented on page 13 about the source. the relevant bit is


and from the lgpl

non-free meaning closed source and/or commercial programs not money.
Sorry dragongodz, but you don't have a clue.
Nic modified the libavcodec sources, so he MUST release the sources:


4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.



And


If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)

b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.

c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.

d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.

e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.

-kwag

jdobbs
2nd May 2004, 06:01
You just pointed out why I never use and never will use GPL code... because everybody thinks your labor belongs to them.

kwag
2nd May 2004, 06:42
Originally posted by jdobbs
You just pointed out why I never use and never will use GPL code... because everybody thinks your labor belongs to them.

;)

-kwag

Nic
2nd May 2004, 10:11
kwag, I don't modifiy the libavcodec sources. And if I did, the only things I would have to release are the modifications itself not QuEnc. kwag, no offense, but it is you who don't have a clue.

Your misreading the license, and not understanding the LGPL. Feel free to mail the lead guys from ffmpeg (i.e. Michael Niedermayer for instance) or at gnu.org and they will tell you the same thing.

Lets go thru what you posted and misunderstood:


4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.


Is only discussing the library not the a product linked to the library. The LGPL is there to make sure the library cannot be modified and become close source. That is what part 4 is for.

Now the next bit that your quoted is too long to post again, but please please please read it again. I can see why your having a hard time, the wording is misleading. But part 6 only relates to:
"As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library"
That's for code that actually becomes part of the library, using code from inside the library...which QuEnc doesn't, it just links to it. Hence, section 5.

But please please please read section number 5, which is the clearest:


5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.


QuEnc is just linked to avcodec.lib. That's it. And hence isn't a part of the library itself and therefore doesn't come under the LGPL.

I'm sure you probably won't just take my word, but please contact the people at ffmpeg or gnu.org and they will tell you the same.
(you can find people at ffmpeg thru www.sf.net/projects/ffmpeg and goto the mailing list section)

Hope that clears that up :)
Please in future, check your facts before pointing the finger, like we did in the muaddib case.

Cheers,
-Nic

ps
QuEnc will be released under GPL one day anyway, once it's finished :)

JDay
2nd May 2004, 11:19
I ran some more tests against CCE using version .49. I compared the output with the original using the subtract() feature in avisynth. Both encoders seemed to handle the natural pictures well (only some grain visible in the subtracted pictures) but CCE did not do well with the credits while QuEnc handled them quite nicely (see below). Maybe this would be good for animated titles?

Original (http://apotheosis.tv/files/original.JPG)|CCE (http://apotheosis.tv/files/cce.png)|QuEnc (http://apotheosis.tv/files/QuEnc.png)|TMPGEnc (http://apotheosis.tv/files/tmpg.png)

Oh, and more nagging about the commandline: Priority and max bitrate settings are missing.

Edit: Added TMPGEnc. Definitely the worst of the bunch (and the slowest to encode). You can see images on the subtracted sequence even with "natural pictures".

Teegedeck
2nd May 2004, 11:51
Could you please keep this thread free of the GPL issue? I'm probably not the only one who'd prefer it that way. Thank you.

Nic
2nd May 2004, 12:27
@Tee: Yup, hopefully my post settled the issue, so that should be the end of it.

@everyone:
http://nic.dnsalias.com/QuEnc_Settings.txt

Here are an explanation of the QuEnc settings...hopefully this will help people that are new to QuEnc.

Cheers,
-Nic

ps
@JDay:
Ill add those commandline params in the next version

jdobbs
2nd May 2004, 14:12
@Nic

I know you get a lot of these types of messages -- but I want to again thank you for your outstanding support on this package and all the other 3000 you are working. QuEnc is getting better and better with each release!

jorel
2nd May 2004, 14:33
Originally posted by jdobbs
@Nic

I know you get a lot of these types of messages -- but I want to again thank you for your outstanding support on this package and all the other 3000 you are working. QuEnc is getting better and better with each release!

i agree, QuENC is getting better and better with each release, thanks for that Nic and for the QuEnc_Settings.txt too. :)
ot: jdobbs,i don't test(but will soon)DVD ReBuilder but i see that your suport is amazing !

Nic
2nd May 2004, 14:36
@jorel: Thanks :)

@jdobbs: Thanks too :) Exactly the same goes to you. I don't know where you find the time to work on such a big project as rebuilder. You must be a lot better at managing your time than me :)

-Nic

audioslave
2nd May 2004, 14:36
@Nic
I agree with the two previous posts ;) . I have a problem with the bitrate though (I know you're working on it). I set the max.bitrate to 2500 but the final movie have peaks of 3376. Other than this I have nothing to "complain" about :D . Great work, man!

Nic
2nd May 2004, 14:50
@audioslave: Are the peaks at that start and end or can they be "everywhere" ?

-Nic

kwag
2nd May 2004, 14:53
Originally posted by Nic


Lets go thru what you posted and misunderstood:


No, lets go throught the part you didn't post, and didn't understand.

However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

Regards,
-kwag

audioslave
2nd May 2004, 15:03
@audioslave: Are the peaks at that start and end or can they be "everywhere" ?
The peaks occur at the beginning and the end of the movie. The first peak is at 52 seconds into the movie and the second is actually a bitrate drop/Q peak (!) at 01:32...

Nic
2nd May 2004, 15:20
@kwag: Ok, I'm assuming that english isn't your first language, and as such I can understand the problem you're having...so ill try to take you through the license. Please also contact someone like Neo Neko who knows the license's well.....or at the very least gnu.org or the ffmpeg guys, they will take you thru it.

ok lets break it down :)


A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.


Ok, so from this QuEnc.exe is a "work that uses the Library". That bit, we can agree on. QuEnc is in isolation, because it links to the library and nothing else. Now the bit that you quoted is this.


However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the library"


And that's exactly right. If I linked QuEnc.exe with the library to make another application/library, then QuEnc would fall under the LGPL (and it would no longer be isolated). That part is to ensure people don't have libraries were part of the code isn't under LGPL.

Please also note the part that says:
rather than a "work that uses the library"
So which are you saying QuEnc.exe is kwag...is it a "work that uses the library" or not? I think you'll see where you went wrong now. It was an easy mistake as the english could be clearer.


Can you understand that? The bit you quoted is to stop what could otherwise be a loophole to keep parts of a library closed. The start of Section 5 states that "work that uses the Library" "falls outside the scope of this License". And that's why QuEnc and all other apps that use LGPL can be closed. Why do you think the LGPL exists? Otherwise it would just be GPL.

Please please read up kwag. You're just coming across as petty, but I assume it's just a language barrier to the LGPL license. What do you think the LGPL is for? Please contact the gnu.org or any leading guys from a LGPL project (like the LAME guys for instance..look at all the commercial closed-source apps that use LAME, because they can thru LGPL http://lame.sourceforge.net/links.html ).
Another LAME link: http://lame.sourceforge.net/license.txt

I'm sure you must know someone that can explain it better to you, good luck with your research but please don't clog this thread until you've contacted someone else about your misunderstanding.

Thanks :)

-Nic

ps
Also the first paragraph from:
http://www.gnu.org/philosophy/why-not-lgpl.html
(straight from the horses' mouth so to speak)

The GNU Project has two principal licenses to use for libraries. One is the GNU Library GPL; the other is the ordinary GNU GPL. The choice of license makes a big difference: using the Library GPL permits use of the library in proprietary programs; using the ordinary GPL for a library makes it available only for free programs.

dragongodz
2nd May 2004, 17:19
ok so lets just make it clear.

if anyone wants to discuss LGPL please take it to the general section and start a thread there just as there currently is for GPL.

Nic
2nd May 2004, 20:48
http://nic.dnsalias.com/QuEnc.zip <--- Note .zip not .exe


Now can be paused by pressing the pause key on the keyboard
60000/1001 is now supported as a fps
Now strictly complys to the LGPL


It appears to comply with the LGPL, you have to have it linked dynamically not statically. My mistake, so now it comes with avcodec.dll.

Should be business as usual now. :)

Thanks kwag and everyone else for helping me make it properly LGPL compliant.

Cheers,
-Nic

ps
@JDay: The new parameters didn't make it. 0.51 definitely will have it. :)

HarryM
2nd May 2004, 21:14
@Nic:

Thanks for QuEnc_Settings.txt.

audioslave
2nd May 2004, 22:39
@Nic
Sorry to post again but it seems my question about the peaks got lost during all this GPL talk ;) . Please, read my post above and tell me what you think :) .

SILICON
2nd May 2004, 22:42
One of the most time wasted in MPEG encoder is the search of motion vectors.

In two pass mode, you can save the motion vector in a temporal file. In the second pass, you can do the motion search.

It is a practical idea?

Nic
2nd May 2004, 22:52
@SILICON: Very true...I've been meaning to look into the two pass side of things. It is feasable, but I dont know how complicated yet...

@audioslave: Those peaks at the start and end are due to the rate control being broken in ffmpeg (AFAIK). I'll try and fix it. Hopefully the rate control will be re-written soon.

Cheers,
-Nic

Teegedeck
2nd May 2004, 22:52
I believe motion vectors are not necessarily the same when quantizers change; at least for XviD the re-use of motion vectors has been given up upon.

Edit:
Hasn't it, Nic?

Nic
2nd May 2004, 23:11
@Tee: Yup that's true...but I will look into it anyway, if it's easy to implement then it won't do any harm. But yes, it's not the best idea to re-use the vectors.

djan
3rd May 2004, 00:58
The link doesn't seem to work.

Mug Funky
3rd May 2004, 04:58
just a little point - bitrate spikes at the end of the stream can possibly be a problem with BitrateView (if that's what we're using). i noticed this while loading streams that were still being processed :) the spikes disappeared when i re-loaded and there was a new GOP.

spikes at the front are a bit of a problem. but for my level of usage, a slight glitch on playback of the first second is not a problem at all... SVCD is enough of a sacrifice in quality to get hot and bothered about glitches :)

t_2
3rd May 2004, 06:17
Link seems to be dead here too.

dragongodz
3rd May 2004, 06:49
no its working, just absolutly flooded i would say.

i just downloaded it and it took about 10 minutes to get a succesful connection and download.

SILICON
3rd May 2004, 11:58
Bug in QuEnc 0.50

The bug only happen when set on Use KVCD "Notch" Matrix

You can see the Bug capture

http://www.geocities.com/aeromodelismogratis/175.jpg

Open a new browser and copy this link. Do not click on link (geocities rules)

If you like, I can send you the AVS script and the original M2V. Yopu can recreate the bug.

Nic
3rd May 2004, 12:16
@SILICON: Does that occur even if all other settings are off? (so only kvcd matrix is on). You can send any files (as long as they are not too huge) to nic@nic.dnsalias.com

Cheers,
-Nic

Abond
3rd May 2004, 13:05
The GOP structure bug is still there. Now I am refering to it as a bug, because the current v of mencoder (the same encoding engine) doesn't have it - GOP structure is correct.

Nic
3rd May 2004, 13:17
@Abond: Do you have scene detection on or off? If it's off it should be ok.... ? Ill check again here. Thanks for the report :)

-Nic

ps
Could you also give the settings your using, the program you use to check (im using ReMPEG2), and what you expect to see compared to whats there. Thanks :)

SILICON
3rd May 2004, 13:49
Originally posted by Nic
@SILICON: Does that occur even if all other settings are off? (so only kvcd matrix is on).

The setting are:
MPEG-2 = ON
Bitrate = 1385
Use VBR = ON
High Quelity = ON
Use TRELLIS = ON
2 PASS encoding = ON
Use KVCD MATRIX = ON (I have BUG). If set OFF I have not bug
Extreme Slow setting = ON or OFF (don't care)
GOP size = 15 (I use PAL)
Max B frames = 2
Interlazed encoded = OFF
DC precision = 8
Force closed GOP = OFF
Scene Detection = ON
Auto MAX bitrate = OFF
MAX BITRATE = 8000
4:3 aspect ratio = ON


Originally posted by Nic
You can send any files (as long as they are not too huge) to nic@nic.dnsalias.com

The MPV file have a 7.5 MB. It's huge?

Nic
3rd May 2004, 14:09
@Silicon: Could you try it again for me with Trellis or Extreme turned off and see if the same error is there. I think it's an issue with kvcd and trellis as reported before.

By all means send that file...I should be able to pick it up as long as it's below 10mb

Thanks,
-Nic

SILICON
3rd May 2004, 14:45
I make more test and:

MPEG-2 = Don't care
Bitrate = 1385
Use VBR = Don't care
High Quality = Don't care
Use TRELLIS = ON (If OFF, I haven't bug)
2 PASS encoding = Don't care
Use KVCD MATRIX = ON (I have BUG). If set OFF I have not bug
Extreme Slow setting = ON (I have BUG). If set OFF I have not bug
GOP size = Don't care
Max B frames = Don't care
Interlazed encoded = Don't care
DC precision = Don't care
Force closed GOP = Don't care
Scene Detection = Don't care
Auto MAX bitrate = Don't care
MAX BITRATE = 8000
4:3 aspect ratio = Don't care

In resume:
Only have bug if are KVCD MATRIX = ON and TRELLIS = ON
Or KVCD MATRIX = ON and Extreme Slow setting = ON

The BUG is :
The bug is when the TOP part of frame are bright an the BOTTON part are dark. The BLOCK are inverted (As mirror image). The invert are in TOP-BOTTON, putting the dark at the TOP.
Also when The LEFT part of frame are bright an the RIGHT part. The BLOCK are inverted in RIGHT-LEFT, put the dark at the LEFT.

I think that the bug are in quantimize code.

I will send you the files for you can test the bug.

Amenophis
3rd May 2004, 14:47
Originally posted by Abond
The GOP structure bug is still there. Now I am refering to it as a bug, because the current v of mencoder (the same encoding engine) doesn't have it - GOP structure is correct.

Both GOP-structures (regular GOP and irregular GOP) are correct and both are possible when using mencoder, depending on your settings. So maybe the 'bug' is, that you can't turn it off. (althrough i wouldn't suggest to turn it off)