7 Replies Latest reply: Apr 15, 2011 11:19 AM by Colin Brougham RSS

    Black 1px Lines in Rendered .FLV

    thanser Community Member

      I don't see any reference to this (yet) in this forum but I hope

       

      It doesn't matter if I use AME or render out an .flv from After Effects, I still get a black 1px line top and bottom:

       

      http://www.24hourhotline.net/motion.html

       

      The video file itself is 600 x 338.  With the JWPlayer my code is:

       

      swfobject.embedSWF('player.swf','container1','600','364','9.0.115','false',

       

      It doesn't matter if I use JWPlayer or a Dreamweaver-based video player (skin) I still get a 1px top and bottom.  It doesn't matter how you code this, pixel dimension wise, I always end up with a 1px black line, top and bottom.

       

      As you can see, I'm trying to match the video background with the web page background.  Is this even possible?

       

      One way out of this is to build in a 1px stroke in a different color in After Effects, I suppose.  But I'd like to know if there's any way of fixing this first!

       

      Thanks.

        • 1. Re: Black 1px Lines in Rendered .FLV
          Colin Brougham Community Member

          Couple things:

           

          With FLVs (VP6), stick with dimensions that are multiples of 16; neither 600 nor 338 are. Some alternatives are 592, 608, 336, and 352; mix and match to your liking.

           

          To get to those "mod16" dimensions, you may need to a crop a bit in AME; to get rid of black lines on the top and bottom, crop the sides, and for lines on the sides, crop the top and bottom. Just toggle back and forth between the source and output tabs until the lines disappear. Be sure to set up your dimensions first.

          • 2. Re: Black 1px Lines in Rendered .FLV
            thanser Community Member

            Fixed it!  Thanks, Colin.

             

            You learn something new every day.

            • 3. Re: Black 1px Lines in Rendered .FLV
              Colin Brougham Community Member

              Cool, looks good

               

              Here's a useful table of good dimensions to use for FLVs: Optimal frame dimensions for Flash video | Adobe Developer Connection

               

              I try to stick to this rule with H.264, as well, though it's more flexible than VP6.

              • 4. Re: Black 1px Lines in Rendered .FLV
                thanser Community Member

                Thank you again, Colin.  This page is very helpful.

                 

                Rendering an .flv seems to be hit or miss in terms of cropping off the black lines that appear around the video frame - I'm making the second video over and over again, trying to remove this black outline:

                 

                http://www.24hourhotline.net/video.html

                 

                I can't see the black outline that results in the Output window in Adobe Media Encoder, although I can see the crop indication. 

                 

                I guess I can expect to crop off a bit every time I render? 

                 

                Why does this happen?  Any idea?

                 

                Thanks again.

                • 5. Re: Black 1px Lines in Rendered .FLV
                  Colin Brougham Community Member
                  I guess I can expect to crop off a bit every time I render? 

                   

                  Why does this happen?  Any idea?

                   

                  Yes, crop every time. I'd just set up a preset that uses the crop values you find that work with your source dimensions and your output dimensions. It might take a bit of experiementation, but doing the math will help.

                   

                  I downloaded your FLV, and checked out it's specs. Using MediaInfo, I can see you encoded to 664x374... this is a problem The problem is that a VP6 encoder will pad that out to the nearest mod16 dimensions; in this case, that's 672x384. When that happens, you get black lines.

                   

                  Here's the math:

                   

                  664 / 16 = 41.500 = BAD!

                  374 / 16 = 23.375 = BAD!

                  672 / 16 = 42 = GOOD!

                  384 /16 = 24 = GOOD!

                   

                  So, the VP6 encoder preserves the actual pixels from the video as you prescribe, but then pads it out with black for encoding efficiency.

                   

                  What might be happening is that you have the aspect ratio lock turned on when you set the dimensions; that's the little chain link between the height and width values. Deselect that, and then set your mod16 dimensions (either ones we've discussed or from that chart I linked). You should see black lines; that's fine, because you can now enable cropping in the Source tab and tweak the values to get what you need. You'll only have to crop the top and bottom OR the sides--not both. As mentioned earlier, lines on the top and bottom need a side crop, whereas lines on the sides need a top/bottom crop. Once you get all those values tweaked, you should be good to go--save a preset so you don't have to do it again

                   

                  What are the dimensions of your source? Is it the same for each of these videos? I can help you dial in the proper values if you can tell me that.

                  • 6. Re: Black 1px Lines in Rendered .FLV
                    thanser Community Member

                    Hi, Colin:

                     

                    Again, thank you so much.  I'm learning to work with AME beyond my initial understandin of it, and rendering clips that fit for given web page.  (Then there's the issue of determining the JWPlayer embed code pixel dimensions, but that's another story!)

                     

                    For the "video" sample piece, my source file is 1920x1080 QT, rendered from FCP.

                     

                    I prefer the rendered .FLV to be appoximately the size it is currently, plus or minus a few pixels. 

                     

                    Yes, I have to nail down a repeatable work flow, indeed. 

                     

                    Thanks again!

                    • 7. Re: Black 1px Lines in Rendered .FLV
                      Colin Brougham Community Member

                      OK, try this:

                       

                      Tick the "Resize Video" box (if it wasn't already), disable the Aspect Ratio lock (that chain link thing), then set the Width as 672 and the Height as 384. In the Preview, you should see some pretty thick lines on top and bottom--good.

                       

                      Go to the Source tab, and turn on cropping. Crop 14 pixels off BOTH the left and the right sides, but leave top and bottom as 0 pixels. Make sure Crop Proportions is set to "None." When you toggle back to the Output tab, you should have video completely filling the frame. Set up your other parameters--bit rate, frame rate, audio, etc.--and then save that puppy as a preset That should work for any 1920x1080 clip that you export to that size.

                       

                      If you want the video to be a little larger or smaller in one dimension or the other, just move in increments of 16 pixels--no more, no less. Then, use the general cropping guidelines I gave before to snip away at the source until the output fully fills the frame. Before long, you'll be a Flash Video Encoding Pro

                       

                      Let me know how that works for you...

                       

                      EDIT: As an example, if you wanted to go to the next multiple of 16 smaller, you'd use 656x368--but you'd crop 2 pixels off the top and bottom and 0 off the sides! So, as you can see, it'll involve a little bit of tweaking depending on your desired output size.