Skip to content

freeform journal

Posted on:March 12, 2024 at 03:57 PM

2024-04-16 (projectcontour + GKE)

Https://Add.dog went down. To Fix:

  1. Updated GKE control plane
  2. Copied https://github.com/projectcontour/contour/tree/main/examples/contour into my_kubernetes
  3. Applied with kubectl
  4. Strange, stern contour -n project contour still showed an annotation error. But site works now.

2024-04-10 (raspberry)

Scan LAN for connected devices : sudo arp-scan --localnet

Starting to think that BUSTER is the right raspiOS for these 2015-2017 Raspberry pis.

Something is terribly wrong with COMPOSITE out on all my Raspberry Pi 3s

Happy PI Zero 😀 BUSTER

pi@raspberrypiz245:~ $ hostnamectl
   Static hostname: raspberrypiz245
         Icon name: computer
        Machine ID: e5d1158e915e421db43d4c530a21e158
           Boot ID: 80db9a59577c4ea08867e260c42c875f
  Operating System: Raspbian GNU/Linux 10 (buster)
            Kernel: Linux 5.10.103+
      Architecture: arm

VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2) is a working version ✅

Could VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b) be bad for Buster on RPi Zero?

Open question remains

  1. Verify there is indeed something wrong with VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b) on Zero Buster
  2. How to install 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2 specifically. vlc=3.0.17.4-0+deb10u2+rpt1 didn’t work. From source?

2024-03-30

https://wiki.videolan.org/VLC_command-line_help/

Solution: /boot/firmware/config.txt is used vs /book/config/config.txt

These don’t seem needed

export DISPLAY=:0
cvlc --x11-display :0

This command works on Bookworm

cvlc --no-audio -L -R --no-video-title-show --crop=4:3 "$(yt-dlp -g -f 18 https://www.youtube.com/watch?v=zg_fAUsNVJ4)"

Useful working config


[all]

sdtv_mode=0
sdtv_aspect=1
hdmi_ignore_hotplug=1
dtoverlay=vc4-kms-v3d,composite
enable_tvout=1


# adjust resolution
#framebuffer_height=440
#framebuffer_width=550

# Adjust display boundaries
#overscan_left=50
#overscan_right=40
#overscan_top=25
#overscan_bottom=25

2024-03-19

Doing some Youtube archiving with this tool. Turns out ONLY CHROME works with the redirect.

I’m using the hack-repo to manage the metaJSON files when uploading concat’d archive footage from camera : ffmpeg -f concat -safe 0 -I list.txt -c:v copy -c:a copy -y <filename>

// list.txt
file 00000.MTS
file 00001.MTS
file 00002.MTS

Then the upload command youtubeuploader -filename my_video.mts -secrets ../youtube-upload/client_secrets.json --privacy unlisted Must copy the browser URL into Chrome!

Of course all the setup instructions on the youtubeuploader project must be followed!

This is all going to stephletteandsamlette

2024-03-16

Could AI power a headless browser? Could a prompt become automated browser commands?

Idea would be to use AI agent to explore a website looking for items-of-interest, saving the consumer the need to check a website, & save the programmer coding the automated paths that will become outdated when the website gets a redesign.

2024-03-12

youtube closed captions -> SRT with AI.

Rare Olivier Messiaen - The Crystal Liturgy found on Archive.org has no subtitles to share with non French speakers.

I uploaded this to youtube private to generate closed captions. Copied the file from the Network monitor, but its in a youtue format. This needs to be converted, but no converter exists. AI to rescue.

Canceled OpenAI in favor of Claude after it did a crazy cool job converting a youtube closed caption file into an SRT.

No official way exists to do this.

Chat GPT v4 stumbled through this, but after 3 prompts to fix the SRT from:

Claude succeeded in making a valid SRT that i added with ffmpeg -i input_video.mp4 -i captions.srt -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=eng output_video.mp4

Files: youtube closed caption file shortened after inspecting Network tab

