View Single Post
Old 26th January 2021, 19:31   #9  |  Link
BlueSky00
Registered User
 
Join Date: Feb 2020
Posts: 5
Quote:
Originally Posted by benwaggoner View Post
You have -strict 1 listed twice in your command line. It works for me if it is following -pix_fmt. Try removing the first one.

As to why, the ineffable inner workings of ffmpeg are not for humankind to understand or question ;).

Also, there is no metadata in a .yuv frame, so you'll need to specify resolution, fps, chroma subsampling, pixel depth, etcetera in ffmpeg. That's why I do a single-step .yuv frames to .y4m file conversion, so I can examine the .y4m and confirm it works correctly before compression.

Also, not that scaling HDR in ffmpeg isn't optimal, because it presumes gamma, not PQ. You can wind up getting materially different output values in areas of high local contrast scaling in ffmpeg compared to doing a proper linear light scaling based on nit values.

Thanks for your response Ben!

Having two -strict -1 was my mistake when I was transferring my code here. I don't have 2 in my actual code. However, even with one, it does not work and I get the same error.

Code:
ffmpeg  -s 1920x1080  -pix_fmt yuv420p10le  -strict -1  -i all.yuv output.y4m
And here is the error:

'yuv420p10le' is not an official yuv4mpegpipe pixel format. Use '-strict -1' to encode to this pixel format.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
BlueSky00 is offline   Reply With Quote