Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-10 Thread Andy Furniss
Peter Rabbitson wrote: -c:v libx264 -colorspace bt709 -pix_fmt yuv444p -profile:v high444 \ -qp 0 -preset:v ultrafast \ -t 5 greenz.mkv FWIW just using -colorspace is not complete. ffmpeg -i greenz.mkv would list 709/unknown/unknown adding -color_primaries b

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-10 Thread Carl Eugen Hoyos
Peter Rabbitson rabbit.us> writes: > On 05/09/2016 08:02 PM, Carl Eugen Hoyos wrote: > > Peter Rabbitson rabbit.us> writes: > > > >> scale=320x240 > > > > Scaling makes very little sense with lossless encoding. > > Could you elaborate? There is no visual difference between high-quality and lo

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Peter Rabbitson
On 05/09/2016 08:02 PM, Carl Eugen Hoyos wrote: Peter Rabbitson rabbit.us> writes: scale=320x240 Scaling makes very little sense with lossless encoding. Could you elaborate? ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Carl Eugen Hoyos
Peter Rabbitson rabbit.us> writes: > scale=320x240 Scaling makes very little sense with lossless encoding. > -c:v libx264 -colorspace bt709 -pix_fmt yuv444p > -profile:v high444 -qp 0 -preset:v ultrafast Which video player are you using for playback? If your input is RGB and you want lossle

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Andy Furniss
Peter Rabbitson wrote: On 05/09/2016 04:34 PM, Andy Furniss wrote: Don't test with color src - use something real and you may see different. Nod. For completeness below is *literally* what my pipeline looks like, except of course it isn't "all green". The command as-is produces satisfactor

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Peter Rabbitson
On 05/09/2016 04:34 PM, Andy Furniss wrote: Don't test with color src - use something real and you may see different. Nod. For completeness below is *literally* what my pipeline looks like, except of course it isn't "all green". The command as-is produces satisfactory results for both the

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Andy Furniss
Peter Rabbitson wrote: On 05/09/2016 03:01 PM, Peter Rabbitson wrote: scale=in_color_matrix=bt601:out_color_matrix=bt709:in_range=full:out_range=tv On a real source I don't think in_color_matrix=bt601 would be correct. in_range=full:out_range=tv IIRC failed testing with color src (I guess it

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Peter Rabbitson
On 05/09/2016 02:10 PM, Andy Furniss wrote: yuv444p is not very compatible it may just fail or the player may need to convert to 420 anyway. In the words of Poynton (IIRC) the only reason to convert rgb to yuv is to enable sub-sampling (though I guess it may be better supported than if you actu

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Peter Rabbitson
On 05/09/2016 03:01 PM, Peter Rabbitson wrote: scale=in_color_matrix=bt601:out_color_matrix=bt709:in_range=full:out_range=tv Correction. Testing indicates the specification of in_* confuses ffmpeg even more. What seems to be "the way forward" is: ffmpeg -y -r 30 \ -filter_complex ' colo

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Peter Rabbitson
On 05/09/2016 01:33 PM, Thomas Worth wrote: Here's your cheat sheet if you want perfect decoding of YCbCr to RGB: 1. Encode RGB to YCbCr using the Poynton-approved RGB->709 matrix coefficients (don't mess with 601, trust me, unless you think apples should look like oranges) 2. Subsample the chr

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread chronek
- Anything else I missed/need to know? :) You could check "-sws_flags full_chroma_inp+full_chroma_int+accurate_rnd+bitexact" options ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscr

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Andy Furniss
Peter Rabbitson wrote: Hello! I am having trouble finding info on how to properly control color reproduction, both in terms of "reference manual" and in terms of "best practice guides". If I missed a resource neatly explaining everything I am confused about below, please do not hesitate to "RTFM

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Carl Eugen Hoyos
Peter Rabbitson rabbit.us> writes: > >> - Am I correct that the inconsistency #00AA00 => #00AB01 is > >> simply "cost of doing YUV business", or is the reason more > >> nuanced/involved? > > This question also got skipped, and I am really keen on > understanding whether colors can in fact rou

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Thomas Worth
On Fri, May 6, 2016 at 7:04 AM, Peter Rabbitson wrote: > I am looking to produce high quality 720p H264 streams derived from RGB > source material. Both the source and 99.999% of the playback environments > are 24bit RGB color platforms (pc/mobile/etc displaying a youtube/vimeo/etc > window in a

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Phil Rhodes
>> - Am I correct that the inconsistency #00AA00 => #00AB01 is simply "cost >> of doing YUV business", or is the reason more nuanced/involved? I have no idea how ffmpeg's internals work, but yes, if you are between RGB and YUV then yes, there can be errors, especially in an 8-bit world. The tw

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Peter Rabbitson
Thank you very much for confirming at least a part of my mental model ;) Followup questions inlined below: On 05/09/2016 10:29 AM, Paul B Mahol wrote: On 5/6/16, Peter Rabbitson wrote: ... == Questions - What is the "default" conversion matrix used within ffmpeg when nothing else is specif

Re: [FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-09 Thread Paul B Mahol
On 5/6/16, Peter Rabbitson wrote: > Hello! > > I am having trouble finding info on how to properly control color > reproduction, both in terms of "reference manual" and in terms of "best > practice guides". If I missed a resource neatly explaining everything I > am confused about below, please do

[FFmpeg-user] The internal ffmpeg rgb=>yuv pipeline and conversion matrices

2016-05-06 Thread Peter Rabbitson
Hello! I am having trouble finding info on how to properly control color reproduction, both in terms of "reference manual" and in terms of "best practice guides". If I missed a resource neatly explaining everything I am confused about below, please do not hesitate to "RTFM" me ;) == Backgrou