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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th November 2019, 21:28   #1  |  Link
surgical
Dopax
 
Join Date: Dec 2009
Posts: 17
Help for a correct analysis of a video source

Greetings to all :
I need your wise advice on what methodology or, better yet, what tool, if any, you recommend for an analysis that will help me, in the best and most practical way possible, in the correct interpretation of the most "critical" characteristics of the video source (estimation of the amount and type of grain / noise, motion estimation, possible artifacts in sharp edges or banding in gradients that could have escaped me from a visual observation, etc ... apart from useful data such as quantizers, types of frames, etc ...) , in order to optimize subsequent coding in x264.
Obviously, when I refer to whether or not there were tools, I mean opensource tools ( I can't access software such as Streameye, Codecvisa, Zond, etc ...). I would greatly appreciate any help you could give me.
Thank you all in advance, best regards.
surgical is offline   Reply With Quote
Old 9th November 2019, 23:53   #2  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Human eyes and brain. Good luck!
videoh is offline   Reply With Quote
Old 13th November 2019, 13:26   #3  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Originally Posted by videoh View Post
Human eyes and brain.
This.




As a side note, *after* you encode the file, you can use metrics like ssim, psnr and VMAF to get score that attempts to tell you how good the quality of the encode is, but again your eyes are gonna be the best way to judge a content and encode it accordingly.

Cheers,
Frank.
FranceBB is offline   Reply With Quote
Old 13th November 2019, 19:11   #4  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
Tools can be useful to score possible problems since they tends to be quite "objective" and mathematical.
Naked eyes are the most free tools available, but it also depends on how well they're trained and also how good is the equipment used to display the video. You can have a good trained eyes, but if the monitor is poor or not calibrated, you can't judge objectively. The same apply for audio and ears...

Last edited by mp3dom; 13th November 2019 at 19:33.
mp3dom is offline   Reply With Quote
Old 13th November 2019, 19:47   #5  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by mp3dom View Post
Naked eyes are the most free tools available
I agree. I have found that the most free tools are usually also the most optimal.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 13th November 2019, 22:37   #6  |  Link
surgical
Dopax
 
Join Date: Dec 2009
Posts: 17
Well ...... first of all , thanks for answering.

The truth is that I think I haven't been fully successful in the way of formulating the question , or rather , I've been carried away by the naive dream ( especially after seeing the thread about the Zopti script ) of believing in the possibility of the existence of an "optimizer" of x264.

The problem , suppose , is that my eyes don't have the experience and training that , I believe , is necessary in these aspects (will I have estimated well the type and level of grain / noise? ... will have taken into account the complexities of the video source that can generate problems if I don't consider it in the coding? ....... etc .... etc ....) and that for many of you , with a lot of experience in video coding , don't represent more than a mere formality , but for people like me they represent a sea of doubts.

I think the right question should have been , how do I correctly train my visual perception to evaluate the different challenges that a video source can present to me and , consequently , how to address them correctly with the parameters that a codec like x264 offers me ?

In any case, again, thanks for your attention.
surgical is offline   Reply With Quote
Old 14th November 2019, 16:08   #7  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
Quote:
how do I correctly train my visual perception to evaluate the different challenges that a video source can present to me
I suggest not to actually watch content like watching TV for entertainment, and not listening to audio.
Literally pixel-peeping, while live watching.
Then do use stepping through frames. On a PC VirtualDub is your friend.
Some people will be rather insensitive to encoding artifacts.
(Often with flawed introduction of technical novelties a certain kind of artifact is generated.
The audience adopts the new stuff and demands more: distorted guitars, shaky camerawork, MP3-grizzle...)


What I can suggest is spending countless hours scrutinizing different sources coming from analog mastertapes, then cameratapes like VHS, DV.
Choose test cases. There are lots of reference clips around, ParkRun is one of them.
MPEG-2: Scrutinize dark parts, ripples on water, open fire, crisscross-motion.
The luxury of convincing grain is often unfulfillable here...
AVC: Scrutinize dark parts, expect wet patches in water, leaves.
See how some blurays (Life of Brian) have moving grain along contours,
learn how not to blame this on the encoder, rather on a sophisticated, but a bit overdone regraining.
See other blu-rays exhibit mini DCT-like "tickle noise" instead of smooth grain.
First learn their inborn vulnerabilities, watch their faults.

