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 11th July 2013, 10:05   #1  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,100
x264 encoding RGB, doesnīt work as intended.

Okay, i have searched all around, and i canīt find much information regarding my problem.

Itīs probably not a real "problem" and just a cause of me not knowing what to do.

Well to simply put it, i got a Avisynth script, itīs RGB at the end (tried RGB32 and 24, 24 is less wrong though).

I then encode it with Megui, but i set x264 command line to:

--input-csp rgb --output-csp rgb

And the RGB32 will look like, 6 small half windows of the movie, but it got green lines making it just look weird.

RGB24 will pretty much be the same, but without the green lines, just different colors on each window.

(all windows play back the move, they look the same, except colors etc)


Now i am pretty sure i have done this way back when RGB was introduced to x264, but somehow i canīt make it work.

I444 and the rest works as expected though.


And a bonus question:

Is it possible to encode Lossless with x264 10bit on normal sources (8bit).

I am pretty sure itīs not possible, as itīs converting to 10bit, but i may be wrong.



Thanks!

Last edited by zerowalker; 11th July 2013 at 10:16.
zerowalker is offline   Reply With Quote
Old 11th July 2013, 10:27   #2  |  Link
kabelbrand
Compression mode: Lousy
 
kabelbrand's Avatar
 
Join Date: Mar 2009
Location: Hamburg, Germany
Posts: 73
You are using an AviSynth source but isn't input-csp just for use with RAW video? Have you tried without it? output-csp is ok...
kabelbrand is offline   Reply With Quote
Old 11th July 2013, 10:33   #3  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,100
Didnīt work, it only made the 6 half windows to 1 big half window, with green lines (on both 24 and 32 rgb)
zerowalker is offline   Reply With Quote
Old 11th July 2013, 11:24   #4  |  Link
kabelbrand
Compression mode: Lousy
 
kabelbrand's Avatar
 
Join Date: Mar 2009
Location: Hamburg, Germany
Posts: 73
Hmmm. Maybe a stupid question but does the source video look alright if you open the AviSynth script in VirtualDub or some player?
kabelbrand is offline   Reply With Quote
Old 11th July 2013, 11:31   #5  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,100
Yes it does. Canīt put the finger on whatīs wrong;S
zerowalker is offline   Reply With Quote
Old 25th November 2013, 00:43   #6  |  Link
osgZach
Registered User
 
Join Date: Feb 2009
Location: USA
Posts: 658
I've been wondering about this myself. I've never been able to produce a "normal" watchable video file when trying to encode RGB game captures, to RGB H.264 streams. Although in my case I'm not getting half-images, I am getting full images, but they are all scaled down, and represented by 6 sets of smaller images which occupy the actual resolution space of the video. The large primary image in the set contains a black and white image, then below that are 4 smaller sections which look like the Black variety, and White variety, Infrared images.

I've get this result regardless of wheather I'm trying it via Avisynth (meGUI) or using the CLI encoder directly.
Must be getting a command wrong somewhere....?

I've uploaded an attachment JPG showing what it looks like.
Attached Images
 

Last edited by osgZach; 25th November 2013 at 00:48.
osgZach is offline   Reply With Quote
Old 25th November 2013, 00:46   #7  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,100
I do get that as well.
There are 2 versions to get.

One is with RGB24, other RGB32. Both produces different results, and none are correct.

All seem to be many different windows that are smaller and messed up in colors.

I am pretty sure i did manage to produce an RGB correctly like 2 years ago, but either something has changed or i am doing something wrong.
And i have tried it so many times, itīs quite frustrating.
zerowalker is offline   Reply With Quote
Old 25th November 2013, 01:13   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,870
RGB works ok here

Maybe something wrong with your x264 binary, or your decoder, or something else wrong with your setup ?
poisondeathray is offline   Reply With Quote
Old 25th November 2013, 01:13   #9  |  Link
osgZach
Registered User
 
Join Date: Feb 2009
Location: USA
Posts: 658
No matter what I try it seems x264 always converts the output format to YUV 4:4:4 as well...
osgZach is offline   Reply With Quote
Old 25th November 2013, 01:15   #10  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,870
Quote:
Originally Posted by osgZach View Post
No matter what I try it seems x264 always converts the output format to YUV 4:4:4 as well...
How are you making that determination ?

If it's something like mediainfo, it reports incorrectly ; Check with something like ffmpeg
poisondeathray is offline   Reply With Quote
Old 25th November 2013, 01:25   #11  |  Link
osgZach
Registered User
 
