Log in

View Full Version : x262 Development Thread


Pages : 1 2 [3] 4

Emulgator
25th September 2012, 10:15
ffmpeg decoded to .y4m.
y4m input to x262 r2433_debug: The same behaviour.

Any --preset <faster than slower> succeeds.
Any --preset <slower than slow> fails.

y4m frontend reports 720x576i 16:15 @ 25/1 fps <cfr>
x262: no warnings.

What kicks in at --preset slower ?
--partitions all broken ? --trellis 2 broken ? --rc-lookahead 60 ? --ref 8 ? --subme 9 ?

Emulgator
25th September 2012, 10:30
Now commenting all the <slower> parameters in one by one.

Ah, found it: --subme 9 breaks it. --subme 10 and --subme 11 fail as well.

P.S. Could repeat the bug on a Win7U64 system, CPU i7 920XM.
Here in Win7 the cmd window stays open, but: Silent abort, no message

ifb
25th September 2012, 16:00
Now commenting all the <slower> parameters in one by one.

Ah, found it: --subme 9 breaks it. --subme 10 and --subme 11 fail as well.

P.S. Could repeat the bug on a Win7U64 system, CPU i7 920XM.
Here in Win7 the cmd window stays open, but: Silent abort, no message
I can reproduce a segfault using your original commandline with --threads 1, but the backtrace is pretty useless. I'll have to look at this later.

<edit>
OK. I see what's happening. I'll work on it tonight.
</edit>

