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 6th February 2011, 11:32   #21  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by poisondeathray View Post
If you're using the fraps decoder with AVISource, it will be RGB
Since when? FRAPS is a YV12 format.
Dark Shikari is offline   Reply With Quote
Old 6th February 2011, 11:36   #22  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
To shrink PC range (0-255) to TV range, you can use ColorYUV(levels="pc->tv"), or better yet SmoothLevels(preset="pc2tv")

Derek
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 6th February 2011, 12:14   #23  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
Quote:
Originally Posted by Dark Shikari View Post
Since when? FRAPS is a YV12 format.
Since November 21st, 2009 I guess? In FRAPS 3.0.3 they added a Lossless RGB capture mode.

By default FRAPS still captures in their proprietary lossy YV12 compression, but by checking a box in setting, you can get proprietary lossless RGB compression instead, at the expense of slower capture speed and increased file size.
cyberbeing is offline   Reply With Quote
Old 6th February 2011, 12:34   #24  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Also note that when using their decoder with AviSource() it seems to always decode to RGB32, even it's not RGB.
sneaker_ger is offline   Reply With Quote
Old 6th February 2011, 13:52   #25  |  Link
Gfer
Registered User
 
Join Date: Mar 2006
Posts: 12
I'm really confused now. What should I do to ensure the best compatibility? Convert to TV-range(Rec709)?

Edit: It seems like it was an issue with DXVA and my ATI drivers, using ffdshow or disabling dynamic contrast when using the internal DXVA filter in MPC-HC makes the video look a little better.

Edit: I'm pretty sure DXVA is messing up the colors. Looks just fine when using ffdshow for h264. Is there any fix for this? Disabling dynamic contrast makes it look a little better, but not quite as good as the original/preview. Both MPC-HC's internal DXVA filter and ffdshow's DXVA filter produces the same results. I could upload the video if anyone wants to see what I'm seeing.

Last edited by Gfer; 6th February 2011 at 20:07.
Gfer is offline   Reply With Quote
Old 7th February 2011, 00:00   #26  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
1) Verify that without any conversion, you're getting RGB out of AVISource

2) If so, use ConvertToYV12(matrix="rec709"), and things should be totally fine

3) If not (you're getting some kind of YUV format), use histogram() to determine if the video is full or limited range

4) If it's limited range, encode as-is. If it's full range, either scale it with ColorYUV/SmoothLevels, or set --fullrange in x264.

Derek
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 7th February 2011, 00:28   #27  |  Link
Gfer
Registered User
 
Join Date: Mar 2006
Posts: 12
Encoded a version like that this time. When played with DXVA on, either ffdshow's or MPC-HC's internal filter, the colors become slightly brighter. When using ffdshow's h264 decoder everything looks fine. Even when using shaders in MPC-HC or setting a different output range in my graphic's driver, it still doesn't look like it should. Where do I go from here?
Gfer is offline   Reply With Quote
Old 7th February 2011, 01:00   #28  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
Sounds like your GPU drivers are doing some post-processing.

Quote:
Originally Posted by Dark Shikari View Post
You must either convert to TV range in your script, or use --fullrange.
Most decoders ignore the fullrange flag, sadly. Even ffplay does, and ironically seems to do the PC -> TV conversion twice.

Last edited by Snowknight26; 7th February 2011 at 01:09.
Snowknight26 is offline   Reply With Quote
Old 7th February 2011, 01:08   #29  |  Link
Gfer
Registered User
 
Join Date: Mar 2006
Posts: 12
Well, I have a ATI Radeon HD5850 GPU. There's Intelligent Saturation, Skin tone correction, dynamic range (which is 0-255) and dynamic contrast. Turning off these options and keeping the dynamic range at 0-255 made the video look like it should. Thanks for the help.
Gfer is offline   Reply With Quote
Old 7th February 2011, 01:19   #30  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
Indeed.

I prefer to turn this dynamic contrast /skin tone correction stuff off anyway - you shout set things up correctly without them.

My feeling on features like these is that they could potentially cause issues if you feed them unexpected input. I'm not basing that on anything but gut instinct, though !

Derek
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 7th February 2011, 01:29   #31  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
Now if only there was a way to keep the source input levels without Avisynth (such as when feeding x264 the input directly) and without --fullrange on..
Snowknight26 is offline   Reply With Quote
Old 7th February 2011, 12:24   #32  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by Snowknight26 View Post
Now if only there was a way to keep the source input levels without Avisynth (such as when feeding x264 the input directly) and without --fullrange on..
Like this:

