(Feb-19-2023, 11:06 AM)Pavel_47 Wrote: Any suggestions ?No need to write own code for this.
Look at doc Subtitle Options.
# list available sub formats (arte_env) G:\1_youtube\arte_env λ yt-dlp --list-subs --skip-download https://www.arte.tv/fr/videos/107115-001-A/la-fille-de-kiev-1-6 [ArteTV] 107115-001-A: Downloading JSON metadata WARNING: [ArteTV] Video is geo restricted. Retrying extraction with fake IP 90.85.161.221 (FR) as X-Forwarded-For. [ArteTV] 107115-001-A: Downloading JSON metadata [ArteTV] 107115-001-A: Downloading m3u8 information [ArteTV] 107115-001-A: Downloading m3u8 information [ArteTV] 107115-001-A: Downloading m3u8 information [ArteTV] 107115-001-A: Downloading m3u8 information [ArteTV] 107115-001-A: Downloading m3u8 information [info] Available subtitles for 107115-001-A: Language Formats fr vtt, vtt de vtt, vtt, vtt # Download the sub(.vtt) format (arte_env) G:\1_youtube\arte_env λ yt-dlp --write-sub --all-subs --skip-download https://www.arte.tv/fr/videos/107115-001-A/la-fille-de-kiev-1-6/ [ArteTV] 107115-001-A: Downloading JSON metadata WARNING: [ArteTV] Video is geo restricted. Retrying extraction with fake IP 53.182.113.183 (DE) as X-Forwarded-For. [ArteTV] 107115-001-A: Downloading JSON metadata [ArteTV] 107115-001-A: Downloading m3u8 information [ArteTV] 107115-001-A: Downloading m3u8 information [ArteTV] 107115-001-A: Downloading m3u8 information [ArteTV] 107115-001-A: Downloading m3u8 information [ArteTV] 107115-001-A: Downloading m3u8 information [info] 107115-001-A: Downloading 1 format(s): VF-STF-2109+VF-STF-program_audio_0-VF [info] Writing video subtitles to: La fille de Kiev (1_6) [107115-001-A].fr.vtt [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 1 [download] Destination: La fille de Kiev (1_6) [107115-001-A].fr.vtt [download] 100% of 55.96KiB in 00:00 [info] Writing video subtitles to: La fille de Kiev (1_6) [107115-001-A].de.vtt [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 1 [download] Destination: La fille de Kiev (1_6) [107115-001-A].de.vtt [download] 100% of 98.16KiB in 00:00