ifb
26th September 2012, 02:57
Fixed (https://github.com/kierank/x262/commit/6fe55fd27ed39682a707d45f75749d4fb06c4f29). Both veryslow and placebo were tested, but somehow the usual test clips never triggered this (or at least didn't crash in it).

New build:
x262 0.128.0+2443 6fe55fd (http://www.mediafire.com/download.php?f5s9yrjltu1xln5)

There's still a known bug in interlaced chroma, but at least this crash is fixed.

Emulgator
27th September 2012, 17:53
Many thanks, this commit fixes the subme>8 bug on my side as well.

Emulgator
27th September 2012, 18:35
Now the residual block structures, especially visible at scenecuts (shown are pairs of consecutive frames):

Cut to Black.
Frame 413:
http://dvd-manufactur.de/files/x262r2443_Frame_000413.jpg

Frame 414:
http://dvd-manufactur.de/files/x262r2443_Frame_000414.jpg

Cut from Black.
Frame 417:
http://dvd-manufactur.de/files/x262r2443_Frame_000417.jpg

Frame 418:
http://dvd-manufactur.de/files/x262r2443_Frame_000418.jpg

Another Cut to Black.
Frame 542:
http://dvd-manufactur.de/files/x262r2443_Frame_000542.jpg

Frame 543:
http://dvd-manufactur.de/files/x262r2443_Frame_000543.jpg

The x262_r2443 encode: (http://dvd-manufactur.de/files/PAL-DVD2_r2443.m2v) (x262 r2421, r2433 through r2443 do exhibit the same)

zmejce
1st December 2012, 15:04
I'm using this commands on x264:

--crf 20 --tune film --b-adapt 2 --direct auto --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -

Which commands would be the x262's equivalent?

Would x262 produce same quality as x264 for dvd riping and 1080 hd?

zmejce
1st December 2012, 16:50
I'm using this commands on x264:

--crf 20 --tune film --b-adapt 2 --direct auto --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -

Which commands would be the x262's equivalent?

Would x262 produce same quality as x264 for dvd riping and 1080 hd?

I've tried it with the latest x262 build and the same commands dont produce same quality-x262 is worse, but makes double smaller size. Ive tried also with crf 15 and the result was same filesize as crf 20 and same or very similar quality.

Tried it on 720x576 resolution video.

ifb
29th December 2012, 20:40
I'm using this commands on x264:

--crf 20 --tune film --b-adapt 2 --direct auto --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -

Which commands would be the x262's equivalent?

Would x262 produce same quality as x264 for dvd riping and 1080 hd?
--direct auto doesn't apply to MPEG-2.

Also, note that MPEG-2 is two generations older than H.264. For most content, there's no way x262 could ever match x264 quality at the same bitrate.

I've tried it with the latest x262 build and the same commands dont produce same quality-x262 is worse, but makes double smaller size. Ive tried also with crf 15 and the result was same filesize as crf 20 and same or very similar quality.

Tried it on 720x576 resolution video.
Again, MPEG-2 is old. Also, the CRF scale is quite different between x262/x264 (likely a bug - ratecontrol patches welcome). x262 will need a much lower CRF value.

qyot27
29th December 2012, 21:30
@zmejce:
Refer to this post (http://forum.doom9.org/showpost.php?p=1282676&postcount=2), although the problem in that thread was precisely the opposite of what's being discussed here (experiencing file bloat with x264 output because they used the quant values they were used to from DivX rather than bad quality in x262 because you were using typical crf values from x264).

Point being, MPEG-2 and MPEG-4 ASP both used linear scales, not a logarithmic one like H.264. Of course, this is assuming x262 is expecting values from a linear scale and not trying to adapt a log scale to MPEG-2. It's been too long since I tested with x262 to remember if that's the case.

ifb
12th January 2013, 08:41
@zmejce:
Refer to this post (http://forum.doom9.org/showpost.php?p=1282676&postcount=2), although the problem in that thread was precisely the opposite of what's being discussed here (experiencing file bloat with x264 output because they used the quant values they were used to from DivX rather than bad quality in x262 because you were using typical crf values from x264).

Point being, MPEG-2 and MPEG-4 ASP both used linear scales, not a logarithmic one like H.264. Of course, this is assuming x262 is expecting values from a linear scale and not trying to adapt a log scale to MPEG-2. It's been too long since I tested with x262 to remember if that's the case.MPEG-2 has linear and non-linear quant. x262 can do either, but non-linear (the default) is better.

Biggiesized
21st January 2013, 00:52
Where can we download the latest compiled binary?

djonline
29th January 2013, 13:53
High level is buggy, bad broken picture.

djonline
29th January 2013, 14:16
Also, I want to make 720p/60p with 60fps. How can I do this with x262 ?

Adub
30th January 2013, 22:30
Write an Avisynth script to convert/feed your video in a 720p/60fps format and then pipe it into x262.

ifb
26th February 2013, 01:17
High level is buggy, bad broken picture.

And may remain so without steps to reproduce. Please post your full commandline.

Boulder
10th March 2013, 17:28
Is the encoder "safe to use" in everyday things? I occasionally need to author some DVDs and there's always nice to have extra items in the toolbox.

kieranrk
9th April 2013, 18:06
Please test with latest patch.

Emulgator
10th April 2013, 22:03
A build, a build, a kingdom for a build...

LoRd_MuldeR
11th April 2013, 01:14
http://www.mediafire.com/file/ec81p13yvb48esz/x262.2013-04-08.rar

ifb
11th April 2013, 12:02
A build, a build, a kingdom for a build...
fprofiled with lavf and ffms2:
x262 32-bit (http://www.mediafire.com/download.php?cx2d6dzjmsro6tp)
x262 64-bit (http://www.mediafire.com/download.php?amk2cgp85k84r6c)

kieranrk
11th April 2013, 12:53
There's a crash in interlaced mode (b16x8)

Emulgator
16th April 2013, 23:21
Many thanks, Mulder and ifb !
Soon crunching...

Emulgator
18th April 2013, 18:09
Yes, I can confirm the crash of ifb's x262 r2508 (32bit) after a few frames for a interlaced PAL-SD-Source
when called as x262 to encode H.262. If renamed and called as x264 r2508 delivers a proper H.264 encode.

For x262:
MediaInfo reports a duration of 160ms (4 PAL frames), MediaPlayerClassic with ffdshow can play 2 frames.

Output was specified as .m2v.
Once I additionally give the argument -mpeg2 as listed in -fullhelp, x262 crashes immediately without encoding anything.

From -fullhelp
MPEG-2 (H.262):

-mpeg2 Encode as MPEG-2 instead of H.264
-dc <integer> Specify intra DC precision to use (8 to 11) [8]
-altscan Use alternate MPEG-2 VLC scan order, not zigzag
-linear-quant Use MPEG-2 linear quantization table
-no-altintra Use MPEG-1 VLCs (Table B.14) for intra blocks

Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC support (yes)
Output bit depth: 8 (configured at compile time)

Shouldn't the extension .m2v should be listed in fullhelp as one of the triggers for MPEG-2 (H.262) encoding ?...

.m2v -> MPEG-2 (H.262)

Edit: Nah. I was wrong.
The output extension .m2v does not trigger H.262.

It is indeed:

{Or is it the call as x262.exe alone ?}

Renaming the suspicious x262.exe to x264.exe and running it with the same commandline
containing the output extension .m2v delivers a successful Level 3.1 H.264 encode,
with the (specified from me) misleading extension .m2v.

develX
13th June 2013, 10:17
There's a crash in interlaced mode (b16x8)


Yes, it only happens in interlaced mode and multithreaded configurations. It seams that the stack is overwritten (i_width > 16!!). When i rewrite this to input == output (build 129) then it crashs in refine_subpel()/x264_pixel_satd_8x8_sse4 (), line 913 (build 133).
Is there a newer version without that problems?

kieranrk
13th June 2013, 22:31
It's a known bug but I haven't had time to fix it: https://github.com/kierank/x262/issues/2

develX
14th June 2013, 07:47
It's a known bug but I haven't had time to fix it: https://github.com/kierank/x262/issues/2

Ok, I'll try it.

kieranrk
14th June 2013, 15:25
You can come on #x264dev on freenode if you need help.

kieranrk
14th July 2014, 02:14
Can anyone reproduce the interlaced crashes with the latest git? As far as I know they are gone.

Emulgator
29th July 2014, 22:59
A build would be nice.

kieranrk
30th July 2014, 21:15
A build would be nice.

I am not permitted to do that for various reasons.

zerowalker
31st July 2014, 19:30
https://www.sendspace.com/file/fng0dj

Here is my build of it.

Is x262 DVD Compliant?

EDIT:

Link Fixed*

Emulgator
31st July 2014, 19:48
Many thanks zerowalker, but this link seems wrong somehow...
PM ?

Emulgator
31st July 2014, 20:40
Many thanks ! Crash on interlaced footage is gone for me with zerowalker's build (x262 core140 r2615),
tested on the same clip as in 2013.
Residual block artifacts 1 frame after cuts to black still there.

zerowalker
1st August 2014, 00:08
I did check the quality of the encoder.
I didn't do any thorough testing, but the from the looks of it the quality is Good, but not more than that.
It seems to have a hard time on Edges, probably retaining details.

Disturbing thing is that x262 is called x264 in the command tool (IIRC?), other than that, well it's x264 with MPEG-2;)

Procrastinating
2nd August 2014, 07:56
Nowadays, how does the encoded quality of x262 compare with CCE? Ie, under the best-possible quality settings(not necessarily DVD-compliant), on say 720p test footage. That is to say, ignoring bugs and under ideal conditions, which is "best"?

Emulgator
5th August 2014, 01:29
CCE, in particular SP3 is not yet beaten by x262 for DVD encoding.
But if the fixes for residual artifacts go on, x262 may well sit on top one day.
I see potential for good use of bitrate and very good detail retention.

Blue_MiSfit
5th August 2014, 04:01
I wonder how it compares to Elemental. I was impressed by their encoder's balance of detail preservation and lack of blocking at low bitrates (i.e. 14 Mbps 1080i29.97 for CableLabs VOD files) enough to pick it over Canopus and Mainconcept (Carbon Coder and Digital Rapids respectively) for a pretty substantial workflow.

poisondeathray
5th August 2014, 05:17
Thanks zerowalker for recent compile

My general impressions on DVD compliant progressive testing on clean sources:


Overall OK, seems better on gradients that HCEnc

But:
1) Problems with some object edges, there tends to be artifacting, much like DCT ringing. I haven't played with psy settings yet

2) Seems to be some "keyframe" pumping issues, temporal stability issues, tested with open-gop settings. Perhaps I-B-P bitrate allocation settings isn't proportionally ideal yet

Sparktank
13th August 2014, 20:42
I'm pretty surprised by the quality for this.

Going from HCenc to x262 2pass+OpenCL, the quality difference is stunning.
I do notice some noise though, for detailed scenes.
Mostly when people are far away from camera (not medium shots or close ups).

I have to agree that gradients are much more better here.
Using cretindesalpes' Dither_package to resize, I'm just blown away by results.

Using parts of old commands I found earlier from this thread for NTSC. (-preset veryslow --tune film)
Added 2passes to target DVD5, changed fps to 24000/1001 with --pulldown 32 (took awhile to realize "32" didn't mean thirty-two).

I was worried at first that --opencl might break, but I guess Nvidia fixed some issues in recent updates.

I've only done 5min samples so far.
I have yet to do a full movie and burn to RW to check for compatibility in players. :devil:

I think I'm going to have some real fun with this and HCenc in the next few days. I quite like the idea of doing x264-like encoding for MPEG-2/DVD.

Thanks for the updated binary. :)

Lyris
20th August 2014, 02:32
Sparktank, any idea how it compares to CCE SP3?

Sparktank
20th August 2014, 05:28
Sparktank, any idea how it compares to CCE SP3?

I would have to guess with the noise generation, it still has some distance to go.

I do find that creating a lossless intermediate (UtVideo Codec) creates better quality.

I'm not entirely sure which settings have no effect on MPEG2 encoding. But I'm sure toning down some options would improve.

Sagittaire
25th August 2014, 22:49
1) Problems with some object edges, there tends to be artifacting, much like DCT ringing. I haven't played with psy settings yet

2) Seems to be some "keyframe" pumping issues, temporal stability issues, tested with open-gop settings. Perhaps I-B-P bitrate allocation settings isn't proportionally ideal yet

If you have the same Rate Control setting than x264, it's easy to solve that ... ;-)

SuLyMaN
29th August 2014, 08:06
Is this a good alternative to HCenc?

Emulgator
23rd October 2014, 01:34
If development continues, yes.

chiphoi
8th December 2014, 07:09
Does this software continue development? Im looking forward for this :helpful:

rwill
11th December 2014, 09:14
Mine (https://code.google.com/p/y262/) is not ready either... I think mpeg2 is dead.

Emulgator
14th December 2014, 19:17
As long as DVDs are sold and have such a wide hardware player base, I wouldn't pronounce MPEG-2 as dead.

We shouldn't forget: every blu-ray player (next generation included) is required to play DVD,
so users will see no need to drop their DVD discs, and so will still buy DVDs as a habit.

I would gladly welcome x262 as an improved alternative, optimized to the max and even donate to have this achieved.

These days I am still asked to make DVDs for maximum compatibility's sake, no matter that I like blu-rays more...

colinhunt
2nd March 2015, 15:12
It's not dead as long as DVDs are being authored and released commercially. I'm still being asked for more DVD than Blu-ray authoring services.

Like Emulgator, I'd be happy to donate to see x262 development continue.

SuLyMaN
18th March 2015, 07:50
Going from HCenc to x262 2pass+OpenCL, the quality difference is stunning.
I do notice some noise though, for detailed scenes.


Hi mate. You have any screenshots/video sample to compare to / as reference? Thanks.
Does it mean its much better than HCenc yet? Or is the noise too noticeable?