First let's look at the error occurring
Code: Select all
guest@porteus:/myvideo/reportagen$ yt-dlp https://twitter.com/i/status/1578627042673057792
[twitter] 1578627042673057792: Downloading guest token
[twitter] 1578627042673057792: Downloading JSON metadata
[twitter] 1578627042673057792: Downloading m3u8 information
[info] 1578627042673057792: Downloading 1 format(s): http-2176
ERROR: unable to open for writing: [Errno 36] File name too long: 'JR2 - @WarintheFuture Here a local recorded the smoke (window⧸balcony view) with her comment. She says: it is 6 AM local time. Sunrise today in #Kerch was 06.40 AM cc @JuliaDavisNews @STRATPOINTS_EU @DefenceHQ @general_ben @TheStudyofWar [1578627042673057792].mp4.part'
Now one fix as suggested via https://github.com/yt-dlp/yt-dlp/issues/5060 is to have the file name as the URL descriptor
Code: Select all
guest@porteus:/myvideo/reportagen$ yt-dlp -o "%(id)s.%(ext)s" https://twitter.com/i/status/1578627042673057792
[twitter] 1578627042673057792: Downloading guest token
[twitter] 1578627042673057792: Downloading JSON metadata
[twitter] 1578627042673057792: Downloading m3u8 information
[info] 1578627042673057792: Downloading 1 format(s): http-2176
[download] Destination: 1578627042673057792.mp4
[download] 100% of 616.60KiB in 00:02 at 305.55KiB/s
So I looked for more suggestions and found this https://github.com/yt-dlp/yt-dlp/issues/1136 suggesting an approach of shortening the file name to 200 characters (the limit break is 256 characters, but yt-dlp needs some characters for itself when creating the temp files, therefore cropping the file name to 200 characters is a safe bet.) Feel free to experiment with a slightly higer number, if you do so please report your results in here.
Code: Select all
guest@porteus:/myvideo/reportagen$ yt-dlp -o "%(title).200s.%(ext)s" https://twitter.com/i/status/1578627042673057792
[twitter] 1578627042673057792: Downloading guest token
[twitter] 1578627042673057792: Downloading JSON metadata
[twitter] 1578627042673057792: Downloading m3u8 information
[info] 1578627042673057792: Downloading 1 format(s): http-2176
[download] Destination: JR2 - @WarintheFuture Here a local recorded the smoke (window⧸balcony view) with her comment. She says: it is 6 AM local time. Sunrise today in #Kerch was 06.40 AM cc @JuliaDavisNews @STRATPOINTS_EU @.mp4
[download] 100% of 616.60KiB in 00:03 at 202.95KiB/s
I love me this
Code: Select all
yt-dlp -o "%(title).200s.%(ext)s" URL