Quote:
Originally Posted by Dark Shikari View Post
We have a patch under development to make x264 automatically do --fullrange, but this will not work for Avisynth scripts (it's impossible to judge reliably from an Avisynth script whether the output is fullrange or not).
nm is offline   Reply With Quote
Old 9th February 2011, 20:26   #33  |  Link
Schrade
Registered User
 
Schrade's Avatar
 
Join Date: Mar 2004
Posts: 339
Just to let you know, you want your video a bit brighter if you're going to upload it to YouTube. They seem to like to crush the blacks.

My current work process for FRAPS videos is using direct264 to encode the files and ffdshow to set the levels to 16-235. Direct264 reads the file in and it uses ffdshow to decode it on my system.

When encoding the videos using normal x264 and the --fullrange option, the videos playback locally perfectly fine but if you upload them to YouTube, YouTube will crush the blacks and make the videos really dark.
Schrade is offline   Reply With Quote
Old 9th February 2011, 21:52   #34  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
You should convert to TV range before uploading to Youtube.
Dark Shikari is offline   Reply With Quote
Old 24th June 2011, 23:09   #35  |  Link
userix
Registered User
 
Join Date: May 2008
Posts: 4
I have Fraps 3.2.9 and am using Handbrake to transcode my lossless RGB Fraps video captures. I am getting the "washed out" look with my transcoded videos. What arguments exactly do I have to set in my Handbrake CLI box to get it to convert with the right colorspace, luma, chroma, etc? I'm new to all this YUV, RGB, bt601, bt709 stuff.

How/where do I find and use this convertToYYV12 function? Thanks for the help!

Last edited by userix; 24th June 2011 at 23:26.
userix is offline   Reply With Quote
Old 20th May 2013, 14:32   #36  |  Link
mzso
Registered User
 
Join Date: Oct 2009
Posts: 930
Quote:
Originally Posted by Dark Shikari View Post
x264 by default encodes as TV range.

You must either convert to TV range in your script, or use --fullrange. We have a patch under development to make x264 automatically do --fullrange, but this will not work for Avisynth scripts (it's impossible to judge reliably from an Avisynth script whether the output is fullrange or not).
Ok. So at present, do I have to use --fullrange with ffmpeg?

How to verify the range with certainty? (The renderer might be good enough to guess/determine the range of the video)

Last edited by mzso; 20th May 2013 at 14:36.
mzso is offline   Reply With Quote
Old 20th May 2013, 15:40   #37  |  Link
mzso
Registered User
 
Join Date: Oct 2009
Posts: 930
Quote:
Originally Posted by jq963152 View Post
There is another thread over there:

http://forum.doom9.org/showthread.php?t=155772

That seems like an avisynth topic which I don't use. Which part is of interest to me?
mzso is offline   Reply With Quote
Old 20th May 2013, 16:09   #38  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 643
Quote:
Originally Posted by mzso View Post
Ok. So at present, do I have to use --fullrange with ffmpeg?

How to verify the range with certainty? (The renderer might be good enough to guess/determine the range of the video)
It's now --input-range PC in x264, probably the same in ffmpeg...

To verify it - open it in properly configured player, e.g. MPC-HC with LAV filters and madVR. madVR should show that range is full in OSD, and colors&brightness of the image should match source.
vivan is offline   Reply With Quote
Old 20th May 2013, 16:34   #39  |  Link
mzso
Registered User
 
Join Date: Oct 2009
Posts: 930
Quote:
Originally Posted by vivan View Post
It's now --input-range PC in x264, probably the same in ffmpeg...

To verify it - open it in properly configured player, e.g. MPC-HC with LAV filters and madVR. madVR should show that range is full in OSD, and colors&brightness of the image should match source.
I tried "-color_range 2"
Depending on decoder, I get full range (best guess), but with artifacts:



Otherwise limite range, and blurry. Same results without it.

Now, I'm going try to figure out how to pass --input-range PC to ffmpeg.

Last edited by mzso; 20th May 2013 at 16:44.
mzso is offline   Reply With Quote
Old 20th May 2013, 16:43   #40  |  Link
mzso
Registered User
 
Join Date: Oct 2009
Posts: 930
Quote:
Originally Posted by jq963152 View Post
You asked this:





And the other thread has the answer to it, see:







By the way, the latest HandBrake version (0.9.9 was just released), converts FRAPS YV12 footage ("Force lossless RGB capture (may be slower)" checkbox disabled) better than anything else i'm aware of.

There is a thread about it:

http://forum.doom9.org/showthread.php?t=165680

With the "Force lossless RGB capture (may be slower)" checkbox enabled, HandBrake messes up the colors. But with that checkbox disabled (YV12), HandBrake is quite perfect at converting FRAPS YV12 to x264.

I really would like to know why HandBrake is so good at converting FRAPS YV12.

I still don't know how to convert FRAPS YV12 with AviSynth as good as HandBrake does.
But If I disable lossless "Force lossless RGB capture (may be slower)" I get a lossy video right?
mzso 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 23:23.


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