19 Replies Latest reply on Aug 27, 2012 9:26 AM by Zac Lam

    Any way to force consistent bpc in an import plugin?

    JohnHable

      Hey.  Does anyone know if it's possible to force premiere to render with a consistent bpc?  I'm working on an import plugin that can generate 8bpc, 16bpc, and 32bpc data.  The problem I'm having is that it looks like the preview duringi "Playback" is 8bpc and during "Paused" it's 32bpc.  Which is a problem because 8bpc isn't any faster than 32bpc, but looks bad and causes it to render twice.

       

      So for my import plugin, I don't care if the the user wants 32bpc or 8bpc, but it's important that they get the same bpc consistently so it doesn't flicker.  Is there any way to do that?  Thanks!

        • 1. Re: Any way to force consistent bpc in an import plugin?
          SteveHoeg Adobe Employee

          It 8-bit isn't any faster, why not only support 32-bit?

          • 2. Re: Any way to force consistent bpc in an import plugin?
            JohnHable Level 1

            Depending on the data inside the file, I'd want to either return either 8 bit or 32 bit data, and as I understand it I have to tell premiere that information when it calls imGetIndPixelFormat.  I don't actually care about the performance issue.  What bothers me is the flickering.  I was hoping that the "Maximum bit depth" flag would actually force premiere to always use 32bpc.  Any way to do that?

            • 3. Re: Any way to force consistent bpc in an import plugin?
              JohnHable Level 1

              Btw, this seems to be more of an issue with premiere previews than with how the importer is called.  In my case, I've got an HDR image returned from the importer, and then an effect applied which lowers the exposure.  Essentially, it looks like the preview is always in 8 bits in "playback mode" regardless of settings.  My highlights are always clipped while scrubbing, and when I click to show a new frame I get a little flicker as it starts with the 32 version (from the previous paused frame), shows an 8 bit version for a split second (playback of new frame) and then goes back to the 32-bit version (paused new frame).

              • 4. Re: Any way to force consistent bpc in an import plugin?
                SteveHoeg Adobe Employee

                You can return a pixel format depending on the data in the file. For 8-bit files support only 8-bit, for 32-bit files support only 32-bit. If you advertise both there is no way to force which will be requested.

                • 5. Re: Any way to force consistent bpc in an import plugin?
                  genefama Level 1

                  I'm reviving this thread because I have a similar problem.  I use no Premiere Pro effects. All my effects are applied in After Effects and all my clips are linked After Effects comps.

                   

                  If there are 8-bit effects in the After Effects comps will this force the entire Premiere timeline to reduce to the 8-bit?  In After Efects I applied the HDR Compander to all the lower bit-depth effects i could find and many comps have no 8-bit effects, but the timeline plays in 8-bit in Premiere and only shows 32-bit when I pause the playhead.

                   

                  A second, more simple question: where is the indication of the project setting (32-bit, 8-bit, etc.) in PP CS6?  Is there somewhere in the menu system where you can set the bit depth of a project or sequence, or at least see what it is?

                   

                  Any advice is much appreciated.

                  • 6. Re: Any way to force consistent bpc in an import plugin?
                    JohnHable Level 1

                    The setting that you are looking for is "force maximum bit depth".  It's in the sequence settings.

                     

                    You're seeing what I'm seeing, and yes, there doesn't seem to be anything you can do.  You would think that "force maximum bit depth" would actually force premiere to use the maximum bit depth.  That's not the case.  Premiere never seems to want to use 32bpc rendering during playback.  My suspicion is that during playback it's only rendering the cached data and all of its caching formats are only 8-bit (such as "I-Frame Only MPEG").  Since Premiere doesn't seem to cache data with full dynamic range, all our previews are 8-bit.

                     

                    There are preview formats the the premiere team could use that are HDR.  For example, they could convert the HDR data into 8-bit log and compress that as I-Frame only mpeg.  It wouldn't be ideal, but it would be much better than just clipping at 1.0.  I would love for someone to prove me wrong, but it seems like we have to accept that HDR data will always look completely broken when playing back in premiere.  *sad face*

                    • 7. Re: Any way to force consistent bpc in an import plugin?
                      Zac Lam Adobe Employee

                      @genefama: The pixel format chosen in the render pipeline has much more finer granularity than being timeline-wide.  In fact, it's even more finer-grained than frame-wide.  As an example, an importer used for a clip might only support 8-bit RGB, and an effect applied to that clip can might only support 32-bit YUV, and the PPro render pipeline will handle the conversion so that the source frame is converted to 32-bit YUV before applying the effect.  So for your question, an AE comp with 8-bit effects won't force the rendered frame to 8-bit.

                       

                      @JohnHable: PPro can render at 32 bpc during scrubbing and exporting to a file, whether generating render files to preview a portion of the sequence, or exporting out to a file.  So you could potentially get 32 bpc frames on playback if you rendered the timeline first.  But if the preview format in the sequence settings are an 8-bit format, and a user renders preview files to render temp files for an extremely render-intensive portion of a sequence, then the preview files will be in that 8-bit format.  Many of the built-in preview formats (I-Frame only MPEG) are 8-bit formats, but potentially any format supported by PPro could be a preview format, including formats that support HDR.  You can get some preview formats higher than 8 bpc if you create a sequence with a Custom editing mode, which will give you other options for the Preview File Format including any HDR codecs that PPro knows about (VfW codecs on Win, or QuickTime codecs on Mac OS).  I believe Cineform may provide some additional preview format options.  ProEXR also offers HDR support, although I don't think the development team has specifically added it as a preview format option for PPro.

                      1 person found this helpful
                      • 8. Re: Any way to force consistent bpc in an import plugin?
                        genefama Level 1

                        Thanks John and Zac.  Zac, I think the last sentence @ me answered my question about rendering.  I hoped this was how it worked.  Regarding your note to John,  is there any way to convert the timeline to a 32-bit preview format after the fact or would it require rebuilding the timeline in a new sequence with a 32-bit preview format?  In any case, it sounds like the 8-bit previews won't export as 8-bit whe the file is sent to deliverable, correct?

                        • 9. Re: Any way to force consistent bpc in an import plugin?
                          Zac Lam Adobe Employee

                          If your current editing mode allows it, you could go into the Sequence Settings and change the preview format.  But if you need to change editing modes to get the preview format you're looking for, you could create the new sequence, and copy the contents of the original sequence into the new one.

                           

                          Correct, the 8-bit previews won't be used if you're exporting to a higher quality format.

                          1 person found this helpful
                          • 10. Re: Any way to force consistent bpc in an import plugin?
                            genefama Level 1

                            Thanks Zac, you've been super helpful. I'm on a Mac system. Can you recommend an exact setting for the preview formay that would work well?  Thanks again,  Gene.

                            • 11. Re: Any way to force consistent bpc in an import plugin?
                              Zac Lam Adobe Employee

                              Gene, I'm not quite sure which format you're looking for, whether it's higher bit depth, or HDR?  On MacOS, you could use the Desktop editing mode, set the Preview File Format to QuickTime, and use any higher-bit-depth QT codec installed on your machine.  PPro comes with Uncompressed YUV 10-bit 4:2:2.  Cineform also has a QT codec for higher bit depth.

                              • 12. Re: Any way to force consistent bpc in an import plugin?
                                JohnHable Level 1

                                Hi Zac, thanks for the info!  The QT codecs I don't think would work because they clip at 1.0, even if they have a higher bit depth.  My thought was that there was no way to add codecs to the drop down menu (for preview format) so I'm glad that I'm wrong.  If someone were to hypothetically create a new output format, is there anything special you would have to do to make it an option as a preview format?

                                • 13. Re: Any way to force consistent bpc in an import plugin?
                                  Zac Lam Adobe Employee

                                  Yes, since you were asking specifically about HDR, those codecs I mentioned, while higher bit-depth, don't provide HDR.  As a developer, if you're building a set of exporter and importer plug-ins, then yes you'd need to create and install an XML file in the right location for each Editing Mode for which you want to make your format available as a Sequence Preview Format option.  This is touched on in the CS6 release 2 SDK Guide on page 184 under the topic "Adding new Preview File Formats to Existing Editing Modes".

                                  • 14. Re: Any way to force consistent bpc in an import plugin?
                                    JohnHable Level 1

                                    Thanks Zac.  Just took a more thorough look at the SDK and think it makes sense.  Thx for your help.

                                    • 15. Re: Any way to force consistent bpc in an import plugin?
                                      genefama Level 1

                                      Thanks Zac, I was just looking for higher bit depth.  No HDR. I guess I'm not sure which Quicktime format would work. I own Final Cut 7 and Compressor so I might have some codecs that shipped with those. Or maybe I'll try the YUV 10-bit you mention.

                                       

                                      I hesitate to preview everything with massive render times because my clips are all linked After Effects comps.  Since the CS6 update my media has become de-linked fairly regularly and needs frequent re-rendering (Dynamic Link loses track of my render files). 

                                       

                                      Not to get too far afield here, but if I were to generate uncompressed YUV files from the After Effects comps using Adobe Media Encoder, could I then drop these into my Premiere timeline in place of the linked comps and later export the timeline with an H.264 preset and not experience image degradation versus exporting the timeline built from the linked comps?  Sorry if this is a dumb question.

                                      • 16. Re: Any way to force consistent bpc in an import plugin?
                                        Zac Lam Adobe Employee

                                        Hey Gene, that's right, if you don't mind exporting to an intermediate file and losing the Dynamic Link.

                                        • 17. Re: Any way to force consistent bpc in an import plugin?
                                          genefama Level 1

                                          Yeah, I'd rather use intermediate files at this point, honestly. Except I'm not sure I'd call them intermediate if I'm using them as final media to later compress and export to deliverable content. By then they'll have become primary resources.  :-)

                                           

                                          As long as there's no "law of degenerative reproduction" (as they cal it on "Star Trek") I'll be perfectly happy to use this workflow.

                                           

                                          Thanks again for your excellent help in all this.  I really appreciate it.

                                          • 18. Re: Any way to force consistent bpc in an import plugin?
                                            fnordware Level 3

                                            Zac Lam wrote:

                                             

                                            Yes, since you were asking specifically about HDR, those codecs I mentioned, while higher bit-depth, don't provide HDR.  As a developer, if you're building a set of exporter and importer plug-ins, then yes you'd need to create and install an XML file in the right location for each Editing Mode for which you want to make your format available as a Sequence Preview Format option.  This is touched on in the CS6 release 2 SDK Guide on page 184 under the topic "Adding new Preview File Formats to Existing Editing Modes".

                                             

                                            Would this actually be possible—making an HDR-friendly editing mode? As far as I know, editing modes have to be based on movie formats, but I've never heard of a movie format that did HDR. Only sequences.

                                             

                                            Brendan

                                            • 19. Re: Any way to force consistent bpc in an import plugin?
                                              Zac Lam Adobe Employee

                                              Yes, anything that can be produced through an export can be used as a preview format, provided the preview format actually supports the frame size / field type / pixel aspect ratio / etc.  That part of the SDK Guide explains how to create the presets that are needed to make new preview formats appears as options in the PPro UI.