Question for FFmpeg-user list
Hello, I am a newbie to FFmpeg, but in viewing the documentation, I am unable to learn the command to do the following. I have a video board that is outputting YCrCb 4:2:2 (the manufacturer says the order is CrYCbY………). I wish to write this video output to a in a raw 4:2:2 format exactly as it comes off of the board, no header, no padding, no changes at all. If someone can please advise me as to the proper command in FFmpeg to accomplish this, it would be much appreciated. Thank you (in advance. --Seth -- This email contains information belonging to Motional AD LLC or its affiliates and may contain confidential, proprietary, copyrighted and/or privileged information. Any unauthorized review, use, reliance, disclosure, distribution or copying is prohibited. If you are not the intended recipient, immediately destroy all copies of the original email and any attachments and contact the sender by reply email.
Hi Seth, You can show the list of pixel formats supported by ffmpeg with the command "ffmpeg -pix_fmts". Unfortunately I don't think CrYCbY (which is practically equivalent to VYUY) is among them. What I would suggest is to treat the format as if it were UYVY 4:2:2 ( -pixel_format uyvy422 ) and then use the "swapuv" filter. You will then be able to use your captured video within ffmpeg and the colours will be correct, and you can save it as UYVY 4:2:2. If you REALLY want to deal with the captured video without any changes whatsoever, you can still read in / save it as VYUY with the UYVY format container, but don't try and view it without swaping U and V. I hope that helps. Best, James. On 31/07/2022 22:26, Seth Ansell wrote:
Hello,
I am a newbie to FFmpeg, but in viewing the documentation, I am unable to learn the command to do the following. I have a video board that is outputting YCrCb 4:2:2 (the manufacturer says the order is CrYCbY………).
I wish to write this video output to a in a raw 4:2:2 format exactly as it comes off of the board, no header, no padding, no changes at all.
If someone can please advise me as to the proper command in FFmpeg to accomplish this, it would be much appreciated.
Thank you (in advance.
--Seth
Thank you James. I will try that out and let you know how it works. Cheers, --Seth -----Original Message----- From: ffmpeg-user <ffmpeg-user-bounces@ffmpeg.org> On Behalf Of James Insell Sent: Sunday, July 31, 2022 6:26 PM To: ffmpeg-user@ffmpeg.org Subject: Re: [FFmpeg-user] Question for FFmpeg-user list Hi Seth, You can show the list of pixel formats supported by ffmpeg with the command "ffmpeg -pix_fmts". Unfortunately I don't think CrYCbY (which is practically equivalent to VYUY) is among them. What I would suggest is to treat the format as if it were UYVY 4:2:2 ( -pixel_format uyvy422 ) and then use the "swapuv" filter. You will then be able to use your captured video within ffmpeg and the colours will be correct, and you can save it as UYVY 4:2:2. If you REALLY want to deal with the captured video without any changes whatsoever, you can still read in / save it as VYUY with the UYVY format container, but don't try and view it without swaping U and V. I hope that helps. Best, James. On 31/07/2022 22:26, Seth Ansell wrote:
Hello,
I am a newbie to FFmpeg, but in viewing the documentation, I am unable to learn the command to do the following. I have a video board that is outputting YCrCb 4:2:2 (the manufacturer says the order is CrYCbY………).
I wish to write this video output to a in a raw 4:2:2 format exactly as it comes off of the board, no header, no padding, no changes at all.
If someone can please advise me as to the proper command in FFmpeg to accomplish this, it would be much appreciated.
Thank you (in advance.
--Seth
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://urldefense.com/v3/__https://ffmpeg.org/mailman/listinfo/ffmpeg-user_... To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe". ---------------------------------------------------------------------- This email originated OUTSIDE the organization. Do not click any links or attachments unless you know the sender. -- This email contains information belonging to Motional AD LLC or its affiliates and may contain confidential, proprietary, copyrighted and/or privileged information. Any unauthorized review, use, reliance, disclosure, distribution or copying is prohibited. If you are not the intended recipient, immediately destroy all copies of the original email and any attachments and contact the sender by reply email.
On Sun, Jul 31, 2022 at 10:38 PM Seth Ansell <seth.ansell@motional.com> wrote:
Thank you James.
I will try that out and let you know how it works.
Bear in mind there's a real possibility the manufacturer is simply wrong. Most of the chipsets out there which deliver ITU 601 data will do UYVY, not VYUY. It's entirely possible the vendor's intent was to make clear that the chroma comes before luma (i.e. UYVY as opposed to YUYV), and their explanation was incorrect in suggesting the V came first. It's trivial to tell just by looking at some video. If the video is green/purple then the luma and chroma are reversed (i.e. YUYV treated as YUVY). If you look at the video and people's skin is blue, then that means the two chroma channels are reversed. Devin -- Devin Heitmueller, Senior Software Engineer LTN Global Communications o: +1 (301) 363-1001 w: https://ltnglobal.com e: devin.heitmueller@ltnglobal.com
Thank you for the info. Your advice is helpful. -----Original Message----- From: ffmpeg-user <ffmpeg-user-bounces@ffmpeg.org> On Behalf Of Devin Heitmueller Sent: Monday, August 1, 2022 4:47 PM To: FFmpeg user questions <ffmpeg-user@ffmpeg.org> Subject: Re: [FFmpeg-user] Question for FFmpeg-user list On Sun, Jul 31, 2022 at 10:38 PM Seth Ansell <seth.ansell@motional.com> wrote:
Thank you James.
I will try that out and let you know how it works.
Bear in mind there's a real possibility the manufacturer is simply wrong. Most of the chipsets out there which deliver ITU 601 data will do UYVY, not VYUY. It's entirely possible the vendor's intent was to make clear that the chroma comes before luma (i.e. UYVY as opposed to YUYV), and their explanation was incorrect in suggesting the V came first. It's trivial to tell just by looking at some video. If the video is green/purple then the luma and chroma are reversed (i.e. YUYV treated as YUVY). If you look at the video and people's skin is blue, then that means the two chroma channels are reversed. Devin -- Devin Heitmueller, Senior Software Engineer LTN Global Communications o: +1 (301) 363-1001 w: https://urldefense.com/v3/__https://ltnglobal.com__;!!OUh6yQBS5Rss!6oA3AsT GDkZDlITkM06VRkJ8NUFsWBToF1Tfgkoiy3OCQazO_j4Qk1cBvFjXdyoS2aA0ZufMC8gt1K7nF QKXu07wnr0ukqhX$ e: devin.heitmueller@ltnglobal.com _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://urldefense.com/v3/__https://ffmpeg.org/mailman/listinfo/ffmpeg-use r__;!!OUh6yQBS5Rss!6oA3AsTGDkZDlITkM06VRkJ8NUFsWBToF1Tfgkoiy3OCQazO_j4Qk1c BvFjXdyoS2aA0ZufMC8gt1K7nFQKXu07wnibvsUVP$ To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe". ---------------------------------------------------------------------- This email originated OUTSIDE the organization. Do not click any links or attachments unless you know the sender. -- This email contains information belonging to Motional AD LLC or its affiliates and may contain confidential, proprietary, copyrighted and/or privileged information. Any unauthorized review, use, reliance, disclosure, distribution or copying is prohibited. If you are not the intended recipient, immediately destroy all copies of the original email and any attachments and contact the sender by reply email.
participants (3)
-
Devin Heitmueller -
James Insell -
Seth Ansell