Then maim your sources while encoding.
Use all encoders DV, MPEG-2, AVC you can lay your hand on.
Watch them degrade the picture as you make them bitrate starving.
Watch dark areas, often macroblocks will be visible there first.

Conclude from the early DCT codecs what the next codec will try to hide these flaws.
Once you easily expect and spot the macroblocking from DCT, mosquito noise etc, you will be able to find their "improved remnants" also in bitrate starved AVC.
In early AVC and HEVC watch the grain move or disappear in wet patches.
Then watch the smearing of bitrate-starved HEVC and you get an idea how our eyes get fooled more and more eloquently as codecs develop. Later hybrid codecs (xvc) can already encode prime pictures from misery bitrates.

Use NLEs if you have them, use their built-in encoders, compare what they do to the source.
(In EditStudio I diff'ed once the decoding result from Mainconcept DV, Sony DV, quartz.dll.
Interesting how the differnet implementations of a simple DCT codec can destroy things differently, only one did well.)

Live Display:
On a PC learn about the different renderers, switch them around.
If it is low resolutions: MPC-HC with/without MadVR.
If its got to be a TV, use a known-not-to-introduce-heavy-processing monitor,
(ouch, which one? I use a rare Loewe 32" TFT where I can turn off any enhancement, no longer in production).

Quote:
and , consequently , how to address them correctly with the parameters that a codec like x264 offers me ?
Tuning encoders: there is a wealth of information given here in this forum.
Optimal x264 commandlines are here since 2014,
after matching them to blu-ray-quality with restriction of some starve parameter like maxQ, I/P ratio etc
I just give all the bitrate I an afford and indeed add a bit noise to avoid wet patches in dark areas.
And, x265 still sees development, so you just may want to follw the appropriate threads and make test encodes.
And Zopti is as good as it can get IMHO, (I still have to try it)

And, all beauty is in your eyes, I concur with all what has been said here.
Only very rarely I trust tools, as an audio angineer I am happy with 5% weighting for a PSNR figure and 95% for my eyes.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 14th November 2019 at 16:36.
Emulgator is offline   Reply With Quote
Old 15th November 2019, 19:13   #8  |  Link
surgical
Dopax
 
Join Date: Dec 2009
Posts: 17
Thanks for your tips Emulgator.

Quote:
I suggest not to actually watch content like watching TV for entertainment, and not listening to audio.
Literally pixel-peeping, while live watching.
Then do use stepping through frames. On a PC VirtualDub is your friend.
I don't usually test on TV ; I've it calibrated ( the best I could since I don't have professional calibration tools ) without "enhancements" and with the help of my software (Spears & Munsil and/or Disney WOW ) , connected via HDMI to an HTPC that I mount of the leftovers of my hardware "updates" and playing with MPC-HC through madvr ( thank you dear Madshi ).

Quote:
What I can suggest is spending countless hours scrutinizing different sources coming from analog mastertapes, then cameratapes like VHS, DV.
Choose test cases. There are lots of reference clips around, ParkRun is one of them.
MPEG-2: Scrutinize dark parts, ripples on water, open fire, crisscross-motion.
The luxury of convincing grain is often unfulfillable here...
AVC: Scrutinize dark parts, expect wet patches in water, leaves.
See how some blurays (Life of Brian) have moving grain along contours,
learn how not to blame this on the encoder, rather on a sophisticated, but a bit overdone regraining.
See other blu-rays exhibit mini DCT-like "tickle noise" instead of smooth grain.
First learn their inborn vulnerabilities, watch their faults.
My dearest Monty Python ................. unfortunately I don't have this film in bluray

One of my information searches was to see if there was any reference to websites of resources , samples , etc... that were related , precisely , to the methodology you've recommended me , such as "Consolidated list of test video clip resources" but I haven't been satisfied ; either because I haven't known how to look for them or because of the doubts that my own inexperience generates when choosing them .

I would greatly appreciate any advice , based on that reference or other websites that are more appropriate for what we comment and that I don't know , since your recommendations fully matches those that were already my goals , thanks to what I learned looking for information in the forums and others references , as "Things to Look for When Evaluating Encoders" or -Considerations on quality and “state-of-the-art”- , to give an examples .

Quote:
Then maim your sources while encoding.
Use all encoders DV, MPEG-2, AVC you can lay your hand on.
Watch them degrade the picture as you make them bitrate starving.
Watch dark areas, often macroblocks will be visible there first.

Conclude from the early DCT codecs what the next codec will try to hide these flaws.
Once you easily expect and spot the macroblocking from DCT, mosquito noise etc.........
I think it's an excellent strategy ; I'll take it into account

Quote:
Use NLEs if you have them, use their built-in encoders, compare what they do to the source.
(In EditStudio I diff'ed once the decoding result from Mainconcept DV, Sony DV, quartz.dll.
Interesting how the differnet implementations of a simple DCT codec can destroy things differently, only one did well.
I thought , precisely , to resume my experiences of yesteryear with Premiere ....... again , for your recommendations

Quote:
................matching them to blu-ray-quality with restriction of some starve parameter like maxQ, I/P ratio etc . I just give all the bitrate I an afford and indeed add a bit noise to avoid wet patches in dark areas.
And, x265 still sees development, so you just may want to follw the appropriate threads and make test encodes..........................
And, all beauty is in your eyes, I concur with all what has been said here.
Only very rarely I trust tools, as an audio angineer I am happy with 5% weighting for a PSNR figure and 95% for my eyes .
I completely agree with your reasoning.
I want to emphasize that in this aspect , in my case in particular , it's not my desire to become an "obsessive" of the codifications with extreme parameters in search of the Holy Grail of quality. I'm moved more by a spirit of learning , of experimenting in the intricacies of x264 reasonably and with consistency ( After all , I'm not going to become a professional in the field ).

I'm the first to value the efforts that developers , such as Dark Shikari , with the extensive experience that supports them , have made to develop some "presets", whose value and practicality for those not understood like me , are beyond doubt ; but ....... Dark Shikari , forgive me , I also want to press the button , but ONLY knowing what it does , what is its function and if it is mandatory to "press" it in that given situation . After all , I suppose I want to make my coding a slightly less routine process.

P. D. :
Quote:
Originally Posted by Dark Shikari
It is posts like this that make me want to pull a Theora and remove almost all user-facing options completely because if you give someone a button, they will press it. And even after it shoots them in the leg, they'll go limping around for more buttons to press! .
After all , Dark , I also don't want me to "shoot" , nor do you eliminate those options out of jail when faced with such situations . Humanity is like that ........ I suppose that the imaginative resources of the "cosmic entity" , God , evolutionary theory , or whatever is responsible for "adjusting" the planet every x million years through Mass extinction events , sold out......and we emerged to "fix it" ..........Let's say thank you that certain "buttons" haven't yet been pressed.
surgical is offline   Reply With Quote
Old 19th November 2019, 18:16   #9  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
The key thing is to come up with a crisp definition of what you want your final product to do, and for whom.

Also, bear in mind that an encoder is exactly software that analyzes a source and attempts to adapt encoding to get the best results of it. There isn't always stuff you can set manually than the encoder can do itself. It really depends on your sources and your goals.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 20th November 2019, 20:10   #10  |  Link
surgical
Dopax
 
Join Date: Dec 2009
Posts: 17
Quote:
The key thing is to come up with a crisp definition of what you want your final product to do, and for whom.

Also, bear in mind that an encoder is exactly software that analyzes a source and attempts to adapt encoding to get the best results of it. There isn't always stuff you can set manually than the encoder can do itself. It really depends on your sources and your goals.
I understand .......... very reasonable , thanks
surgical is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.