From 714e05314c78243bd7ec460d433a26dd33a647a8 Mon Sep 17 00:00:00 2001
From: STeven <127262689+steve3256@users.noreply.github.com>
Date: Mon, 25 May 2026 10:40:46 +0330
Subject: [PATCH 1/2] Update Code [BETA 1.4.20 GUI].py
Added Video codec Options Priority for YouTube ( VP9 and AVC Over AV01)
---
Code [BETA 1.4.20 GUI].py | 51 +++++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 21 deletions(-)
diff --git a/Code [BETA 1.4.20 GUI].py b/Code [BETA 1.4.20 GUI].py
index 9c56f78..6f5e0bd 100644
--- a/Code [BETA 1.4.20 GUI].py
+++ b/Code [BETA 1.4.20 GUI].py
@@ -2347,16 +2347,25 @@ def build_youtube_format(self, quality, audio_only):
return "bestaudio/best"
if quality == "best":
- return "bv*[vcodec!=none]+ba/bestvideo+bestaudio/best"
+ return "bestvideo[vcodec*=?vp9]+bestaudio/bestvideo[vcodec*=?avc]+bestaudio/best"
if quality in ["4320", "2160", "1440", "1080", "720", "480", "360", "240", "144"]:
return (
+ # 1. Exact height with VP9
+ f"bestvideo[height={quality}][vcodec*=?vp9]+bestaudio/"
+ # 2. Exact height with AVC (H.264)
+ f"bestvideo[height={quality}][vcodec*=?avc]+bestaudio/"
+ # 3. Exact height with any codec (fallback if neither VP9/AVC exists at this specific res)
f"bestvideo[height={quality}][vcodec!=none]+bestaudio/"
- f"bestvideo[height<={quality}][vcodec!=none]+bestaudio/"
+ # 4. Nearest lower height with VP9
+ f"bestvideo[height<={quality}][vcodec*=?vp9]+bestaudio/"
+ # 5. Nearest lower height with AVC
+ f"bestvideo[height<={quality}][vcodec*=?avc]+bestaudio/"
+ # 6. Absolute final fallback
f"best[height<={quality}]/best"
)
- return "bv*[vcodec!=none]+ba/bestvideo+bestaudio/best"
+ return "bestvideo[vcodec*=?vp9]+bestaudio/bestvideo[vcodec*=?avc]+bestaudio/best"
def download_youtube(self, url, folder_name="", quality="best", audio_only=False, playlist=True, metadata=False):
url = url.strip()
@@ -3961,7 +3970,7 @@ def build(self):
for index, title in enumerate(titles):
tabs.set_title(index, title)
- refresh_button = self.button("↻ Refresh storage", "info", "150px")
+ refresh_button = self.button("↻ Refresh storage", "info", "150px")
refresh_button.on_click(lambda button: self.refresh_storage())
clear_button = self.button("Clear output", "neutral", "130px")
clear_button.on_click(lambda button: self.output.clear_output())
@@ -4029,25 +4038,25 @@ def button(self, description, kind="primary", width="180px", start=False):
label = str(description)
icons = {
- "Start": "▶",
- "Download": "⬇",
- "Save": "✓",
- "Clear": "×",
- "Remove": "×",
- "Fetch": "↻",
- "Repo": "⌁",
- "Official": "★",
- "Token": "◆",
- "Storage": "◷",
- "History": "≡",
- "Files": "▣",
- "Latest": "●",
+ "Start": "â–¶",
+ "Download": "⬇",
+ "Save": "✓",
+ "Clear": "×",
+ "Remove": "×",
+ "Fetch": "↻",
+ "Repo": "âŒ",
+ "Official": "★",
+ "Token": "â—†",
+ "Storage": "â—·",
+ "History": "≡",
+ "Files": "â–£",
+ "Latest": "â—",
"Guide": "?",
- "Project": "★",
- "Create": "▦",
- "ZIP": "▦",
+ "Project": "★",
+ "Create": "â–¦",
+ "ZIP": "â–¦",
"SHA256": "#",
- "aria2": "↯"
+ "aria2": "↯"
}
if not any(label.startswith(prefix + " ") for prefix in icons.values()):
From 87fe53696a09c3c9f8e7cce904fac0691068a39d Mon Sep 17 00:00:00 2001
From: STeven <127262689+steve3256@users.noreply.github.com>
Date: Fri, 29 May 2026 05:08:49 +0330
Subject: [PATCH 2/2] Created using Colab
---
m3u8_downloader.ipynb | 158 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 158 insertions(+)
create mode 100644 m3u8_downloader.ipynb
diff --git a/m3u8_downloader.ipynb b/m3u8_downloader.ipynb
new file mode 100644
index 0000000..fe7a558
--- /dev/null
+++ b/m3u8_downloader.ipynb
@@ -0,0 +1,158 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "name": "m3u8 downloader.ipynb",
+ "provenance": [],
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "MoLddhWRxwdv"
+ },
+ "source": [
+ "\n",
+ "
\n",
+ "\n",
+ "\n",
+ "\n",
+ "