Log in

View Full Version : x262 Development Thread


Pages : [1] 2 3 4

kieranrk
28th October 2010, 14:16
ifb and I are writing x262, an mpeg-2 encoder building on the best-in-class features of x264

Git tree (more likely to be broken than working at any given time):

http://github.com/kierank/x262

Intra working. Inter in development.

ifb
28th October 2010, 14:18
Now I need to finish quant. :)

shon3i
28th October 2010, 22:39
I will send you DVD specs, as soon i remember to look at workplace ;)

Mug Funky
1st November 2010, 06:22
perfect! now all you need is to fill those blocks up with pixels!

:)

seriously looking forward to this one. who said mpeg-2 is dead? CCE is still selling and DTV is looking as crap as ever, so there's always going to be room to stir things up a bit.

best of luck!

aegisofrime
1st November 2010, 09:26
Interesting project! I don't think DVDs are going away anytime soon (The install base is too huge!), so somebody will find a use for this for a long time yet! All the best!

Gromozeka
2nd November 2010, 10:58
:( But where compile program for testing?

ifb
2nd November 2010, 16:54
:( But where compile program for testing?There's nothing to test yet, unless you want your encodes to look like the above. Follow one of the guides for compiling x264, but clone the x262 github repository instead of official x264. Patches welcome.

Quant is done, but mostly untested until AC coefficient VLCs are written to the bitstream. Then we can encode more than an 8x8 blockfest.

Lyris
6th November 2010, 04:01
who said mpeg-2 is dead?Hear hear. Honestly, I get a ton of satisfaction from producing DVDs with Cinema Craft, because the quality dumps all over what's seen on most commercial discs when it's used carefully. The satisfaction from doing MPEG-2 right is huge because it's not so easy.

So I look forward to seeing what this can do!

turok
17th November 2010, 16:07
so i notice there is no update on this topic... how is dev. going for this atm?

kieranrk
17th November 2010, 16:11
ifb finished off intra and we're moving on to inter.

Mug Funky
18th November 2010, 01:13
nice! so the blocks are filled with details now?

just to illuminate things here, how much needs to be done to squeeze the x264 elephant into the mpeg-2 morris mini?

7ekno
20th November 2010, 05:48
Is the VAQ framework also going to be featured ?!?

Tek

jfcarbel
9th December 2010, 13:36
Is this reason (http://forum.doom9.org/showpost.php?p=1462825&postcount=17) why you might be developing this project? :)

kieranrk
9th December 2010, 19:34
Is this reason (http://forum.doom9.org/showpost.php?p=1462825&postcount=17) why you might be developing this project? :)

Not at all. That reason doesn't even make much sense.

The Open Source Broadcast Encoder is the main reason x262 is being written.

Biggiesized
9th December 2010, 23:18
So you're targeting the broadcast space, not DVDs? Or both? Very interesting now.

kolak
10th December 2010, 00:18
Not at all. That reason doesn't even make much sense.

The Open Source Broadcast Encoder is the main reason x262 is being written.

And later introduce commercial license as with x264 :)


Andrew

kieranrk
10th December 2010, 07:47
So you're targeting the broadcast space, not DVDs?

Personally I don't care much for DVDs. I don't think ifb does either.

hank315
10th December 2010, 08:12
Personally I don't care much for DVDs. I don't think ifb does either.
But will it be possible to create DVD compliant encodes with x262?

kieranrk
10th December 2010, 08:15
But will it be possible to create DVD compliant encodes with x262?

Very likely yes.

hank315
10th December 2010, 08:24
OK, otherwise IMHO it will be useless.
Is there a time scheme when it will be finished?

kieranrk
10th December 2010, 09:32
OK, otherwise IMHO it will be useless.

Not for the people wanting to use it for ATSC MPEG-2 transmissions it won't :p

nakTT
19th December 2010, 06:32
Any info regarding the quality/filesize ratio compared to x264?

Mug Funky
19th December 2010, 08:30
you could look at the first post...

this is very much not ready for public consumption.

my guess, seeing the state of the art of current mpeg-2 and current h.264, this would be around same quality at 2-2.5x the bitrate of x264?

if we can get interlaced video to look good at less than 4mbps, i'd be screaming in the streets to crowds of uninterested and confused people. i suspect this may be the case.

kieranrk
21st December 2010, 21:09
ifb has gotten P-frames working.

Biggiesized
12th February 2011, 12:36
Any new updates?

ifb
3rd March 2011, 05:49
Any new updates?I've been busy (plus a little lazy) and kierank has been working on OBE a lot, so there isn't that much x262 news.

I do have B frames nearly working in my local tree, however. Patches welcome if anyone wants to take on the TODO (http://github.com/kierank/x262/wiki/TODO) list.

Mug Funky
13th April 2011, 06:34
in case anyone's after an update of sorts...

first up, this is a fantastic project - just thought i'd add some encouragement to kierank and ifb's efforts on this.

i followed an x264 compiling guide and git'ed from x262's repo. i'm a complete newb at this, but it all worked smashingly in windows.

here's a rundown of what i can see so far:

- avs, raw and y4m support only (unless i'm doing it wrong).
- fullpel only for now (set subme to 0), as x264's qpel seems to get mapped to hpel and thus the blocks are moved twice as far as they should be. i imagine this is a largish undertaking on account of h.264 having different filtering etc for qpel than mpeg-2's hpel.

- crf values are comlpetely unrelated to those that x264 uses - try much lower values
- output streams are not compatible with DVD authoring programs (spruce gives me a "temporal references out of order" error).

- quality is surprisingly good, with the occasional blocky glitch on movement. the encoder seems to bias toward making grainy noise rather than flat blocks, which is good news for film lovers, especially when hpel gets implemented. by "surprisingly good", i was expecting something like the screenshot at the start of this thread. it's still not really watchable...

- no interlace as yet, but there is alternate scan.

tl;dr: this is not ready for general consumption yet.

i wont release my compile for this reason - i can't be sure i didn't do anything wrong in the compile (it's my first time), and if unofficial binaries start floating around at this early stage, the encoder might get an undeserved reputation before it gets a chance to be finished. i'm testing more out of curiosity than anything serious.

this is really promising...

[edit]

i just tried it with the mpeg matrix and it looks a lot better. about right for something that's crippled with fullpel. this has really come a long way in a short time!

Sagittaire
14th April 2011, 10:21
Really interessing project because x264 is really advanced codec (psy, RDO, RC ...) and portability for x262 will be potentially really promising ...

CruNcher
15th April 2011, 14:16
yup not only but if you look @ XviD i wonder what could have been reached their with x264 as its base (especially the asm and multithread optimization) :) Darks VAQ port is nice but when x262 is really successful and can show that the base of x264 works efficiently their then why shouldn't it be more efficient then the current base XviD code (RC,RD) and can we dream about a x263 then ? ;)

Mr VacBob
15th April 2011, 23:26
It wouldn't be difficult to make an x263 from a complete x262. That said, x264 --tune fastdecode recovers about half the decode time from normal settings and is still much more efficient than MPEG4 ASP.

plonk420
7th July 2011, 21:03
what switches are you all trying?

iwod
16th July 2011, 19:26
It seems x262 development has stopped? ( Although it is still included the x264 mailing list )

kieranrk
16th July 2011, 23:50
We have been busy on other things. Having been accepted to speak at IBC about open source broadcast I (and likely ifb) will have even less time.

plonk420
25th July 2011, 13:01
what switches are you guys using? all i've tried so far is

x262 --crf 8 --mpeg2 --subme 0 --fps 24 -o output.m2v input.avs

(adjusting the CRF)

anything else you guys are trying?


edit: thanks for this awesome project, kieranrk, ifb, and any anyone else contributing!

edit2: interestingly, kkrunchy and crinkler don't like it. upx does, and slightly amazingly "best compression" mode doesn't trigger any antiviruses

kieranrk
26th October 2011, 23:59
There is a tender out to add interlaced support to x262: http://mailman.videolan.org/pipermail/x264-devel/2011-October/008887.html

nautilus7
27th October 2011, 00:36
Where i can find x262 binaries?

pandy
27th October 2011, 15:19
There is a tender out to add interlaced support to x262: http://mailman.videolan.org/pipermail/x264-devel/2011-October/008887.html



But MPEG-2 is not able to have MBAF...

MatLz
27th October 2011, 16:12
Where i can find x262 binaries?

Here (http://hotfile.com/dl/133462733/16daece/x262.zip.html) is one.
However, crf seems to be broken ? Use -q instead.

kieranrk
27th October 2011, 17:59
But MPEG-2 is not able to have MBAF...

not true. MPEG-2 frame pictures can switch between field and frame modes.

mp3dom
27th October 2011, 19:20
Isn't it more similar to PAFF then?
Anyway, while it is supported by the MPEG-2 standard, it isn't well supported by a good amount of standalone players (they made visible judder when the switch happens). I'm referring to the picture structure (Field/Frame) that the encoder change on (I think) GOP basis. Don't know if you're referring to the same. GV ProCoder is one of the few encoder that support this feature.

kieranrk
27th October 2011, 22:21
No it is not like PAFF. PAFF is also allowed (field mode pictures).

drmpeg
28th October 2011, 02:16
Here's what MBAFF looks like in MPEG-2.

An interlaced frame (luma only).

http://www.w6rz.net/bluma.png

The macroblock types in a B-frame. blue = forward, yellow = backward, pink = bi-directional, dot = quant change, horizontal line = field DCT.

http://www.w6rz.net/bmtype.png

The motion vectors. Horizontal line = field vectors.

http://www.w6rz.net/bvectors.png

Ron

ifb
1st November 2011, 05:28
what switches are you guys using? all i've tried so far is

x262 --crf 8 --mpeg2 --subme 0 --fps 24 -o output.m2v input.avs

(adjusting the CRF)

anything else you guys are trying?

For NTSC DVD (untested in Scenarist, etc.):
x262 --mpeg2 --preset placebo --tune film --open-gop normal --fps 24000/1001 --pulldown 32 --sar 16:9 --keyint 14 --bframes 2 --vbv-maxrate 9800 --vbv-bufsize 1835 --crf 1.5 -o output.m2v input.avs
Actually DAR is broken. I'll take a look why later (it was working).
Here (http://hotfile.com/dl/133462733/16daece/x262.zip.html) is one.
However, crf seems to be broken ?Ratecontrol isn't optimal, but I don't think CRF is broken. The scale, however, is different from H.264 and you'll need a much lower value.
Use -q instead.Unless you're testing, I wouldn't recommend that. Constant quantizer is pretty useless.

MatLz
1st November 2011, 14:46
I meant this kind of thinghttp://data.imagup.com/11/1134819774.png (http://www.imagup.com/data/1134819775.html)


In case that can help, I did upload the files here (http://hotfile.com/dl/133939237/3b5b7d5/x262_all_files.7z.html).

But I maybe did it wrong...

ifb
1st November 2011, 15:44
I meant this kind of thing <image>

In case that can help, I did upload the files here (http://hotfile.com/dl/133939237/3b5b7d5/x262_all_files.7z.html).

But I maybe did it wrong...From the TODO (https://github.com/kierank/x262/wiki/TODO), certain subme levels are broken, so don't use them.

ifb
1st November 2011, 16:10
Actually DAR is broken. I'll take a look why later (it was working).Setting DAR is broken when using the internal resize filter (resize assumes SAR).

ifb
1st November 2011, 17:22
Just to say I've tried it, files can import in Encore CS5.

Parkjoy 25p (http://www.mediafire.com/?5auu918z3hzb47n)

That's a 10 second clip, so YMMV.
x264 park_joy_1080p.avs -o parkjoy_paldvd.m2v --mpeg2 --preset placebo --tune film --open-gop normal --keyint 12 --bframes 2
--vbv-maxrate 9400 --vbv-bufsize 1835 --crf 1 --fake-interlaced --sar 16:9 --colorprim smpte170m --colormatrix smpte170m --transfer smpte170m

ffvideosource("park_joy_1080p.mkv") #lossless, from .y4m
selecteven()
lanczosresize(720,576)
colormatrix(mode="Rec.709->Rec.601")

pandy
1st November 2011, 18:53
so picture can have combination of interlace and progressive macroblocks? ie MBAFF

ifb
1st November 2011, 20:44
so picture can have combination of interlace and progressive macroblocks? ie MBAFFCorrect. Each macroblock in a frame picture can use either field, frame, or dual-prime prediction. Macroblocks in field pictures can use either field, 16x8, or dual-prime prediction.

pandy
2nd November 2011, 10:48
Ok - bit weird but all comparison between H.264 (and other codecs) assume superiority of H.264 due MBAFF which accordingly to various descriptions is unique for H.264