{
  "wireMagic": "pb3",
  "pens": [
    {}
  ],
  "wsWinStyles": [
    {},
    {
      "mhModeHint": 2,
      "juJustifCode": 0,
      "sdScrollDir": 3
    }
  ],
  "wpWinPositions": [
    {},
    {
      "apPoint": 6,
      "ahHorPos": 20,
      "avVerPos": 100,
      "rcRows": 2,
      "ccCols": 40
    }
  ],
  "events": [
    {
      "tStartMs": 0,
      "dDurationMs": 3442720,
      "id": 1,
      "wpWinPosId": 1,
      "wsWinStyleId": 1
    },
    {
      "tStartMs": 1110,
      "dDurationMs": 3459,
      "wWinId": 1,
      "segs": [
        {
          "utf8": "[Music]"
        }
      ]
    },
    {
      "tStartMs": 7710,
      "wWinId": 1,
      "aAppend": 1,
      "segs": [
        {
          "utf8": "\n"
        }
      ]
    },
    {
      "tStartMs": 7720,
      "dDurationMs": 29640,
      "wWinId": 1,
      "segs": [
        {
          "utf8": "[Music]"
        }
      ]
    },
    {
      "tStartMs": 34030,
      "dDurationMs": 3330,
      "wWinId": 1,
      "aAppend": 1,
      "segs": [
        {
          "utf8": "\n"
        }
      ]
    },
    {
      "tStartMs": 34040,
      "dDurationMs": 5600,
      "wWinId": 1,
      "segs": [
        {
          "utf8": "I ",
          "acAsrConf": 0
        },
        {
          "utf8": "am ",
          "tOffsetMs": 365,
          "acAsrConf": 0
        },
        {
          "utf8": "a ",
          "tOffsetMs": 730,
          "acAsrConf": 0
        },
        {
          "utf8": "musician ",
          "tOffsetMs": 1095,
          "acAsrConf": 0
        },
        {
          "utf8": "first ",
          "tOffsetMs": 1460,
          "acAsrConf": 0
        },
        {
          "utf8": "of ",
          "tOffsetMs": 1825,
          "acAsrConf": 0
        },
        {
          "utf8": "course ",
          "tOffsetMs": 2190,
          "acAsrConf": 0
        },
        {
          "utf8": "a",
          "tOffsetMs": 2555,
          "acAsrConf": 0
        }
      ]
    },
    {
      "tStartMs": 37350,
      "dDurationMs": 2290,
      "wWinId": 1,
      "aAppend": 1,
      "segs": [
        {
          "utf8": "\n"
        }
      ]
    },
    {
      "tStartMs": 37360,
      "dDurationMs": 5440,
      "wWinId": 1,
      "segs": [
        {
          "utf8": "music ",
          "acAsrConf": 0
        },
        {
          "utf8": "composer, ",
          "tOffsetMs": 706,
          "acAsrConf": 0
        },
        {
          "utf8": "professor ",
          "tOffsetMs": 1412,
          "acAsrConf": 0
        },
        {
          "utf8": "of",
          "tOffsetMs": 2118,
          "acAsrConf": 0
        }
      ]
    },
    {
      "tStartMs": 39630,
      "dDurationMs": 3170,
      "wWinId": 1,
      "aAppend": 1,
      "segs": [
        {
          "utf8": "\n"
        }
      ]
    },
    {
      "tStartMs": 39640,
      "dDurationMs": 4800,
      "wWinId": 1,
      "segs": [
        {
          "utf8": "composition ",
          "acAsrConf": 0
        },
        {
          "utf8": "organist ",
          "tOffsetMs": 933,
          "acAsrConf": 0
        },
        {
          "utf8": "pianist ",
          "tOffsetMs": 1866,
          "acAsrConf": 0
        },
        {
          "utf8": "also",
          "tOffsetMs": 2799,
          "acAsrConf": 0
        }
      ]
    },
    {
      "tStartMs": 42790,
      "dDurationMs": 1650,
      "wWinId": 1,
      "aAppend": 1,
      "segs": [
        {
          "utf8": "\n"
        }
      ]
    },
    {
      "tStartMs": 42800,
      "dDurationMs": 3399,
      "wWinId": 1,
      "segs": [
        {
          "utf8": "rhythmician ",
          "acAsrConf": 0
        },
        {
          "utf8": "I ",
          "tOffsetMs": 413,
          "acAsrConf": 0
        },
        {
          "utf8": "have ",
          "tOffsetMs": 826,
          "acAsrConf": 0
        },
        {
          "utf8": "made",
          "tOffsetMs": 1239,
          "acAsrConf": 0
        }
      ]
    },

  ]
}

And Voila! the output from Claude ‘Sonnet’

1
00:00:00,000 --> 00:00:03,443
[Music]

2
00:00:01,110 --> 00:00:04,569
[Music]

3
00:00:07,720 --> 00:00:37,360
[Music]

4
00:00:34,040 --> 00:00:39,640
I am a musician first of course a

5
00:00:37,360 --> 00:00:42,800
music composer, professor of composition organist pianist also

6
00:00:42,800 --> 00:00:46,199
rhythmician I have made

Matches the video perfectly 🎉