/crx-Youtube-transcoder

website userscript: use ffmpeg.wasm to transcode Youtube media streams

Primary LanguageJavaScriptGNU General Public License v2.0GPL-2.0

Userscript for youtube.com to run in:

  • the WebMonkey application
    • for Android
  • the Tampermonkey web browser extension
    • for Firefox/Fenix
    • for Chrome/Chromium
      • error: none (execution fails silently)
      • behavior: userscript installs, all resources download and are saved to the DB, but userscript does not execute
      • best guess at cause: DB query to retrieve resources fails because size of result is larger than CursorWindow
      • related issues: 1, 2, 3, 4
  • the Violentmonkey web browser extension

Purpose

Use ffmpeg.wasm to transcode Youtube media streams.

  1. copy and combine video with audio to mp4
  2. resample and convert audio to mp3

Important

  • does not currently work when the User-Agent request header self-identifies as a mobile device
    • which causes Youtube to redirect from www.youtube.com to m.youtube.com
    • in Fenix:
      • open: main menu
      • select: "Desktop site"
    • in WebMonkey:
      • open: main menu > Settings > User Agent
      • select either: "Chrome 120, Windows 10", or "Custom User Agent"

Legal