HD to widescreen cinema, non-transparent
by AdamStanislav - uploaded on July 6, 2016, 3:29 am
Use this to convert a video shot with the HDTV 16:9 aspect ratio compromise to the more cinematic 64:27 (for some strange reason, also called 21:9) ratio. It has a non-transparent background.
This is one of the series of graphics I have created to allow masking of the contents of videos, so they appear to have a different aspect ratio. Some will make it appear more cinematic by adding a horizontal bar on the top and on the bottom of each video frame, creating the illusion of a wide screen image. Others will make it look more old-fashioned by adding a vertical bar at the left and right sides of each video frame, thus producing the illusion of classical cinema, which used the 1.33:1 ratio in the silent era and the academy ratio (1.375:1) once the sound film appeared. Additionally, before the big switch to digital TV, television used the 1.33:1 (4:3) ratio.
So, why use SVG vector graphics when similar masks are easy to find on the web in the PNG bitmap format? After all, video uses bitmap frames and most video editors cannot even read SVG files! The obvious answer is simple: Video files come in different formats. Take HD, for example, with its 16:9 ratio. There is the 720p standard, with 1280 pixels in each of its 720 rows. There is the 1080p standard, with 1920 pixels in each of its 1080 rows. Those were the original HD formats, both having the 16:9 ratio. Nowadays we have 4k UHDTV, with 3840 pixels in each of its 2160 rows; and 8k UHDTV with 7680 pixels in each of its 4320 rows. They, too, have the 16:9 ratio. And who knows what we will have in a few years!
Of course, you still can use the old PNG masks with any of these formats, you just have to tell your video editor to rescale the bitmap. Unfortunately, chances are the rescaling will produce a smooth transition between the transparent (or sometimes white) background and the black mask. But you can export an SVG graphic to a PNG (and others) bitmap at the exact size your current project requires, and you can use it to produce different sized bitmaps for different projects.
Then there is the less obvious reason: Creativity! Who says the bars have to be black? You can easily change their color, or even give each a different color. This is quite common in TV ads, by the way. But you can go beyond that. One of the strengths of the SVG format is its filters. So, instead of having just plain monotonous bars, you can make them look like pieces of wood or marble or whatever else your imagination offers. And that, to me, is the biggest reason to have these bars in the SVG format.
Because some video editors are quite sophisticated and others are quite simple, I am creating each of these as two separate files. One of them comes with a white background. After converting it to a bitmap, you just place it on the top video track (or layer, or whatever the software you use calls it) and set the track to “multiply”. That way, the black bars will remain black, and the white portion will be replaced with whatever was below it. You should only use this method if your software does not support the one I shall describe next. That is because this method does not allow you to change the color of the bars to anything other than black and does not allow you to use SVG filters. I mean, theoretically you still can, but if you do, the bars will be blended with whatever is behind them instead of covering it up.
The second separate file still sets the background to white, but it also sets its opacity to 0. In other words, the white background is now completely 100% transparent. Again, set it at the top track/layer. The black (or whatever you change them to) bars will cover everything below them completely, while the transparent center will show anything below it.
So, to sum it all up, export the right file into PNG at the exact size you need, e.g., 1280x720 for a 720p project, 1920x1080 for a 1080p project, etc. Place the resultant bitmap on the top track/layer in your video editing software. Optionally, if you are using the non-transparent version, set the top track/layer to multiply. In some cases you may have to instruct your video editor to use the transparency correctly (Vegas Pro requires this sometimes, though not always, but it works once you tell it). Everything else should happen automatically.
By the way, when exporting to PNG, your software may just do it using whatever defaults its programmer decided on or it may offer you some options (and they may vary from software to software). If it does give you a choice, try selecting something like this: No dithering, no sophisticated resampling (just pick nearest, or nearest neighbor, if available), and pick 1 bit encoding (it can make the PNG file up to 32 times smaller). You definitely do not want Lanczos resampling, even though it is usually the best choice for most other things. That is because it would produce a fuzzy transition between the masked and the unmasked portions of the image, while for this particular purpose a sharp transition is generally what we want here.