summaryrefslogtreecommitdiff
path: root/home/xyz/.config/yt-dlp
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-09-26 01:27:57 -0700
committerXiao Pan <gky44px1999@gmail.com>2023-09-26 01:27:57 -0700
commitc04219410d8848c6638b5ae126a2be4880a39d40 (patch)
tree85097caf57adf1d655f357483e9492180d8ea087 /home/xyz/.config/yt-dlp
parenta240c42369e9aa26b48e8d60717e52d3534e53ef (diff)
yt-dlp consider linux max filename length, else fail
Diffstat (limited to 'home/xyz/.config/yt-dlp')
-rw-r--r--home/xyz/.config/yt-dlp/config6
1 files changed, 6 insertions, 0 deletions
diff --git a/home/xyz/.config/yt-dlp/config b/home/xyz/.config/yt-dlp/config
index 4ed6c4a7..3057a94e 100644
--- a/home/xyz/.config/yt-dlp/config
+++ b/home/xyz/.config/yt-dlp/config
@@ -9,3 +9,9 @@
# manpage says yt-dlp use --sub-langs, youtube-dl use --sub-lang, but experiment shows yt-dlp also use --sub-lang
--sub-lang zh-Hans,zh-CN,zh-Hant,zh-SG,zh-TW,zh-HK,en,en-US,en-GB
+
+# linux max filename length is 255 bytes, UTF-8 1 character max 4 byptes
+# yt-dlp and aria2c will add about max 38 chars behind video name, for example: ' [EXF4g-2jOJo].f616.mp4.part.frag.urls'
+# I choose a safety factor of 2 for max chars added
+# (255-38*2)/4==44
+--trim-filenames 44