Netizen Tercerahkan #1

Selama di dunia kebenaran dan ketidakbenaran bisa beda tipis. Kejahatan dan kebaikan sama2 memiliki pengikutnya karena punya alasannya sendiri2. Ikuti hati nurani lebih baik meskipun akan ada banyak yang memusuhi. --Yusup Iriyanto

One liner shell [script] of the day : #53 (audio track from one video, video track from another)

ffmpeg -i goodvideo.mp4 -i goodaudio.mp4 -map 0:v:0 -map 1:a:0 -c:v copy -c:a aac -strict experimental goodall.mp4

One liner shell [script] of the day : #52 (overlay separuh di video)

ffmpeg -i input.mp4 -loop 1 -i overlay_top.png -filter_complex "\ [0:v]trim=0:33,setpts=PTS-STARTPTS[v0]; \ [0:v]trim=33:1180,setpts=PTS-STARTPTS[v1]; \ [v0][1:v]overlay=0:0:shortest=1[ovl]; \ [ovl][v1]concat=n=2:v=1:a=0[outv]" -map "[outv]" -c:v libx264 -crf 18 -preset fast output.mp4

Dari detik 0 sampai 33, taruh overlay_top di separuh atas video, kemudian sisanya lempeng-lempeng saja. Ceritanya mau ngedit judul presentasi.

One liner shell [script] of the day : #51 (ngambil gambar asli dari PDF)

 #!/usr/bin/bash
 # usage ./pdfimages.sh output-dir pdf-file
mkdir -p "$1" && pdfimages -p -j "$2" "$1/tmp" && i=0; for img in "$1"/tmp-*; do [[ -f "$img" ]] || continue; p=$(basename "$img" | cut -d'-' -f2 | sed 's/^0*//'); printf -v pp "%03d" "$p"; printf -v nn "%03d" "$((i++))"; convert "$img" "$1/$pp-$nn.jpg"; done

machine learning

Machine learning tanpa pattern recognition itu quacky obfuscation.

 

mengko daklanjut neh... 

Apatah guna ini semua?

 

Follow, like, and star! https://github.com/jendralhxr/cursive-scribe/

[not quite one liner] shell of the day : #51 (folder album foto kronologis)

Ceritanya ada banyak foto jepretan berbagai kamera dari folder hasil recovery, sehingga tidak ada filename atau struktur direktori yang bisa menjelaskan. Biar lebih rapi dan praktis, kita taruh saja dalam direktori sesuai bulan foto tersebut terjepret (menurut EXIF).

 for file in `find . -iname *.jpg`; do
   Extract the date from EXIF metadata (DateTimeOriginal)
  exif_date=$(exiftool -DateTimeOriginal -d "%Y%m" "$file" 2>/dev/null | awk -F': ' '{print $2}')

  # Check if the file has an EXIF date
  if [[ -n "$exif_date" ]]; then
    # Create the directory if it doesn't exist
    target_dir="$exif_date"
    mkdir -p "$target_dir"

    # Move the file to the target directory
    mv -vf "$file" "$target_dir/"
  fi
done

Pastikan kamu punya exiftool.