3 Replies Latest reply on Nov 4, 2009 10:52 PM by Jim_Simon

    Color space conversion YUV 4:2:0 - ??? - 4:2:2 - 4:2:0 ?


      Hello all,


      My "workflow" is:


      1. Import H264 L5 @ Main YUV 4:2:0 video from Canon 5Dmk2 (1080p)

      2. Finalize the sequence in Premiere (PRO CS4)

      3. Export the footage as "Uncompressed Microsoft AVI" V210 at 10bit YUV 4:2:2

      4. Feed to x264 H.264 encoder via Avisynt to convert / frameserve at YV12 (YUV 4:2:0) as required by
          the H264 (use Avisynth ConvertToYV12) to get the "raw" H.264 L4.1 @ High YUV 4:2:0 video stream

      (5. encode aac, mux with subtitles, and h264 video to mp4 container)


      Question is:


      a) While converting between the color spaces as above, what kind of quality loss I am experiencing?


      b) Any thoughts on how to do this smarter, or if I am outright ruining the footage before it gets to its MP4 container?


      c) Is there any way to export the video frrom Premiere (PRO CS4) as uncompressed YV12 (YUV 4:2:0)


      (and yes; I know I could use bundled MainConcept H.264 codec, but I like the control x264 gives, and _arguably_ it may produce better looking footage at the same framerate / settings)


      Looking forward to hearing some expert advice on the matter at hand!

        • 1. Re: Color space conversion YUV 4:2:0 - ??? - 4:2:2 - 4:2:0 ?
          Jim_Simon Level 8

          I wouldn't call myself an expert.  That title might go to Dan Isaacs.  But one item I took note of in your workflow is that the V210 codec is for use in conjunction with the AJA card.  Not having the card usually means the V210 files simply won't work.


          Do you have that card?  If not, have you tested this workflow, and does it actually work?


          Having said all that, there is another thread discussing the use of a new intermediary codec - UT v7.0.  This codec is lossless, and does have a YUV 4:2:0 mode, so your color space would not need changing at all.

          • 2. Re: Color space conversion YUV 4:2:0 - ??? - 4:2:2 - 4:2:0 ?
            midael75 Level 1

            Thanks Jim.


            I gave UT a shot. However I had it crashing few times in encoder. Then googled for alternatives and there seems to be a whole bunch of YV12 capable lossless codecs out there: Hyffuyv, Lagarith, MSU, Snow, and FFV1. I tested some of them, and Lagarith seems to do the trick for me (in Lagarith, setting "prevent upsampling" flag maybe worthwile). So I am now to: 4:2:0 - ??? - 4:2:0; that is:


            1. Import H264 YUV 4:2:0 video to premiere

            2. Work with the video in premiere and export using "Microsoft AVI - Lagarith lossless codec" to YV12 AVI (YUV 4:2:0)

            3. Use Avisynth to frame serve AVI to x264 (only line in avisynth script is AviSource ("inputYV12.avi") )


            I wonder what color space Premiere works internally to apply all the effects and everything..


            Again - Thanks for making me think alternatives here!!


            PS. for v210, I do not have card, but I can export in v210 from premiere. Then I can either use VirtualDubs build-in v210 codec (or YUYV had I exported to that) to convert back to something else. There is also a video for windows codec for v210 that I tried (google: drastic v210) you could use.

            • 3. Re: Color space conversion YUV 4:2:0 - ??? - 4:2:2 - 4:2:0 ?
              Jim_Simon Level 8

              It's my understanding that some of the effects will operate in the native YUV space of the media, but a great many of them will only operate in RGB, doing on the fly internal conversion.