Log in

View Full Version : One question about x264 lossless


jfromeo
21st December 2009, 00:41
Hello there.

I'm currently rebuilding my FullBluray library into BDRemuxes with lossless codecs that let me compress the video/audio tracks without any loss in quality.

Then, I take the m2ts main track and demux with eac3to its video track into H.264 AVC/VC-1 and I take the main English track and demux it in LPCM/TrueHD/DTS-HD format and subtitles in srt with suprip.

What I do next is compress the audio track in FLAC (-8) and remux everything in a mkv format.

But I'd like to ask one thing. Is there any lossless video codec for encoding the video track and gaining some space? Will x264 lossless do the job? Is it really lossless?

Thanks in advance.

LoRd_MuldeR
21st December 2009, 00:45
But I'd like to ask one thing. Is there any lossless video codec for encoding the video track and gaining some space? Will x264 lossless do the job? Is it really lossless?:thanks:

Yes, it's 100% lossless. Given that your source is in the YV12 color-space. Otherwise the source needs to be converted to YV12, which would be a kind of loss.

And of course a lossless compressed video will be "smaller" than completely uncompressed (raw) data. But it will be MUCH bigger than lossy compression, for obvious reasons!

Especially if your source is a lossy compressed stream, such as BluRay, then converting it to lossless H.264 (or any other lossless format) will make is a lot bigger...

Chengbin
21st December 2009, 01:05
A word of advice, don't convert it to lossless. You'll end up with a file at least 5 times bigger. If you really don't want loss in quality, why don't you just copy the original video over?

jfromeo
21st December 2009, 01:13
Oh thanks, so I'd be doing a transcode lossy to lossless right (avc/vc-1 lossy to x264 lossless)?

That's definitely not a good move (apart from being dumb :))

Well I guess I'll leave the video in the original lossy format (avc/vc-1). Chengbin I was asking if there ware any way to compress the video track gaining some space without any loss but I guess there isn't. Some kind of "zip tool" to apply to the video track that let me restore it to the original form bit-by-bit.

sneaker_ger
21st December 2009, 01:19
In fact the videos already are "zipped" after the lossy stage. (The developers weren't that stupid ;) ). You can test it yourself by zipping/raring/7zipping the mkvs. You won't see any file size decrease worth the effort.

Dark Shikari
21st December 2009, 02:35
Funnily enough, I have at one DVD that has some parts that get smaller by conversion to x264 lossless.

Keiyakusha
21st December 2009, 02:51
Something like... Musou Kakyo - A Summer Day's Dream? ;)

Dark Shikari
21st December 2009, 02:54
Something like... Musou Kakyo - A Summer Day's Dream? ;)How did you ever guess? ;) ;)

Chengbin
21st December 2009, 03:59
zipping/rarring/7zipping a H.264 video file will only make it slightly bigger.

Dark Shikari
21st December 2009, 04:13
zipping/rarring/7zipping a H.264 video file will only make it slightly bigger.$ x264 videos/foreman_cif.y4m -o test.h264
[...]
x264 [info]: kb/s:507.94
$ paq8p.exe -8 test.h264
Creating archive test.h264.paq8p with 1 file(s)...
test.h264 635554 -> 632920
635554 -> 632950

poisondeathray
21st December 2009, 04:24
His sources are blu-ray. Transport streams have significantly more overhead, and I think you could gain 4-5% extra compression from archiving it with zip/rar etc... But watching it in the archived format would be difficult

sneaker_ger
21st December 2009, 04:28
He's using Matroska as the final container.

wyti
21st December 2009, 04:57
His sources are blu-ray. Transport streams have significantly more overhead, and I think you could gain 4-5% extra compression from archiving it with zip/rar etc... But watching it in the archived format would be difficult

as DS tested, ~0.5% benefits with paq8p means almost no gain possible with common compressors (even maybe bigger files)
and paq is deadly slow :eek:

Dark Shikari
21st December 2009, 05:01
as DS tested, ~0.5% benefits with paq8p means almost no gain possible with common compressors (even maybe bigger files)
and paq is deadly slow :eek:No, transport streams have a ton of overhead and often have padding, which can give an easy 10%+ compression.

Blue_MiSfit
21st December 2009, 09:35
Indeed.

@OP - I think you'd be quite surprised at the incredible quality that x264 can offer when reducing the bitrate by 1/3 to 1/2 of the source. I have very discerning eyes, and 99% of my BluRay backups are quite indistinguishable from their sources at less than half the bitrate.

--preset slow --tune film --crf 19 does the job VERY nicely ;)

Heck, lots of movies look just as good at 720p, since the sources aren't terribly sharp to begin with!

~MiSfit

jfromeo
21st December 2009, 09:43
No, transport streams have a ton of overhead and often have padding, which can give an easy 10%+ compression.

Even a mkv container, or only m2ts/ts?

If they are going to be compressed a 10%, I'm rebuilding all my filmography :P You know, I don't watch movies at every hour of the day, just one at a time, and I can wait for it to be decompressed. How many minutes would it take for a i7-920@2.66GHz HT on (4 cores + 4 threads) + 3x2GB DDR3 to decompress a typical ~20GB mkv paq8p'd?

Chengbin
21st December 2009, 15:14
Even a mkv container, or only m2ts/ts?

If they are going to be compressed a 10%, I'm rebuilding all my filmography :P You know, I don't watch movies at every hour of the day, just one at a time, and I can wait for it to be decompressed. How many minutes would it take for a i7-920@2.66GHz HT on (4 cores + 4 threads) + 3x2GB DDR3 to decompress a typical ~20GB mkv paq8p'd?

More than a day.

Dark Shikari
21st December 2009, 18:36
Even a mkv container, or only m2ts/ts?Just TS. When you remux to MKV it usually removes the filler.

jfromeo
21st December 2009, 23:35
Got it.

Thanks everyone.