ytarchive icon indicating copy to clipboard operation
ytarchive copied to clipboard

[Feature Request] add filename tweak option like --trim-filenames

Open UVJkiNTQ opened this issue 1 year ago • 8 comments

Since youtube allows a long title for streams, it is possible to meet a long tile which exceed the filesystem limitaiton. I met the 'file name too long' error and fail to mux the ts files.

UVJkiNTQ avatar Oct 28 '24 16:10 UVJkiNTQ

I actually have something in place to do this automatically already. Did you see this message in your download? If so, can you post what it truncated to and what filesystem you use?

2024-10-28_09-34-48

Kethsar avatar Oct 28 '24 16:10 Kethsar

File system: ext4

Sorry I have cleared the terminial log and manually muxed the files with deletion. The log ouput I saw do not have this warning.

I remember I have seen an error on deletion of frag ts file, and warning of 'file name too long' of that ts file.

The playback of stream is here for your reference: https://www.youtube.com/watch?v=VLjabsU3jIg

UVJkiNTQ avatar Oct 28 '24 17:10 UVJkiNTQ

What version of ytarchive are you using?

Kethsar avatar Oct 28 '24 17:10 Kethsar

0.5.0 install with go

UVJkiNTQ avatar Oct 28 '24 17:10 UVJkiNTQ

Hm, odd. Next time you see it happen, paste the logs if you can.

Kethsar avatar Oct 28 '24 17:10 Kethsar

okay. I will keep the log next time.

I will keep this issue open.

UVJkiNTQ avatar Oct 28 '24 17:10 UVJkiNTQ

➜ yta ytarchive --monitor-channel -c cookies.txt -4 --add-metadata -t --vp9 --write-descr iption -td ./temp --write-thumbnail -l -o '犬山たまき/%(upload_date)s_%(title)s' https://w ww.youtube.com/channel/UC8NZiqKx6fsDT3AVcMiVFyA/live best --no-check-certificate ytarchive 0.5.0

2024/10/29 01:42:40 Waiting for stream, retrying every 60 seconds... 2024/10/29 22:01:06 Channel: Tamaki Ch. 犬山たまき / 佃煮のりおted: 72000 seconds 2024/10/29 22:01:06 Video Title: 【#イケボホストクラブ】一年振りのキャスト全員集合🍷✨【犬山たまき/ 夢追翔/神田笑一/ベルモンド・バンデラス/オリバー・エバンス/夕刻ロベル】 2024/10/29 22:01:06 Selected quality: 1080p60 (h264) 2024/10/29 22:01:06 Stream started at time 2024-10-29T14:00:10+00:00 Video Fragments: 1000; Audio Fragments: 1000; Total Downloaded: 569.38MiB 2024/10/29 22:22:51 ERROR: Error retrieving player response: unable to retrieve player response object from watch page 2024/10/29 22:22:51 WARNING: Error deleting file: stat temp/JH67j_LAHvM__1096355344/20241029_【#イケボホストクラブ】一年振りのキャスト全員集合🍷✨【犬山たまき⧸夢追翔⧸神田笑一⧸ベルモンド・バンデラス⧸オリバー・エバンス⧸夕刻ロベル】.f140.frag1000.ts: file name too long 2024/10/29 22:22:51 WARNING: Error deleting file: stat temp/JH67j_LAHvM__1096355344/20241029_【#イケボホストクラブ】一年振りのキャスト全員集合🍷✨【犬山たまき⧸夢追翔⧸神田笑一⧸ベルモンド・バンデラス⧸オリバー・エバンス⧸夕刻ロベル】.f299.frag1000.ts: file name too long Video Fragments: 1000; Audio Fragments: 1000; Total Downloaded: 569.38MiB 2024/10/29 22:22:51 Download Finished 2024/10/29 22:22:51 Muxing final file... size= 571335KiB time=00:00:00.04 bitrate=117009358.6kbits/s speed=0.00272x 2024/10/29 22:23:12 Final file: /home/luke/yta/犬山たまき/20241029_【#イケボホストクラブ】一年振りのキャスト全員集合🍷✨【犬山たまき⧸夢追翔⧸神田笑一⧸ベルモンド・バンデラス⧸オリバー・エバンス⧸夕刻ロベル】.mp4 2024/10/29 22:23:13 You have opted to wait for a livestream to be scheduled. Retrying every 60 seconds. Retries: 1 (Last retry: 2024/10/29 22:24:13), Total time waited: 60 seconds


This time it seems sucessfully output a file but error occurs.

UVJkiNTQ avatar Oct 29 '24 14:10 UVJkiNTQ

Ahhh I see, my check on file name length had the limit set to %output_name%.description, but fragment files end up with %format%.frag%frag_num%.ts at the end, which is a fair bit more. I haven't used fragment files for so long I forgot to account for that. I know what to do to fix this at least.

Kethsar avatar Oct 30 '24 03:10 Kethsar