View Single Post
Old 12th March 2019, 04:19   #7  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by lansing View Post
I think we have to do the same for vapoursynth? Because I did a test on my dvd video, I intentionally set the frame property matrix to rec709, the vs editor preview window showed the color changed. But when I encoded it into x264, it was still playing back as rec601 color. Or am I setting the matrix in the wrong place on the script?
Code:
clip = core.std.SetFrameProp(clip, prop="_Matrix", intval=5)

Quote:
Originally Posted by lansing View Post
I think we have to do the same for vapoursynth? Because I did a test on my dvd video, I intentionally set the frame property matrix to rec709, the vs editor preview window showed the color changed. But when I encoded it into x264, it was still playing back as rec601 color. Or am I setting the matrix in the wrong place on the script?
Code:
clip = core.std.SetFrameProp(clip, prop="_Matrix", intval=5)
Generally things within the vapoursynth environment will pay attention to the prop setting. It can affect how many filters work, and vsedit too

When you pipe data out, it's just YUV data , with Y4M header (or in the case of raw data, no header) , which do not convey color matrix info . The recieving application does not see the "prop" data or anything. Only things like fps, dimensions, pixel format are conveyed by Y4M

For x264 (and x265) those VUI flags you set such as --colormatrix do not change the actual YUV data, they are just flags or labels. Some players read the flags and adjust, some do not. But nothing is automatically set by the pipe or Y4M header in terms of matrix/transfer/primaries



So for SD to SD, you don't have to do anything, unless the source video had something set incorrectly (e.g. it was flagged incorrectly somewhere along the way), because that might affect some of the operations you do (filters) . If you're not filtering or anything, you don't have to do anything differently

For example, a fairly common issue might be a progressive SD video, but encoded with interlaced flag. A PAL DVD for example. Or some types of progressive consumer AVCHD videos (which are not native progressive, but encoded interlaced). If you resized it, it would be resized in an interlaced manner by most filters, instead of progressive if you didn't set the props or explicitly override the filter.

It's a good idea to display the clip props to help prevent mixups like that
poisondeathray is offline   Reply With Quote