• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

image

FFMPEG Resize

October 25, 2022

How to resize JPEG using FFMPEG.

ffmpeg -i TREE.JPG -y -vf scale=iw*.2:ih*.2 tree.jpg

ffmpeg -i TREE.JPG -y -vf scale=iw*.2:ih*.2 tree.jpg

Another option is to set resolution.

ffmpeg -i TREE.JPG -y -vf scale=-1:720 tree.jpg

ffmpeg -i TREE.JPG -y -vf scale=-1:720 tree.jpg

How to resize video using FFMPEG.

ffmpeg -i TREE.MP4 -s 640x360 -pix_fmt yuv420p -crf 18 tree.mp4

ffmpeg -i TREE.MP4 -s 640x360 -pix_fmt yuv420p -crf 18 tree.mp4

How to create a thumbnail from a video.

ffmpeg -ss 00:00:00 -i tree.mp4 -vframes 1 tree.jpg

ffmpeg -ss 00:00:00 -i tree.mp4 -vframes 1 tree.jpg

Filed Under: Linux Tagged With: create, ffmpeg, image, resize, thumbnail, video

Terraform GCloud VM Image Family

August 10, 2021

How to implement image family with Terraform in GCP.

Declare the machine image in terraform.tfvars.

image-family = "centos-7"

image-family = "centos-7"

Declare data type for the machine image in maint.tf.

data "google_compute_image" "my_image" {
  family  = var.image-family
  project = "your-project-id"
}

data "google_compute_image" "my_image" { family = var.image-family project = "your-project-id" }

In main.tf use “google_compute_instance” under boot disk section in main.tf.

boot_disk {
  initialize_params {
    image = data.google_compute_image.my_image.self_link
  }
}

boot_disk { initialize_params { image = data.google_compute_image.my_image.self_link } }

Filed Under: Cloud Tagged With: family, gcp, image, terraform

GCP Create Images

May 12, 2019

Here’s how to create a GCP Disk Image from a Boot Drive.

  • First, stop the instance.
  • If you can’t, stop the applications/database from writing to disks.
  • Run sudo sync .

Create From Disk

gcloud compute images create the-new-image-name \
   --source-disk the-source-boot-disk \
   --source-disk-zone us-central1-a \
   --family the-image-family \
   [--force]

gcloud compute images create the-new-image-name \ --source-disk the-source-boot-disk \ --source-disk-zone us-central1-a \ --family the-image-family \ [--force]

Create From Image

gcloud compute images create the-new-image-name \
  --source-image the-source-image \
  --source-image-project the-project-where-the-image-is-located \
  --family the-image-family

gcloud compute images create the-new-image-name \ --source-image the-source-image \ --source-image-project the-project-where-the-image-is-located \ --family the-image-family

Create From Snapshot

gcloud compute images create the-new-image-name \
  --source-snapshot the-source-snapshot

gcloud compute images create the-new-image-name \ --source-snapshot the-source-snapshot

For more info.

Filed Under: Cloud, Linux Tagged With: cli, disk, gcp, image, snapshot

Etcher

January 14, 2019

Etcher allows you to safely and easily burn images to SD and USB drives. It has a simple interface, and and exclusively available on the Mac OS platform. Burning an image has never been easy. Just select an image (ISO), select a drive, and flash the image.

Etcher interface


Filed Under: Mac Tagged With: burn, etcher, flash, image, iso, usb

  • Home
  • About
  • Archives

Copyright © 2023