User Tools

Site Tools


doc:appunti:linux:video:fix_smartphone_portrait_videos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:linux:video:fix_smartphone_portrait_videos [2018/04/07 15:37] – [The Compromise Solution] niccolodoc:appunti:linux:video:fix_smartphone_portrait_videos [2018/04/07 15:47] (current) – [The Gradient Overlay Mask] niccolo
Line 36: Line 36:
 ===== The Gradient Overlay Mask ===== ===== The Gradient Overlay Mask =====
  
-When the cropped image is placed above the background, it is quite annoying to see the **sharp edge** of the image. A better approach is to gradually fade the image at the right and at left edges. This requires to blend the image and the background using a **gradient mask**. We prepared the mask as a PNG image, using **convert** by the ImageMagick suite.+When the cropped image is placed above the background, it is quite annoying to see the **sharp edge** of the image. A better approach is to gradually fade the image at the right and at left edges. This requires to blend the image and the background using a **gradient mask**. We prepared the mask as a **{{gradient_overlay_mask.png?linkonly|PNG image}}**, using **convert** from the ImageMagick suite.
  
 <code> <code>
Line 47: Line 47:
 </code> </code>
  
-{{gradient_overlay_mask.png?direct&150|Overlay Mask With Gradient}} +**NOTICE**: It seems that [[https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=33804|there is a bug]] in ImageMagick **gradient:bounding-box**, so we had to generate the mask in top-down mode and rotate it 90 degrees afterward.
 ===== The ffmpeg Recipe ===== ===== The ffmpeg Recipe =====
  
Line 74: Line 73:
 ===== The Python Script ===== ===== The Python Script =====
  
-The Python script **smartphonevideo_2landscape** will make the calculation to prepare the whole incantation: it will print on the standard output a **shell script** with the proper invokation of **convert** and **ffmpeg**. Use it in this way:+The Python script **{{smartphonevideo_2landscape.txt|smartphonevideo_2landscape}}** will make the calculation to prepare the whole incantation: it will print on the standard output a **shell script** with the proper invokation of **convert** and **ffmpeg**. Use it in this way:
  
 <code> <code>
doc/appunti/linux/video/fix_smartphone_portrait_videos.1523108235.txt.gz · Last modified: 2018/04/07 15:37 by niccolo