Back Forum Reply New

What happened to lossless encoding in x264?

With latest megui+x264 I can't seem to select lossless or q=0. I think with an older version this was possible. I also looked at Sharktooth's losless profile, but it doesn't look that lossless to me, q=18, 3 b-frames, etc. I want something for transcoding lossless and huffyuv and also Lagarith don't want to work multithreaded in VD under any circumstances (even if Lagarith has a multithread option).
So what method can you suggest me, so I can get some speed out of my my dual cpu?

Trivial way: Split your clip a into two parts b+c. Then, instead of

gt;x264 --threads 2 .... a

do

gt;start /belownormal /b x264 --threads 1 ... b
gt;start /belownormal /b x264 --threads 1 ... c

and join the results. The method works with every codec, not only x264, and scales absolutely linearly

Thanks for the tip. I'll keep that in mind, maybe I'll need it someday.
But you missed the point. I don't have problems with x264 multithread (I have doubts of how to use it as lossless), but with Lagarith and huffyuv in VD.

Sorry, I'm an idiot. It seems that I can choose lossless only if I choose High profile. Problem solved.

x264 lossless may be multithreaded, but even running at double speed it's still probably twice as slow or more, plus it decodes slower than lagarith (which is already slower than huffyuv). Of course you can probably fiddle the options to make it almost as fast as xvid if you sacrifice space.

The best lossless format I've found for my purposes is xvid with ehr matrix @q2 (plus you get working smp) and high-speed settings, as long as you can accept that some pixels might be +-1 rather than 100% identical. And it works in avi. Of course, I won't keep you from testing stuff.

Yes, you were right about that speed (no matter what settings, choosing q=0 kills any speed). Still huffy for me atm. Lagarith seems to compress really well, in YV12 mode at least, but it encodes too slow. I'll try your xvid + cqm method, 4 days for saving lossless is just too much.


Originally Posted by foxyshadisThe best lossless format I've found for my purposes is xvid with ehr matrix @q2 (plus you get working smp) and high-speed settings, as long as you can accept that some pixels might be +-1 rather than 100% identical. And it works in avi. Of course, I won't keep you from testing stuff.

The it's not lossless is it lol? With sharktooths profile you should be able to run th elossless encoder in realtime. at least from my testing it's like that. Akupenguin and him worked out some speed and quality issues some time back.

It's close enough that the accumulated error after 3-4 iterations is invisible comparing side-by-side and interleaved, psnr is in the mid or high 90s, and it has no effect at all on the final encode. It isn't perfectly lossless, but functionally lossless. Of course, the file size is 1/2-2/3 the size of lagarith, not 1/10, a dvd-res movie might still need 5-10 gigs.

The one caveat is that it's YV12 only, but so is x264.

Oh, finally someone discovered EQM V3EHR

I read that for loseless you should disable CABAC , Cabac at this insane bitrate kill the processator

Disabling CABAC = loosing a lot of compression.


Originally Posted by SharktoothOh, finally someone discovered EQM V3EHR I always mistake it for Fox home matrix.

yeah they're very similar but if you test psnr or SSIM, EHR has an edge...
however it's not correct to call it lossless but it so close to the source you have to amplify the difference between the source and the encoded frames to spot the actual difference.

IIRC it was originally a cut and paste of the fox home matrix.  Then you modified it with all 8's in the inter-frame.

IMHO, it would be better to modify the intra-frames.

i couldnt find better intra coefficients distribution than that

Modified matrix from Star Wars Ep3.
Which in itself, is modified fox home.Code:
8,5,7,9,11,13,14,17
5,6,8,11,13,14,17,18
7,9,10,11,16,17,17,16
9,10,13,13,14,17,18,20
10,13,13,14,16,17,20,24
13,13,14,16,17,20,24,29
13,13,14,17,19,23,28,34
13,14,17,19,23,28,34,41

Code:
8,5,7,9,10,10,11,11
5,6,9,10,10,11,11,12
7,9,10,10,11,11,12,12
9,10,10,11,11,12,13,13
10,10,11,11,12,13,13,13
10,11,11,12,13,13,14,14
11,11,12,13,13,14,14,14
11,12,12,13,13,14,14,14AFAIK values below 8 can only cause problems in MPEG4 ASP and may even be not allowed...

Yes they are allowed.
Only quot;problemquot; as such is high bitrate.
¥
Back Forum Reply New