Join Date: Feb 2009
Location: USA
Posts: 658
Yeah I was getting bogus info from Media Info (why don't they fix that?)

FFprobe confirmed RGB (bgr)

Interesting outcome as well.. I went and got an x264 binary from http://www.x264.nl/x264_main.php instead of using the one MeGUI ships with (why is theirs so much smaller anyway?) and I now get the proper output, the video is watchable..

And... this is what a proper RGB looks like, I guess
http://pics.oldskoolgames.com/forums...CombatRGB5.mkv

Last edited by osgZach; 25th November 2013 at 02:56.
osgZach is offline   Reply With Quote
Old 25th November 2013, 07:54   #12  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,100
So the Megui one doesnīt work?
I should work, i think itīs only smaller cause it skips some internal libraries, but it shouldnīt effect RGB in any way.

LAV Filter is my decoder btw, and the video linked works properly as well.
zerowalker is offline   Reply With Quote
Old 25th November 2013, 13:10   #13  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,033
Quote:
Originally Posted by osgZach View Post
Yeah I was getting bogus info from Media Info (why don't they fix that?)
You could help them by submitting a patch or at least filing a detailed bug report. Complaining usually doesn't change anything

Quote:
Originally Posted by osgZach View Post
(why is theirs so much smaller anyway?) and I now get the proper output, the video is watchable..
Different compiler versions/settings used in the build process and/or different versions of external libraries linked in and/or certain external libraries enabled/disabled.
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 25th November 2013, 20:51   #14  |  Link
osgZach
Registered User
 
Join Date: Feb 2009
Location: USA
Posts: 658
Zero, no idea why MeGUI's binaries won't work but its always been that way apparently. Give the one I linked a try and see what happens.

I was actually amazed at how high I could jack up CRF with RGB.
osgZach is offline   Reply With Quote
Old 25th November 2013, 20:54   #15  |  Link
osgZach
Registered User
 
Join Date: Feb 2009
Location: USA
Posts: 658
Quote:
Originally Posted by LoRd_MuldeR View Post
You could help them by submitting a patch or at least filing a detailed bug report. Complaining usually doesn't change anything



Different compiler versions/settings used in the build process and/or different versions of external libraries linked in and/or certain external libraries enabled/disabled.
I couldn't code my way out of a paper bag unfortunately, but this has apparently been such a long standing issue I am honestly surprised they haven't fixed it. Surely those more vocal than I, have complained to them already
osgZach is offline   Reply With Quote
Old 26th November 2013, 01:56   #16  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,100
osgZach, will do.

Wait does the CRF work differently between colorspaces?
As 20CRF which letīs say looks ugly with YV12, should still look ugly with RGB, except that the video should be quite bigger and colors more accurate, the Luma detail should be the same.
zerowalker is offline   Reply With Quote
Old 26th November 2013, 17:47   #17  |  Link
osgZach
Registered User
 
Join Date: Feb 2009
Location: USA
Posts: 658
I guess the short answer is "yes" ? For whatever reason, you can use higher CRF values. Look at the encode flags on the video I posted, I would never try to encode YV12 with a CRF that high I can tell you that
osgZach is offline   Reply With Quote
Old 26th November 2013, 17:51   #18  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,100
True, but canīt say the video looks that good either, would have to compare.
But CRF 30 should be extremely bad, especially on lower resolution, DVD would be unwatchable to put it harshly.
zerowalker is offline   Reply With Quote
Old 26th November 2013, 17:54   #19  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,033
Quote:
Originally Posted by osgZach View Post
this has apparently been such a long standing issue I am honestly surprised they haven't fixed it. Surely those more vocal than I, have complained to them already
If all users reason like that, nobody will ever submit a proper bugreport and this issue might remain unrecognized by the developer

BTW: MediaInfo supports a zillion of container, audio and video formats, each of which has dozens of properties. So it's not that surprising that bugs, which effect a specific property of a specific video format, can get overlooked. Also it's not like storing RGB data is the most common use of H.264.
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 26th November 2013, 18:28   #20  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 649
Wait, how mediainfo is wrong? RGB in H.264 stored as 4:4:4 YUV with "GBR" matrix (Y = G, Cb = B, Cr = R).

Last edited by vivan; 26th November 2013 at 18:38. Reason: BGR -> GBR
vivan 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 06:32.


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