Monday 23 April 2018

FFmpeg Commands


How to show video in middle and add padding around?

Original video dimension 720x402

 ffplay -vf "scale=640:240,pad=1280:480:(ow-iw)/2:(oh-ih)/2:color=red" Example2.mp4   

640x240 is (to be scaled) video width x height
1280x480 is padding

1280 = (1280-640)=640 padding we are adding in width, (ow-iw)/2 is a position, its mean, its in center.
same for 480,
480=(480-240)=240 padding we are adding in height, (oh-ih)/2 is a position, its mean, its in center

color=red is a background color, it can be in RRGGBB format e.g 0xff0000

Things after Kotlin Android Extensions

Things after Kotlin Android Extensions(KTX) I remembered in MVVM when I have to declare ViewModel, I initialize View Model like this. p...