Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
#1 | Link |
Registered User
Join Date: Oct 2008
Posts: 37
|
x264 Lossless question
Hi, good day.
I was wondering if is safe to use x264 lossless, and is comparable to Lagarith. I mean, if I reencode this x264 lossless to x264 lossy, it's the same as to reencode a Lagarith to a x264 lossy? And, should I be using CoreAVC or libavcodec to decode this lossless through DSS2()? These question had been retaining my sleep these days, so I would be very gratefull if they could be answered ![]() Thanks. |
![]() |
![]() |
![]() |
#2 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
x264 lossless has pretty much strictly superior compression to Lagarith, even in intra-only mode IIRC.
Unlike Lagarith, it only supports the YV12 colorspace. To decode it correctly, you need a libavcodec from within the past ~2-3 weeks (as that's when support was added) or CoreAVC 1.8.5. |
![]() |
![]() |
![]() |
#3 | Link |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,929
|
How to encode to lossless?
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
![]() |
![]() |
![]() |
#4 | Link |
Registered User
Join Date: May 2006
Posts: 957
|
Atak_Snajpera, huh? --qp 0 is that what you mean?
stpdrgstr, lossless is lossless, the input to "x264 lossy" in both cases should be the same.
__________________
x264 log explained || x264 deblocking how-to preset -> tune -> user set options -> fast first pass -> profile -> level Doom10 - Of course it's better, it's one more. Last edited by J_Darnley; 26th December 2008 at 18:36. |
![]() |
![]() |
![]() |
#5 | Link | |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,929
|
Quote:
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
|
![]() |
![]() |
![]() |
#7 | Link |
Software Developer
![]() Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,269
|
Note that for frame-accurate access to H.264 streams (lossless or not) you should use DGAVCIndex/AVCSource() instead of DirectShow.
I'm not sure whether AVCSource() already has an updated libavcodec with support for x264 lossless mode though...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
![]() |
![]() |
![]() |
#9 | Link |
Software Developer
![]() Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,269
|
Didn't know that. Why is it like that? And does x264 automatically set "--bframe 0" when "--qp 0" is used?
(Could check the sources, but I'm too lazy right now ^^)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
![]() |
![]() |
![]() |
#11 | Link | |
Software Developer
![]() Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,269
|
With "always" you mean "B-Frames always reduce compression in lossless mode". Not in general. Right?
Quote:
![]()
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
|
![]() |
![]() |
![]() |
#12 | Link |
Software Developer
![]() Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,269
|
I created streams with x264's mode "predictive lossless" mode using P-Frames and even B-Frames (didn't know b-frames are bad for lossless) and CoreAVC as well as recent ffdshow do handle it properly.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
![]() |
![]() |
![]() |
#14 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Ultra-fast: --subme 1 --no-cabac --partitions none --me dia
Normal: --subme 5 --partitions all Slow: --subme 6 --8x8dct --partitions all --ref 2 Slower: --subme 8 --8x8dct --partitions all --ref 4 --me umh --mixed-refs Slowest: --subme 8 --8x8dct --partitions all --ref 16 --me esa --mixed-refs Note that no-cabac loses about 10-15% compression but massively speeds up playback. Other things that hurt compression the most are subme=0 (vs other values) and partitions=none. |
![]() |
![]() |
![]() |
#15 | Link | |
Registered User
Join Date: Feb 2021
Location: Germany
Posts: 21
|
Quote:
Code:
--partitions all Also, Code:
--8x8dct |
|
![]() |
![]() |
![]() |
#18 | Link | |
Registered User
Join Date: Jan 2008
Location: Finland
Posts: 68
|
I've made some of my own tests regarding various lossless video formats, and found out that not only does lossless H.264 compress the best, it also provides the fastest playback speeds.
In the test I made a while back, I encoded the same 2000-frame clip from a DVD source to various lossless formats and then made a 2-pass encode with x264 from the various lossless files using simple AviSynth inputs. Processor used was Intel C2Q Q6600 @ 2.4 GHz. These were the x264 encoding settings used for the lossless -> lossy encode: Code:
x264.exe --pass 1 --stats ".stats" --progress -B 768 -b 16 -r 1 --me dia --progress --subme 1 --no-dct-decimate --partitions none --threads 6 x264.exe --pass 2 --stats ".stats" --progress -B 768 -b 16 -r 6 --mixed-refs --b-pyramid --weightb --me umh --subme 7 --merange 24 --bime --b-rdo -A all --8x8dct --threads 6 --trellis 2 --aq-strength 1.0 Quote:
![]() Edit: Fixed the averages.
__________________
Where did neuron1 go? | Doom10 Last edited by Daiz; 28th December 2008 at 22:25. |
|
![]() |
![]() |
![]() |
#19 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Note the proper way to average "20fps" and "100fps" is to do 2/(((1/20)+(1/100))), not just average the FPS (since the computer spends more time doing the 20fps encoding than the 100fps, so the average has to be weighted).
|
![]() |
![]() |
![]() |
#20 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,632
|
Just to be on the save side I ask: (otherwise I know there would be a thread in a not to distant future where Dark Shikari writes something like: "How people come to such assumtions ..."
Are there any other options aside form b-frame related once and "-nr" that should be (need to be) disabled when aiming for a lossless encode? Cu Selur |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|