summaryrefslogtreecommitdiffstats
path: root/network/yt-dlp/yt-dlp.1
blob: 93f52b40563cb86293806e754241e7f11da08a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
.\"t
.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "yt-dlp" "1" "" "" ""
.hy
.SH NAME
.PP
yt-dlp - A youtube-dl fork with additional features and patches
.SH SYNOPSIS
.PP
\f[B]yt-dlp\f[R] [OPTIONS] URL [URL...]
.SH DESCRIPTION
.PP
yt-dlp is a youtube-dl (https://github.com/ytdl-org/youtube-dl) fork
based on the now inactive
youtube-dlc (https://github.com/blackjack4494/yt-dlc).
The main focus of this project is adding new features and patches while
also keeping up to date with the original project
.SH OPTIONS
.SS General Options:
.TP
-h, --help
Print this help text and exit
.TP
--version
Print program version and exit
.TP
-U, --update
Update this program to the latest version
.TP
--no-update
Do not check for updates (default)
.TP
--update-to \f[I][CHANNEL]\[at][TAG]\f[R]
Upgrade/downgrade to a specific version.
CHANNEL can be a repository as well.
CHANNEL and TAG default to \[dq]stable\[dq] and \[dq]latest\[dq]
respectively if omitted; See \[dq]UPDATE\[dq] for details.
Supported channels: stable, nightly, master
.TP
-i, --ignore-errors
Ignore download and postprocessing errors.
The download will be considered successful even if the postprocessing
fails
.TP
--no-abort-on-error
Continue with next video on download errors; e.g.
to skip unavailable videos in a playlist (default)
.TP
--abort-on-error
Abort downloading of further videos if an error occurs (Alias:
--no-ignore-errors)
.TP
--dump-user-agent
Display the current user-agent and exit
.TP
--list-extractors
List all supported extractors and exit
.TP
--extractor-descriptions
Output descriptions of all supported extractors and exit
.TP
--use-extractors \f[I]NAMES\f[R]
Extractor names to use separated by commas.
You can also use regexes, \[dq]all\[dq], \[dq]default\[dq] and
\[dq]end\[dq] (end URL matching); e.g.
--ies \[dq]holodex.*,end,youtube\[dq].
Prefix the name with a \[dq]-\[dq] to exclude it, e.g.
--ies default,-generic.
Use --list-extractors for a list of extractor names.
(Alias: --ies)
.TP
--default-search \f[I]PREFIX\f[R]
Use this prefix for unqualified URLs.
E.g.
\[dq]gvsearch2:python\[dq] downloads two videos from google videos for
the search term \[dq]python\[dq].
Use the value \[dq]auto\[dq] to let yt-dlp guess (\[dq]auto_warning\[dq]
to emit a warning when guessing).
\[dq]error\[dq] just throws an error.
The default value \[dq]fixup_error\[dq] repairs broken URLs, but emits
an error if this is not possible instead of searching
.TP
--ignore-config
Don\[aq]t load any more configuration files except those given by
--config-locations.
For backward compatibility, if this option is found inside the system
configuration file, the user configuration is not loaded.
(Alias: --no-config)
.TP
--no-config-locations
Do not load any custom configuration files (default).
When given inside a configuration file, ignore all previous
--config-locations defined in the current file
.TP
--config-locations \f[I]PATH\f[R]
Location of the main configuration file; either the path to the config
or its containing directory (\[dq]-\[dq] for stdin).
Can be used multiple times and inside other configuration files
.TP
--flat-playlist
Do not extract the videos of a playlist, only list them
.TP
--no-flat-playlist
Fully extract the videos of a playlist (default)
.TP
--live-from-start
Download livestreams from the start.
Currently only supported for YouTube (Experimental)
.TP
--no-live-from-start
Download livestreams from the current time (default)
.TP
--wait-for-video \f[I]MIN[-MAX]\f[R]
Wait for scheduled streams to become available.
Pass the minimum number of seconds (or range) to wait between retries
.TP
--no-wait-for-video
Do not wait for scheduled streams (default)
.TP
--mark-watched
Mark videos watched (even with --simulate)
.TP
--no-mark-watched
Do not mark videos watched (default)
.TP
--color \f[I][STREAM:]POLICY\f[R]
Whether to emit color codes in output, optionally prefixed by the STREAM
(stdout or stderr) to apply the setting to.
Can be one of \[dq]always\[dq], \[dq]auto\[dq] (default),
\[dq]never\[dq], or \[dq]no_color\[dq] (use non color terminal
sequences).
Can be used multiple times
.TP
--compat-options \f[I]OPTS\f[R]
Options that can help keep compatibility with youtube-dl or youtube-dlc
configurations by reverting some of the changes made in yt-dlp.
See \[dq]Differences in default behavior\[dq] for details
.TP
--alias \f[I]ALIASES OPTIONS\f[R]
Create aliases for an option string.
Unless an alias starts with a dash \[dq]-\[dq], it is prefixed with
\[dq]--\[dq].
Arguments are parsed according to the Python string formatting
mini-language.
E.g.
--alias get-audio,-X \[dq]-S=aext:{0},abr -x --audio-format {0}\[dq]
creates options \[dq]--get-audio\[dq] and \[dq]-X\[dq] that takes an
argument (ARG0) and expands to \[dq]-S=aext:ARG0,abr -x --audio-format
ARG0\[dq].
All defined aliases are listed in the --help output.
Alias options can trigger more aliases; so be careful to avoid defining
recursive options.
As a safety measure, each alias may be triggered a maximum of 100 times.
This option can be used multiple times
.SS Network Options:
.TP
--proxy \f[I]URL\f[R]
Use the specified HTTP/HTTPS/SOCKS proxy.
To enable SOCKS proxy, specify a proper scheme, e.g.
socks5://user:pass\[at]127.0.0.1:1080/.
Pass in an empty string (--proxy \[dq]\[dq]) for direct connection
.TP
--socket-timeout \f[I]SECONDS\f[R]
Time to wait before giving up, in seconds
.TP
--source-address \f[I]IP\f[R]
Client-side IP address to bind to
.TP
-4, --force-ipv4
Make all connections via IPv4
.TP
-6, --force-ipv6
Make all connections via IPv6
.TP
--enable-file-urls
Enable file:// URLs.
This is disabled by default for security reasons.
.SS Geo-restriction:
.TP
--geo-verification-proxy \f[I]URL\f[R]
Use this proxy to verify the IP address for some geo-restricted sites.
The default proxy specified by --proxy (or none, if the option is not
present) is used for the actual downloading
.TP
--xff \f[I]VALUE\f[R]
How to fake X-Forwarded-For HTTP header to try bypassing geographic
restriction.
One of \[dq]default\[dq] (only when known to be useful),
\[dq]never\[dq], an IP block in CIDR notation, or a two-letter ISO
3166-2 country code
.SS Video Selection:
.TP
-I, --playlist-items \f[I]ITEM_SPEC\f[R]
Comma separated playlist_index of the items to download.
You can specify a range using \[dq][START]:[STOP][:STEP]\[dq].
For backward compatibility, START-STOP is also supported.
Use negative indices to count from the right and negative STEP to
download in reverse order.
E.g.
\[dq]-I 1:3,7,-5::2\[dq] used on a playlist of size 15 will download the
items at index 1,2,3,7,11,13,15
.TP
--min-filesize \f[I]SIZE\f[R]
Abort download if filesize is smaller than SIZE, e.g.
50k or 44.6M
.TP
--max-filesize \f[I]SIZE\f[R]
Abort download if filesize is larger than SIZE, e.g.
50k or 44.6M
.TP
--date \f[I]DATE\f[R]
Download only videos uploaded on this date.
The date can be \[dq]YYYYMMDD\[dq] or in the format
[now|today|yesterday][-N[day|week|month|year]].
E.g.
\[dq]--date today-2weeks\[dq] downloads only videos uploaded on the same
day two weeks ago
.TP
--datebefore \f[I]DATE\f[R]
Download only videos uploaded on or before this date.
The date formats accepted is the same as --date
.TP
--dateafter \f[I]DATE\f[R]
Download only videos uploaded on or after this date.
The date formats accepted is the same as --date
.TP
--match-filters \f[I]FILTER\f[R]
Generic video filter.
Any \[dq]OUTPUT TEMPLATE\[dq] field can be compared with a number or a
string using the operators defined in \[dq]Filtering Formats\[dq].
You can also simply specify a field to match if the field is present,
use \[dq]!field\[dq] to check if the field is not present, and
\[dq]&\[dq] to check multiple conditions.
Use a \[dq]\[dq] to escape \[dq]&\[dq] or quotes if needed.
If used multiple times, the filter matches if atleast one of the
conditions are met.
E.g.
--match-filter !is_live --match-filter \[dq]like_count>?100 &
description\[ti]=\[aq](?i)& dogs\[dq] matches only videos that are not
live OR those that have a like count more than 100 (or the like field is
not available) and also has a description that contains the phrase
\[dq]cats & dogs\[dq] (caseless).
Use \[dq]--match-filter -\[dq] to interactively ask whether to download
each video
.TP
--no-match-filters
Do not use any --match-filter (default)
.TP
--break-match-filters \f[I]FILTER\f[R]
Same as \[dq]--match-filters\[dq] but stops the download process when a
video is rejected
.TP
--no-break-match-filters
Do not use any --break-match-filters (default)
.TP
--no-playlist
Download only the video, if the URL refers to a video and a playlist
.TP
--yes-playlist
Download the playlist, if the URL refers to a video and a playlist
.TP
--age-limit \f[I]YEARS\f[R]
Download only videos suitable for the given age
.TP
--download-archive \f[I]FILE\f[R]
Download only videos not listed in the archive file.
Record the IDs of all downloaded videos in it
.TP
--no-download-archive
Do not use archive file (default)
.TP
--max-downloads \f[I]NUMBER\f[R]
Abort after downloading NUMBER files
.TP
--break-on-existing
Stop the download process when encountering a file that is in the
archive
.TP
--break-per-input
Alters --max-downloads, --break-on-existing, --break-match-filter, and
autonumber to reset per input URL
.TP
--no-break-per-input
--break-on-existing and similar options terminates the entire download
queue
.TP
--skip-playlist-after-errors \f[I]N\f[R]
Number of allowed failures until the rest of the playlist is skipped
.SS Download Options:
.TP
-N, --concurrent-fragments \f[I]N\f[R]
Number of fragments of a dash/hlsnative video that should be downloaded
concurrently (default is 1)
.TP
-r, --limit-rate \f[I]RATE\f[R]
Maximum download rate in bytes per second, e.g.
50K or 4.2M
.TP
--throttled-rate \f[I]RATE\f[R]
Minimum download rate in bytes per second below which throttling is
assumed and the video data is re-extracted, e.g.
100K
.TP
-R, --retries \f[I]RETRIES\f[R]
Number of retries (default is 10), or \[dq]infinite\[dq]
.TP
--file-access-retries \f[I]RETRIES\f[R]
Number of times to retry on file access error (default is 3), or
\[dq]infinite\[dq]
.TP
--fragment-retries \f[I]RETRIES\f[R]
Number of retries for a fragment (default is 10), or \[dq]infinite\[dq]
(DASH, hlsnative and ISM)
.TP
--retry-sleep \f[I][TYPE:]EXPR\f[R]
Time to sleep between retries in seconds (optionally) prefixed by the
type of retry (http (default), fragment, file_access, extractor) to
apply the sleep to.
EXPR can be a number, linear=START[:END[:STEP=1]] or
exp=START[:END[:BASE=2]].
This option can be used multiple times to set the sleep for the
different retry types, e.g.
--retry-sleep linear=1::2 --retry-sleep fragment:exp=1:20
.TP
--skip-unavailable-fragments
Skip unavailable fragments for DASH, hlsnative and ISM downloads
(default) (Alias: --no-abort-on-unavailable-fragments)
.TP
--abort-on-unavailable-fragments
Abort download if a fragment is unavailable (Alias:
--no-skip-unavailable-fragments)
.TP
--keep-fragments
Keep downloaded fragments on disk after downloading is finished
.TP
--no-keep-fragments
Delete downloaded fragments after downloading is finished (default)
.TP
--buffer-size \f[I]SIZE\f[R]
Size of download buffer, e.g.
1024 or 16K (default is 1024)
.TP
--resize-buffer
The buffer size is automatically resized from an initial value of
--buffer-size (default)
.TP
--no-resize-buffer
Do not automatically adjust the buffer size
.TP
--http-chunk-size \f[I]SIZE\f[R]
Size of a chunk for chunk-based HTTP downloading, e.g.
10485760 or 10M (default is disabled).
May be useful for bypassing bandwidth throttling imposed by a webserver
(experimental)
.TP
--playlist-random
Download playlist videos in random order
.TP
--lazy-playlist
Process entries in the playlist as they are received.
This disables n_entries, --playlist-random and --playlist-reverse
.TP
--no-lazy-playlist
Process videos in the playlist only after the entire playlist is parsed
(default)
.TP
--xattr-set-filesize
Set file xattribute ytdl.filesize with expected file size
.TP
--hls-use-mpegts
Use the mpegts container for HLS videos; allowing some players to play
the video while downloading, and reducing the chance of file corruption
if download is interrupted.
This is enabled by default for live streams
.TP
--no-hls-use-mpegts
Do not use the mpegts container for HLS videos.
This is default when not downloading live streams
.TP
--download-sections \f[I]REGEX\f[R]
Download only chapters that match the regular expression.
A \[dq]\f[I]\[dq] prefix denotes time-range instead of chapter. Negative
timestamps are calculated from the end. \[dq]\f[R]from-url\[dq] can be
used to download between the \[dq]start_time\[dq] and \[dq]end_time\[dq]
extracted from the URL.
Needs ffmpeg.
This option can be used multiple times to download multiple sections,
e.g.
--download-sections \[dq]*10:15-inf\[dq] --download-sections
\[dq]intro\[dq]
.TP
--downloader \f[I][PROTO:]NAME\f[R]
Name or path of the external downloader to use (optionally) prefixed by
the protocols (http, ftp, m3u8, dash, rstp, rtmp, mms) to use it for.
Currently supports native, aria2c, avconv, axel, curl, ffmpeg, httpie,
wget.
You can use this option multiple times to set different downloaders for
different protocols.
E.g.
--downloader aria2c --downloader \[dq]dash,m3u8:native\[dq] will use
aria2c for http/ftp downloads, and the native downloader for dash/m3u8
downloads (Alias: --external-downloader)
.TP
--downloader-args \f[I]NAME:ARGS\f[R]
Give these arguments to the external downloader.
Specify the downloader name and the arguments separated by a colon
\[dq]:\[dq].
For ffmpeg, arguments can be passed to different positions using the
same syntax as --postprocessor-args.
You can use this option multiple times to give different arguments to
different downloaders (Alias: --external-downloader-args)
.SS Filesystem Options:
.TP
-a, --batch-file \f[I]FILE\f[R]
File containing URLs to download (\[dq]-\[dq] for stdin), one URL per
line.
Lines starting with \[dq]#\[dq], \[dq];\[dq] or \[dq]]\[dq] are
considered as comments and ignored
.TP
--no-batch-file
Do not read URLs from batch file (default)
.TP
-P, --paths \f[I][TYPES:]PATH\f[R]
The paths where the files should be downloaded.
Specify the type of file and the path separated by a colon \[dq]:\[dq].
All the same TYPES as --output are supported.
Additionally, you can also provide \[dq]home\[dq] (default) and
\[dq]temp\[dq] paths.
All intermediary files are first downloaded to the temp path and then
the final files are moved over to the home path after download is
finished.
This option is ignored if --output is an absolute path
.TP
-o, --output \f[I][TYPES:]TEMPLATE\f[R]
Output filename template; see \[dq]OUTPUT TEMPLATE\[dq] for details
.TP
--output-na-placeholder \f[I]TEXT\f[R]
Placeholder for unavailable fields in \[dq]OUTPUT TEMPLATE\[dq]
(default: \[dq]NA\[dq])
.TP
--restrict-filenames
Restrict filenames to only ASCII characters, and avoid \[dq]&\[dq] and
spaces in filenames
.TP
--no-restrict-filenames
Allow Unicode characters, \[dq]&\[dq] and spaces in filenames (default)
.TP
--windows-filenames
Force filenames to be Windows-compatible
.TP
--no-windows-filenames
Make filenames Windows-compatible only if using Windows (default)
.TP
--trim-filenames \f[I]LENGTH\f[R]
Limit the filename length (excluding extension) to the specified number
of characters
.TP
-w, --no-overwrites
Do not overwrite any files
.TP
--force-overwrites
Overwrite all video and metadata files.
This option includes --no-continue
.TP
--no-force-overwrites
Do not overwrite the video, but overwrite related files (default)
.TP
-c, --continue
Resume partially downloaded files/fragments (default)
.TP
--no-continue
Do not resume partially downloaded fragments.
If the file is not fragmented, restart download of the entire file
.TP
--part
Use .part files instead of writing directly into output file (default)
.TP
--no-part
Do not use .part files - write directly into output file
.TP
--mtime
Use the Last-modified header to set the file modification time (default)
.TP
--no-mtime
Do not use the Last-modified header to set the file modification time
.TP
--write-description
Write video description to a .description file
.TP
--no-write-description
Do not write video description (default)
.TP
--write-info-json
Write video metadata to a .info.json file (this may contain personal
information)
.TP
--no-write-info-json
Do not write video metadata (default)
.TP
--write-playlist-metafiles
Write playlist metadata in addition to the video metadata when using
--write-info-json, --write-description etc.
(default)
.TP
--no-write-playlist-metafiles
Do not write playlist metadata when using --write-info-json,
--write-description etc.
.TP
--clean-info-json
Remove some internal metadata such as filenames from the infojson
(default)
.TP
--no-clean-info-json
Write all fields to the infojson
.TP
--write-comments
Retrieve video comments to be placed in the infojson.
The comments are fetched even without this option if the extraction is
known to be quick (Alias: --get-comments)
.TP
--no-write-comments
Do not retrieve video comments unless the extraction is known to be
quick (Alias: --no-get-comments)
.TP
--load-info-json \f[I]FILE\f[R]
JSON file containing the video information (created with the
\[dq]--write-info-json\[dq] option)
.TP
--cookies \f[I]FILE\f[R]
Netscape formatted file to read cookies from and dump cookie jar in
.TP
--no-cookies
Do not read/dump cookies from/to file (default)
.TP
--cookies-from-browser \f[I]BROWSER[+KEYRING][:PROFILE][::CONTAINER]\f[R]
The name of the browser to load cookies from.
Currently supported browsers are: brave, chrome, chromium, edge,
firefox, opera, safari, vivaldi.
Optionally, the KEYRING used for decrypting Chromium cookies on Linux,
the name/path of the PROFILE to load cookies from, and the CONTAINER
name (if Firefox) (\[dq]none\[dq] for no container) can be given with
their respective seperators.
By default, all containers of the most recently accessed profile are
used.
Currently supported keyrings are: basictext, gnomekeyring, kwallet,
kwallet5, kwallet6
.TP
--no-cookies-from-browser
Do not load cookies from browser (default)
.TP
--cache-dir \f[I]DIR\f[R]
Location in the filesystem where yt-dlp can store some downloaded
information (such as client ids and signatures) permanently.
By default ${XDG_CACHE_HOME}/yt-dlp
.TP
--no-cache-dir
Disable filesystem caching
.TP
--rm-cache-dir
Delete all filesystem cache files
.SS Thumbnail Options:
.TP
--write-thumbnail
Write thumbnail image to disk
.TP
--no-write-thumbnail
Do not write thumbnail image to disk (default)
.TP
--write-all-thumbnails
Write all thumbnail image formats to disk
.TP
--list-thumbnails
List available thumbnails of each video.
Simulate unless --no-simulate is used
.SS Internet Shortcut Options:
.TP
--write-link
Write an internet shortcut file, depending on the current platform
(.url, .webloc or .desktop).
The URL may be cached by the OS
.TP
--write-url-link
Write a .url Windows internet shortcut.
The OS caches the URL based on the file path
.TP
--write-webloc-link
Write a .webloc macOS internet shortcut
.TP
--write-desktop-link
Write a .desktop Linux internet shortcut
.SS Verbosity and Simulation Options:
.TP
-q, --quiet
Activate quiet mode.
If used with --verbose, print the log to stderr
.TP
--no-quiet
Deactivate quiet mode.
(Default)
.TP
--no-warnings
Ignore warnings
.TP
-s, --simulate
Do not download the video and do not write anything to disk
.TP
--no-simulate
Download the video even if printing/listing options are used
.TP
--ignore-no-formats-error
Ignore \[dq]No video formats\[dq] error.
Useful for extracting metadata even if the videos are not actually
available for download (experimental)
.TP
--no-ignore-no-formats-error
Throw error when no downloadable video formats are found (default)
.TP
--skip-download
Do not download the video but write all related files (Alias:
--no-download)
.TP
-O, --print \f[I][WHEN:]TEMPLATE\f[R]
Field name or output template to print to screen, optionally prefixed
with when to print it, separated by a \[dq]:\[dq].
Supported values of \[dq]WHEN\[dq] are the same as that of
--use-postprocessor (default: video).
Implies --quiet.
Implies --simulate unless --no-simulate or later stages of WHEN are
used.
This option can be used multiple times
.TP
--print-to-file \f[I][WHEN:]TEMPLATE FILE\f[R]
Append given template to the file.
The values of WHEN and TEMPLATE are same as that of --print.
FILE uses the same syntax as the output template.
This option can be used multiple times
.TP
-j, --dump-json
Quiet, but print JSON information for each video.
Simulate unless --no-simulate is used.
See \[dq]OUTPUT TEMPLATE\[dq] for a description of available keys
.TP
-J, --dump-single-json
Quiet, but print JSON information for each url or infojson passed.
Simulate unless --no-simulate is used.
If the URL refers to a playlist, the whole playlist information is
dumped in a single line
.TP
--force-write-archive
Force download archive entries to be written as far as no errors occur,
even if -s or another simulation option is used (Alias:
--force-download-archive)
.TP
--newline
Output progress bar as new lines
.TP
--no-progress
Do not print progress bar
.TP
--progress
Show progress bar, even if in quiet mode
.TP
--console-title
Display progress in console titlebar
.TP
--progress-template \f[I][TYPES:]TEMPLATE\f[R]
Template for progress outputs, optionally prefixed with one of
\[dq]download:\[dq] (default), \[dq]download-title:\[dq] (the console
title), \[dq]postprocess:\[dq], or \[dq]postprocess-title:\[dq].
The video\[aq]s fields are accessible under the \[dq]info\[dq] key and
the progress attributes are accessible under \[dq]progress\[dq] key.
E.g.
--console-title --progress-template
\[dq]download-title:%(info.id)s-%(progress.eta)s\[dq]
.TP
-v, --verbose
Print various debugging information
.TP
--dump-pages
Print downloaded pages encoded using base64 to debug problems (very
verbose)
.TP
--write-pages
Write downloaded intermediary pages to files in the current directory to
debug problems
.TP
--print-traffic
Display sent and read HTTP traffic
.SS Workarounds:
.TP
--encoding \f[I]ENCODING\f[R]
Force the specified encoding (experimental)
.TP
--legacy-server-connect
Explicitly allow HTTPS connection to servers that do not support RFC
5746 secure renegotiation
.TP
--no-check-certificates
Suppress HTTPS certificate validation
.TP
--prefer-insecure
Use an unencrypted connection to retrieve information about the video
(Currently supported only for YouTube)
.TP
--add-headers \f[I]FIELD:VALUE\f[R]
Specify a custom HTTP header and its value, separated by a colon
\[dq]:\[dq].
You can use this option multiple times
.TP
--bidi-workaround
Work around terminals that lack bidirectional text support.
Requires bidiv or fribidi executable in PATH
.TP
--sleep-requests \f[I]SECONDS\f[R]
Number of seconds to sleep between requests during data extraction
.TP
--sleep-interval \f[I]SECONDS\f[R]
Number of seconds to sleep before each download.
This is the minimum time to sleep when used along with
--max-sleep-interval (Alias: --min-sleep-interval)
.TP
--max-sleep-interval \f[I]SECONDS\f[R]
Maximum number of seconds to sleep.
Can only be used along with --min-sleep-interval
.TP
--sleep-subtitles \f[I]SECONDS\f[R]
Number of seconds to sleep before each subtitle download
.SS Video Format Options:
.TP
-f, --format \f[I]FORMAT\f[R]
Video format code, see \[dq]FORMAT SELECTION\[dq] for more details
.TP
-S, --format-sort \f[I]SORTORDER\f[R]
Sort the formats by the fields given, see \[dq]Sorting Formats\[dq] for
more details
.TP
--format-sort-force
Force user specified sort order to have precedence over all fields, see
\[dq]Sorting Formats\[dq] for more details (Alias: --S-force)
.TP
--no-format-sort-force
Some fields have precedence over the user specified sort order (default)
.TP
--video-multistreams
Allow multiple video streams to be merged into a single file
.TP
--no-video-multistreams
Only one video stream is downloaded for each output file (default)
.TP
--audio-multistreams
Allow multiple audio streams to be merged into a single file
.TP
--no-audio-multistreams
Only one audio stream is downloaded for each output file (default)
.TP
--prefer-free-formats
Prefer video formats with free containers over non-free ones of same
quality.
Use with \[dq]-S ext\[dq] to strictly prefer free containers
irrespective of quality
.TP
--no-prefer-free-formats
Don\[aq]t give any special preference to free containers (default)
.TP
--check-formats
Make sure formats are selected only from those that are actually
downloadable
.TP
--check-all-formats
Check all formats for whether they are actually downloadable
.TP
--no-check-formats
Do not check that the formats are actually downloadable
.TP
-F, --list-formats
List available formats of each video.
Simulate unless --no-simulate is used
.TP
--merge-output-format \f[I]FORMAT\f[R]
Containers that may be used when merging formats, separated by
\[dq]/\[dq], e.g.
\[dq]mp4/mkv\[dq].
Ignored if no merge is required.
(currently supported: avi, flv, mkv, mov, mp4, webm)
.SS Subtitle Options:
.TP
--write-subs
Write subtitle file
.TP
--no-write-subs
Do not write subtitle file (default)
.TP
--write-auto-subs
Write automatically generated subtitle file (Alias:
--write-automatic-subs)
.TP
--no-write-auto-subs
Do not write auto-generated subtitles (default) (Alias:
--no-write-automatic-subs)
.TP
--list-subs
List available subtitles of each video.
Simulate unless --no-simulate is used
.TP
--sub-format \f[I]FORMAT\f[R]
Subtitle format; accepts formats preference, e.g.
\[dq]srt\[dq] or \[dq]ass/srt/best\[dq]
.TP
--sub-langs \f[I]LANGS\f[R]
Languages of the subtitles to download (can be regex) or \[dq]all\[dq]
separated by commas, e.g.
--sub-langs \[dq]en.*,ja\[dq].
You can prefix the language code with a \[dq]-\[dq] to exclude it from
the requested languages, e.g.
--sub-langs all,-live_chat.
Use --list-subs for a list of available language tags
.SS Authentication Options:
.TP
-u, --username \f[I]USERNAME\f[R]
Login with this account ID
.TP
-p, --password \f[I]PASSWORD\f[R]
Account password.
If this option is left out, yt-dlp will ask interactively
.TP
-2, --twofactor \f[I]TWOFACTOR\f[R]
Two-factor authentication code
.TP
-n, --netrc
Use .netrc authentication data
.TP
--netrc-location \f[I]PATH\f[R]
Location of .netrc authentication data; either the path or its
containing directory.
Defaults to \[ti]/.netrc
.TP
--netrc-cmd \f[I]NETRC_CMD\f[R]
Command to execute to get the credentials for an extractor.
.TP
--video-password \f[I]PASSWORD\f[R]
Video-specific password
.TP
--ap-mso \f[I]MSO\f[R]
Adobe Pass multiple-system operator (TV provider) identifier, use
--ap-list-mso for a list of available MSOs
.TP
--ap-username \f[I]USERNAME\f[R]
Multiple-system operator account login
.TP
--ap-password \f[I]PASSWORD\f[R]
Multiple-system operator account password.
If this option is left out, yt-dlp will ask interactively
.TP
--ap-list-mso
List all supported multiple-system operators
.TP
--client-certificate \f[I]CERTFILE\f[R]
Path to client certificate file in PEM format.
May include the private key
.TP
--client-certificate-key \f[I]KEYFILE\f[R]
Path to private key file for client certificate
.TP
--client-certificate-password \f[I]PASSWORD\f[R]
Password for client certificate private key, if encrypted.
If not provided, and the key is encrypted, yt-dlp will ask interactively
.SS Post-Processing Options:
.TP
-x, --extract-audio
Convert video files to audio-only files (requires ffmpeg and ffprobe)
.TP
--audio-format \f[I]FORMAT\f[R]
Format to convert the audio to when -x is used.
(currently supported: best (default), aac, alac, flac, m4a, mp3, opus,
vorbis, wav).
You can specify multiple rules using similar syntax as --remux-video
.TP
--audio-quality \f[I]QUALITY\f[R]
Specify ffmpeg audio quality to use when converting the audio with -x.
Insert a value between 0 (best) and 10 (worst) for VBR or a specific
bitrate like 128K (default 5)
.TP
--remux-video \f[I]FORMAT\f[R]
Remux the video into another container if necessary (currently
supported: avi, flv, gif, mkv, mov, mp4, webm, aac, aiff, alac, flac,
m4a, mka, mp3, ogg, opus, vorbis, wav).
If target container does not support the video/audio codec, remuxing
will fail.
You can specify multiple rules; e.g.
\[dq]aac>m4a/mov>mp4/mkv\[dq] will remux aac to m4a, mov to mp4 and
anything else to mkv
.TP
--recode-video \f[I]FORMAT\f[R]
Re-encode the video into another format if necessary.
The syntax and supported formats are the same as --remux-video
.TP
--postprocessor-args \f[I]NAME:ARGS\f[R]
Give these arguments to the postprocessors.
Specify the postprocessor/executable name and the arguments separated by
a colon \[dq]:\[dq] to give the argument to the specified
postprocessor/executable.
Supported PP are: Merger, ModifyChapters, SplitChapters, ExtractAudio,
VideoRemuxer, VideoConvertor, Metadata, EmbedSubtitle, EmbedThumbnail,
SubtitlesConvertor, ThumbnailsConvertor, FixupStretched, FixupM4a,
FixupM3u8, FixupTimestamp and FixupDuration.
The supported executables are: AtomicParsley, FFmpeg and FFprobe.
You can also specify \[dq]PP+EXE:ARGS\[dq] to give the arguments to the
specified executable only when being used by the specified
postprocessor.
Additionally, for ffmpeg/ffprobe, \[dq]_i\[dq]/\[dq]_o\[dq] can be
appended to the prefix optionally followed by a number to pass the
argument before the specified input/output file, e.g.
--ppa \[dq]Merger+ffmpeg_i1:-v quiet\[dq].
You can use this option multiple times to give different arguments to
different postprocessors.
(Alias: --ppa)
.TP
-k, --keep-video
Keep the intermediate video file on disk after post-processing
.TP
--no-keep-video
Delete the intermediate video file after post-processing (default)
.TP
--post-overwrites
Overwrite post-processed files (default)
.TP
--no-post-overwrites
Do not overwrite post-processed files
.TP
--embed-subs
Embed subtitles in the video (only for mp4, webm and mkv videos)
.TP
--no-embed-subs
Do not embed subtitles (default)
.TP
--embed-thumbnail
Embed thumbnail in the video as cover art
.TP
--no-embed-thumbnail
Do not embed thumbnail (default)
.TP
--embed-metadata
Embed metadata to the video file.
Also embeds chapters/infojson if present unless
--no-embed-chapters/--no-embed-info-json are used (Alias:
--add-metadata)
.TP
--no-embed-metadata
Do not add metadata to file (default) (Alias: --no-add-metadata)
.TP
--embed-chapters
Add chapter markers to the video file (Alias: --add-chapters)
.TP
--no-embed-chapters
Do not add chapter markers (default) (Alias: --no-add-chapters)
.TP
--embed-info-json
Embed the infojson as an attachment to mkv/mka video files
.TP
--no-embed-info-json
Do not embed the infojson as an attachment to the video file
.TP
--parse-metadata \f[I][WHEN:]FROM:TO\f[R]
Parse additional metadata like title/artist from other fields; see
\[dq]MODIFYING METADATA\[dq] for details.
Supported values of \[dq]WHEN\[dq] are the same as that of
--use-postprocessor (default: pre_process)
.TP
--replace-in-metadata \f[I][WHEN:]FIELDS REGEX REPLACE\f[R]
Replace text in a metadata field using the given regex.
This option can be used multiple times.
Supported values of \[dq]WHEN\[dq] are the same as that of
--use-postprocessor (default: pre_process)
.TP
--xattrs
Write metadata to the video file\[aq]s xattrs (using dublin core and xdg
standards)
.TP
--concat-playlist \f[I]POLICY\f[R]
Concatenate videos in a playlist.
One of \[dq]never\[dq], \[dq]always\[dq], or \[dq]multi_video\[dq]
(default; only when the videos form a single show).
All the video files must have same codecs and number of streams to be
concatable.
The \[dq]pl_video:\[dq] prefix can be used with \[dq]--paths\[dq] and
\[dq]--output\[dq] to set the output filename for the concatenated
files.
See \[dq]OUTPUT TEMPLATE\[dq] for details
.TP
--fixup \f[I]POLICY\f[R]
Automatically correct known faults of the file.
One of never (do nothing), warn (only emit a warning), detect_or_warn
(the default; fix file if we can, warn otherwise), force (try fixing
even if file already exists)
.TP
--ffmpeg-location \f[I]PATH\f[R]
Location of the ffmpeg binary; either the path to the binary or its
containing directory
.TP
--exec \f[I][WHEN:]CMD\f[R]
Execute a command, optionally prefixed with when to execute it,
separated by a \[dq]:\[dq].
Supported values of \[dq]WHEN\[dq] are the same as that of
--use-postprocessor (default: after_move).
Same syntax as the output template can be used to pass any field as
arguments to the command.
If no fields are passed, %(filepath,_filename|)q is appended to the end
of the command.
This option can be used multiple times
.TP
--no-exec
Remove any previously defined --exec
.TP
--convert-subs \f[I]FORMAT\f[R]
Convert the subtitles to another format (currently supported: ass, lrc,
srt, vtt) (Alias: --convert-subtitles)
.TP
--convert-thumbnails \f[I]FORMAT\f[R]
Convert the thumbnails to another format (currently supported: jpg, png,
webp).
You can specify multiple rules using similar syntax as --remux-video
.TP
--split-chapters
Split video into multiple files based on internal chapters.
The \[dq]chapter:\[dq] prefix can be used with \[dq]--paths\[dq] and
\[dq]--output\[dq] to set the output filename for the split files.
See \[dq]OUTPUT TEMPLATE\[dq] for details
.TP
--no-split-chapters
Do not split video based on chapters (default)
.TP
--remove-chapters \f[I]REGEX\f[R]
Remove chapters whose title matches the given regular expression.
The syntax is the same as --download-sections.
This option can be used multiple times
.TP
--no-remove-chapters
Do not remove any chapters from the file (default)
.TP
--force-keyframes-at-cuts
Force keyframes at cuts when downloading/splitting/removing sections.
This is slow due to needing a re-encode, but the resulting video may
have fewer artifacts around the cuts
.TP
--no-force-keyframes-at-cuts
Do not force keyframes around the chapters when cutting/splitting
(default)
.TP
--use-postprocessor \f[I]NAME[:ARGS]\f[R]
The (case sensitive) name of plugin postprocessors to be enabled, and
(optionally) arguments to be passed to it, separated by a colon
\[dq]:\[dq].
ARGS are a semicolon \[dq];\[dq] delimited list of NAME=VALUE.
The \[dq]when\[dq] argument determines when the postprocessor is
invoked.
It can be one of \[dq]pre_process\[dq] (after video extraction),
\[dq]after_filter\[dq] (after video passes filter), \[dq]video\[dq]
(after --format; before --print/--output), \[dq]before_dl\[dq] (before
each video download), \[dq]post_process\[dq] (after each video download;
default), \[dq]after_move\[dq] (after moving video file to it\[aq]s
final locations), \[dq]after_video\[dq] (after downloading and
processing all formats of a video), or \[dq]playlist\[dq] (at end of
playlist).
This option can be used multiple times to add different postprocessors
.SS SponsorBlock Options:
.PP
Make chapter entries for, or remove various segments (sponsor,
introductions, etc.) from downloaded YouTube videos using the
SponsorBlock API (https://sponsor.ajay.app)
.TP
--sponsorblock-mark \f[I]CATS\f[R]
SponsorBlock categories to create chapters for, separated by commas.
Available categories are sponsor, intro, outro, selfpromo, preview,
filler, interaction, music_offtopic, poi_highlight, chapter, all and
default (=all).
You can prefix the category with a \[dq]-\[dq] to exclude it.
See [1] for description of the categories.
E.g.
--sponsorblock-mark all,-preview [1]
https://wiki.sponsor.ajay.app/w/Segment_Categories
.TP
--sponsorblock-remove \f[I]CATS\f[R]
SponsorBlock categories to be removed from the video file, separated by
commas.
If a category is present in both mark and remove, remove takes
precedence.
The syntax and available categories are the same as for
--sponsorblock-mark except that \[dq]default\[dq] refers to
\[dq]all,-filler\[dq] and poi_highlight, chapter are not available
.TP
--sponsorblock-chapter-title \f[I]TEMPLATE\f[R]
An output template for the title of the SponsorBlock chapters created by
--sponsorblock-mark.
The only available fields are start_time, end_time, category,
categories, name, category_names.
Defaults to \[dq][SponsorBlock]: %(category_names)l\[dq]
.TP
--no-sponsorblock
Disable both --sponsorblock-mark and --sponsorblock-remove
.TP
--sponsorblock-api \f[I]URL\f[R]
SponsorBlock API location, defaults to https://sponsor.ajay.app
.SS Extractor Options:
.TP
--extractor-retries \f[I]RETRIES\f[R]
Number of retries for known extractor errors (default is 3), or
\[dq]infinite\[dq]
.TP
--allow-dynamic-mpd
Process dynamic DASH manifests (default) (Alias:
--no-ignore-dynamic-mpd)
.TP
--ignore-dynamic-mpd
Do not process dynamic DASH manifests (Alias: --no-allow-dynamic-mpd)
.TP
--hls-split-discontinuity
Split HLS playlists to different formats at discontinuities such as ad
breaks
.TP
--no-hls-split-discontinuity
Do not split HLS playlists to different formats at discontinuities such
as ad breaks (default)
.TP
--extractor-args \f[I]IE_KEY:ARGS\f[R]
Pass ARGS arguments to the IE_KEY extractor.
See \[dq]EXTRACTOR ARGUMENTS\[dq] for details.
You can use this option multiple times to give arguments for different
extractors
.SH To update to nightly from stable executable/binary:
.PP
yt-dlp --update-to nightly
.SH To install nightly with pip:
.PP
python -m pip install -U --pre yt-dlp
.IP
.nf
\f[C]

**Note**: The manpages, shell completion (autocomplete) files etc. are available inside the [source tarball](https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.tar.gz)

## DEPENDENCIES
Python versions 3.8+ (CPython and PyPy) are supported. Other versions and implementations may or may not work correctly.

<!-- Python 3.5+ uses VC++14 and it is already embedded in the binary created
<!x-- https://www.microsoft.com/en-us/download/details.aspx?id=26999 --x>
On windows, [Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)](https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe) is also necessary to run yt-dlp. You probably already have this, but if the executable throws an error due to missing \[ga]MSVCR100.dll\[ga] you need to install it manually.
-->

While all the other dependencies are optional, \[ga]ffmpeg\[ga] and \[ga]ffprobe\[ga] are highly recommended

### Strongly recommended

* [**ffmpeg** and **ffprobe**](https://www.ffmpeg.org) - Required for [merging separate video and audio files](#format-selection) as well as for various [post-processing](#post-processing-options) tasks. License [depends on the build](https://www.ffmpeg.org/legal.html)

    There are bugs in ffmpeg that causes various issues when used alongside yt-dlp. Since ffmpeg is such an important dependency, we provide [custom builds](https://github.com/yt-dlp/FFmpeg-Builds#ffmpeg-static-auto-builds) with patches for some of these issues at [yt-dlp/FFmpeg-Builds](https://github.com/yt-dlp/FFmpeg-Builds). See [the readme](https://github.com/yt-dlp/FFmpeg-Builds#patches-applied) for details on the specific issues solved by these builds
    
    **Important**: What you need is ffmpeg *binary*, **NOT** [the python package of the same name](https://pypi.org/project/ffmpeg)

### Networking
* [**certifi**](https://github.com/certifi/python-certifi)\[rs]* - Provides Mozilla\[aq]s root certificate bundle. Licensed under [MPLv2](https://github.com/certifi/python-certifi/blob/master/LICENSE)
* [**brotli**](https://github.com/google/brotli)\[rs]* or [**brotlicffi**](https://github.com/python-hyper/brotlicffi) - [Brotli](https://en.wikipedia.org/wiki/Brotli) content encoding support. Both licensed under MIT <sup>[1](https://github.com/google/brotli/blob/master/LICENSE) [2](https://github.com/python-hyper/brotlicffi/blob/master/LICENSE) </sup>
* [**websockets**](https://github.com/aaugustin/websockets)\[rs]* - For downloading over websocket. Licensed under [BSD-3-Clause](https://github.com/aaugustin/websockets/blob/main/LICENSE)
* [**requests**](https://github.com/psf/requests)\[rs]* - HTTP library. For HTTPS proxy and persistent connections support. Licensed under [Apache-2.0](https://github.com/psf/requests/blob/main/LICENSE)

### Metadata

* [**mutagen**](https://github.com/quodlibet/mutagen)\[rs]* - For \[ga]--embed-thumbnail\[ga] in certain formats. Licensed under [GPLv2+](https://github.com/quodlibet/mutagen/blob/master/COPYING)
* [**AtomicParsley**](https://github.com/wez/atomicparsley) - For \[ga]--embed-thumbnail\[ga] in \[ga]mp4\[ga]/\[ga]m4a\[ga] files when \[ga]mutagen\[ga]/\[ga]ffmpeg\[ga] cannot. Licensed under [GPLv2+](https://github.com/wez/atomicparsley/blob/master/COPYING)
* [**xattr**](https://github.com/xattr/xattr), [**pyxattr**](https://github.com/iustin/pyxattr) or [**setfattr**](http://savannah.nongnu.org/projects/attr) - For writing xattr metadata (\[ga]--xattr\[ga]) on **Mac** and **BSD**. Licensed under [MIT](https://github.com/xattr/xattr/blob/master/LICENSE.txt), [LGPL2.1](https://github.com/iustin/pyxattr/blob/master/COPYING) and [GPLv2+](http://git.savannah.nongnu.org/cgit/attr.git/tree/doc/COPYING) respectively

### Misc

* [**pycryptodomex**](https://github.com/Legrandin/pycryptodome)\[rs]* - For decrypting AES-128 HLS streams and various other data. Licensed under [BSD-2-Clause](https://github.com/Legrandin/pycryptodome/blob/master/LICENSE.rst)
* [**phantomjs**](https://github.com/ariya/phantomjs) - Used in extractors where javascript needs to be run. Licensed under [BSD-3-Clause](https://github.com/ariya/phantomjs/blob/master/LICENSE.BSD)
* [**secretstorage**](https://github.com/mitya57/secretstorage)\[rs]* - For \[ga]--cookies-from-browser\[ga] to access the **Gnome** keyring while decrypting cookies of **Chromium**-based browsers on **Linux**. Licensed under [BSD-3-Clause](https://github.com/mitya57/secretstorage/blob/master/LICENSE)
* Any external downloader that you want to use with \[ga]--downloader\[ga]

### Deprecated

* [**avconv** and **avprobe**](https://www.libav.org) - Now **deprecated** alternative to ffmpeg. License [depends on the build](https://libav.org/legal)
* [**sponskrub**](https://github.com/faissaloo/SponSkrub) - For using the now **deprecated** [sponskrub options](#sponskrub-options). Licensed under [GPLv3+](https://github.com/faissaloo/SponSkrub/blob/master/LICENCE.md)
* [**rtmpdump**](http://rtmpdump.mplayerhq.hu) - For downloading \[ga]rtmp\[ga] streams. ffmpeg can be used instead with \[ga]--downloader ffmpeg\[ga]. Licensed under [GPLv2+](http://rtmpdump.mplayerhq.hu)
* [**mplayer**](http://mplayerhq.hu/design7/info.html) or [**mpv**](https://mpv.io) - For downloading \[ga]rstp\[ga]/\[ga]mms\[ga] streams. ffmpeg can be used instead with \[ga]--downloader ffmpeg\[ga]. Licensed under [GPLv2+](https://github.com/mpv-player/mpv/blob/master/Copyright)

To use or redistribute the dependencies, you must agree to their respective licensing terms.

The standalone release binaries are built with the Python interpreter and the packages marked with **\[rs]*** included.

If you do not have the necessary dependencies for a task you are attempting, yt-dlp will warn you. All the currently available dependencies are visible at the top of the \[ga]--verbose\[ga] output


## COMPILE

### Standalone PyInstaller Builds
To build the standalone executable, you must have Python and \[ga]pyinstaller\[ga] (plus any of yt-dlp\[aq]s [optional dependencies](#dependencies) if needed). Once you have all the necessary dependencies installed, simply run \[ga]pyinst.py\[ga]. The executable will be built for the same architecture (x86/ARM, 32/64 bit) as the Python used.

    python3 -m pip install -U pyinstaller -r requirements.txt
    python3 devscripts/make_lazy_extractors.py
    python3 pyinst.py

On some systems, you may need to use \[ga]py\[ga] or \[ga]python\[ga] instead of \[ga]python3\[ga].

\[ga]pyinst.py\[ga] accepts any arguments that can be passed to \[ga]pyinstaller\[ga], such as \[ga]--onefile/-F\[ga] or \[ga]--onedir/-D\[ga], which is further [documented here](https://pyinstaller.org/en/stable/usage.html#what-to-generate).

**Note**: Pyinstaller versions below 4.4 [do not support](https://github.com/pyinstaller/pyinstaller#requirements-and-tested-platforms) Python installed from the Windows store without using a virtual environment.

**Important**: Running \[ga]pyinstaller\[ga] directly **without** using \[ga]pyinst.py\[ga] is **not** officially supported. This may or may not work correctly.

### Platform-independent Binary (UNIX)
You will need the build tools \[ga]python\[ga] (3.8+), \[ga]zip\[ga], \[ga]make\[ga] (GNU), \[ga]pandoc\[ga]\[rs]* and \[ga]pytest\[ga]\[rs]*.

After installing these, simply run \[ga]make\[ga].

You can also run \[ga]make yt-dlp\[ga] instead to compile only the binary without updating any of the additional files. (The build tools marked with **\[rs]*** are not needed for this)

### Standalone Py2Exe Builds (Windows)

While we provide the option to build with [py2exe](https://www.py2exe.org), it is recommended to build [using PyInstaller](#standalone-pyinstaller-builds) instead since the py2exe builds **cannot contain \[ga]pycryptodomex\[ga]/\[ga]certifi\[ga] and needs VC++14** on the target computer to run.

If you wish to build it anyway, install Python and py2exe, and then simply run \[ga]setup.py py2exe\[ga]

    py -m pip install -U py2exe -r requirements.txt
    py devscripts/make_lazy_extractors.py
    py setup.py py2exe

### Related scripts

* **\[ga]devscripts/update-version.py\[ga]** - Update the version number based on current date.
* **\[ga]devscripts/set-variant.py\[ga]** - Set the build variant of the executable.
* **\[ga]devscripts/make_changelog.py\[ga]** - Create a markdown changelog using short commit messages and update \[ga]CONTRIBUTORS\[ga] file.
* **\[ga]devscripts/make_lazy_extractors.py\[ga]** - Create lazy extractors. Running this before building the binaries (any variant) will improve their startup performance. Set the environment variable \[ga]YTDLP_NO_LAZY_EXTRACTORS=1\[ga] if you wish to forcefully disable lazy extractor loading.

Note: See their \[ga]--help\[ga] for more info.

### Forking the project
If you fork the project on GitHub, you can run your fork\[aq]s [build workflow](.github/workflows/build.yml) to automatically build the selected version(s) as artifacts. Alternatively, you can run the [release workflow](.github/workflows/release.yml) or enable the [nightly workflow](.github/workflows/release-nightly.yml) to create full (pre-)releases.

# CONFIGURATION

You can configure yt-dlp by placing any supported command line option to a configuration file. The configuration is loaded from the following locations:

1. **Main Configuration**:
    * The file given by \[ga]--config-location\[ga]
1. **Portable Configuration**: (Recommended for portable installations)
    * If using a binary, \[ga]yt-dlp.conf\[ga] in the same directory as the binary
    * If running from source-code, \[ga]yt-dlp.conf\[ga] in the parent directory of \[ga]yt_dlp\[ga]
1. **Home Configuration**:
    * \[ga]yt-dlp.conf\[ga] in the home path given by \[ga]-P\[ga]
    * If \[ga]-P\[ga] is not given, the current directory is searched
1. **User Configuration**:
    * \[ga]${XDG_CONFIG_HOME}/yt-dlp.conf\[ga]
    * \[ga]${XDG_CONFIG_HOME}/yt-dlp/config\[ga] (recommended on Linux/macOS)
    * \[ga]${XDG_CONFIG_HOME}/yt-dlp/config.txt\[ga]
    * \[ga]${APPDATA}/yt-dlp.conf\[ga]
    * \[ga]${APPDATA}/yt-dlp/config\[ga] (recommended on Windows)
    * \[ga]${APPDATA}/yt-dlp/config.txt\[ga]
    * \[ga]\[ti]/yt-dlp.conf\[ga]
    * \[ga]\[ti]/yt-dlp.conf.txt\[ga]
    * \[ga]\[ti]/.yt-dlp/config\[ga]
    * \[ga]\[ti]/.yt-dlp/config.txt\[ga]

    See also: [Notes about environment variables](#notes-about-environment-variables)
1. **System Configuration**:
    * \[ga]/etc/yt-dlp.conf\[ga]
    * \[ga]/etc/yt-dlp/config\[ga]
    * \[ga]/etc/yt-dlp/config.txt\[ga]

E.g. with the following configuration file yt-dlp will always extract the audio, not copy the mtime, use a proxy and save all videos under \[ga]YouTube\[ga] directory in your home directory:
\f[R]
.fi
.SH Lines starting with # are comments
.SH Always extract audio
.PP
-x
.SH Do not copy the mtime
.PP
--no-mtime
.SH Use this proxy
.PP
--proxy 127.0.0.1:3128
.SH Save all videos under YouTube directory in your home directory
.PP
-o \[ti]/YouTube/%(title)s.%(ext)s
.IP
.nf
\f[C]
**Note**: Options in configuration file are just the same options aka switches used in regular command line calls; thus there **must be no whitespace** after \[ga]-\[ga] or \[ga]--\[ga], e.g. \[ga]-o\[ga] or \[ga]--proxy\[ga] but not \[ga]- o\[ga] or \[ga]-- proxy\[ga]. They must also be quoted when necessary as-if it were a UNIX shell.

You can use \[ga]--ignore-config\[ga] if you want to disable all configuration files for a particular yt-dlp run. If \[ga]--ignore-config\[ga] is found inside any configuration file, no further configuration will be loaded. For example, having the option in the portable configuration file prevents loading of home, user, and system configurations. Additionally, (for backward compatibility) if \[ga]--ignore-config\[ga] is found inside the system configuration file, the user configuration is not loaded.

### Configuration file encoding

The configuration files are decoded according to the UTF BOM if present, and in the encoding from system locale otherwise.

If you want your file to be decoded differently, add \[ga]# coding: ENCODING\[ga] to the beginning of the file (e.g. \[ga]# coding: shift-jis\[ga]). There must be no characters before that, even spaces or BOM.

### Authentication with netrc

You may also want to configure automatic credentials storage for extractors that support authentication (by providing login and password with \[ga]--username\[ga] and \[ga]--password\[ga]) in order not to pass credentials as command line arguments on every yt-dlp execution and prevent tracking plain text passwords in the shell command history. You can achieve this using a [\[ga].netrc\[ga] file](https://stackoverflow.com/tags/.netrc/info) on a per-extractor basis. For that you will need to create a \[ga].netrc\[ga] file in \[ga]--netrc-location\[ga] and restrict permissions to read/write by only you:
\f[R]
.fi
.PP
touch ${HOME}/.netrc chmod a-rwx,u+rw ${HOME}/.netrc
.IP
.nf
\f[C]
After that you can add credentials for an extractor in the following format, where *extractor* is the name of the extractor in lowercase:
\f[R]
.fi
.PP
machine login password
.IP
.nf
\f[C]
E.g.
\f[R]
.fi
.PP
machine youtube login myaccount\[at]gmail.com password
my_youtube_password machine twitch login my_twitch_account_name password
my_twitch_password
.IP
.nf
\f[C]
To activate authentication with the \[ga].netrc\[ga] file you should pass \[ga]--netrc\[ga] to yt-dlp or place it in the [configuration file](#configuration).

The default location of the .netrc file is \[ga]\[ti]\[ga] (see below).

As an alternative to using the \[ga].netrc\[ga] file, which has the disadvantage of keeping your passwords in a plain text file, you can configure a custom shell command to provide the credentials for an extractor. This is done by providing the \[ga]--netrc-cmd\[ga] parameter, it shall output the credentials in the netrc format and return \[ga]0\[ga] on success, other values will be treated as an error. \[ga]{}\[ga] in the command will be replaced by the name of the extractor to make it possible to select the credentials for the right extractor.

E.g. To use an encrypted \[ga].netrc\[ga] file stored as \[ga].authinfo.gpg\[ga]
\f[R]
.fi
.PP
yt-dlp --netrc-cmd \[aq]gpg --decrypt \[ti]/.authinfo.gpg\[aq]
https://www.youtube.com/watch?v=BaW_jenozKc
.IP
.nf
\f[C]

### Notes about environment variables
* Environment variables are normally specified as \[ga]${VARIABLE}\[ga]/\[ga]$VARIABLE\[ga] on UNIX and \[ga]%VARIABLE%\[ga] on Windows; but is always shown as \[ga]${VARIABLE}\[ga] in this documentation
* yt-dlp also allow using UNIX-style variables on Windows for path-like options; e.g. \[ga]--output\[ga], \[ga]--config-location\[ga]
* If unset, \[ga]${XDG_CONFIG_HOME}\[ga] defaults to \[ga]\[ti]/.config\[ga] and \[ga]${XDG_CACHE_HOME}\[ga] to \[ga]\[ti]/.cache\[ga]
* On Windows, \[ga]\[ti]\[ga] points to \[ga]${HOME}\[ga] if present; or, \[ga]${USERPROFILE}\[ga] or \[ga]${HOMEDRIVE}${HOMEPATH}\[ga] otherwise
* On Windows, \[ga]${USERPROFILE}\[ga] generally points to \[ga]C:\[rs]Users\[rs]<user name>\[ga] and \[ga]${APPDATA}\[ga] to \[ga]${USERPROFILE}\[rs]AppData\[rs]Roaming\[ga]

# OUTPUT TEMPLATE

The \[ga]-o\[ga] option is used to indicate a template for the output file names while \[ga]-P\[ga] option is used to specify the path each type of file should be saved to.


The simplest usage of \[ga]-o\[ga] is not to set any template arguments when downloading a single file, like in \[ga]yt-dlp -o funny_video.flv \[dq]https://some/video\[dq]\[ga] (hard-coding file extension like this is _not_ recommended and could break some post-processing).

It may however also contain special sequences that will be replaced when downloading each video. The special sequences may be formatted according to [Python string formatting operations](https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting), e.g. \[ga]%(NAME)s\[ga] or \[ga]%(NAME)05d\[ga]. To clarify, that is a percent symbol followed by a name in parentheses, followed by formatting operations.

The field names themselves (the part inside the parenthesis) can also have some special formatting:

1. **Object traversal**: The dictionaries and lists available in metadata can be traversed by using a dot \[ga].\[ga] separator; e.g. \[ga]%(tags.0)s\[ga], \[ga]%(subtitles.en.-1.ext)s\[ga]. You can do Python slicing with colon \[ga]:\[ga]; E.g. \[ga]%(id.3:7:-1)s\[ga], \[ga]%(formats.:.format_id)s\[ga]. Curly braces \[ga]{}\[ga] can be used to build dictionaries with only specific keys; e.g. \[ga]%(formats.:.{format_id,height})#j\[ga]. An empty field name \[ga]%()s\[ga] refers to the entire infodict; e.g. \[ga]%(.{id,title})s\[ga]. Note that all the fields that become available using this method are not listed below. Use \[ga]-j\[ga] to see such fields

1. **Arithmetic**: Simple arithmetic can be done on numeric fields using \[ga]+\[ga], \[ga]-\[ga] and \[ga]*\[ga]. E.g. \[ga]%(playlist_index+10)03d\[ga], \[ga]%(n_entries+1-playlist_index)d\[ga]

1. **Date/time Formatting**: Date/time fields can be formatted according to [strftime formatting](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) by specifying it separated from the field name using a \[ga]>\[ga]. E.g. \[ga]%(duration>%H-%M-%S)s\[ga], \[ga]%(upload_date>%Y-%m-%d)s\[ga], \[ga]%(epoch-3600>%H-%M-%S)s\[ga]

1. **Alternatives**: Alternate fields can be specified separated with a \[ga],\[ga]. E.g. \[ga]%(release_date>%Y,upload_date>%Y|Unknown)s\[ga]

1. **Replacement**: A replacement value can be specified using a \[ga]&\[ga] separator according to the [\[ga]str.format\[ga] mini-language](https://docs.python.org/3/library/string.html#format-specification-mini-language). If the field is *not* empty, this replacement value will be used instead of the actual field content. This is done after alternate fields are considered; thus the replacement is used if *any* of the alternative fields is *not* empty. E.g. \[ga]%(chapters&has chapters|no chapters)s\[ga], \[ga]%(title&TITLE={:>20}|NO TITLE)s\[ga]

1. **Default**: A literal default value can be specified for when the field is empty using a \[ga]|\[ga] separator. This overrides \[ga]--output-na-placeholder\[ga]. E.g. \[ga]%(uploader|Unknown)s\[ga]

1. **More Conversions**: In addition to the normal format types \[ga]diouxXeEfFgGcrs\[ga], yt-dlp additionally supports converting to \[ga]B\[ga] = **B**ytes, \[ga]j\[ga] = **j**son (flag \[ga]#\[ga] for pretty-printing, \[ga]+\[ga] for Unicode), \[ga]h\[ga] = HTML escaping, \[ga]l\[ga] = a comma separated **l**ist (flag \[ga]#\[ga] for \[ga]\[rs]n\[ga] newline-separated), \[ga]q\[ga] = a string **q**uoted for the terminal (flag \[ga]#\[ga] to split a list into different arguments), \[ga]D\[ga] = add **D**ecimal suffixes (e.g. 10M) (flag \[ga]#\[ga] to use 1024 as factor), and \[ga]S\[ga] = **S**anitize as filename (flag \[ga]#\[ga] for restricted)

1. **Unicode normalization**: The format type \[ga]U\[ga] can be used for NFC [Unicode normalization](https://docs.python.org/3/library/unicodedata.html#unicodedata.normalize). The alternate form flag (\[ga]#\[ga]) changes the normalization to NFD and the conversion flag \[ga]+\[ga] can be used for NFKC/NFKD compatibility equivalence normalization. E.g. \[ga]%(title)+.100U\[ga] is NFKC

To summarize, the general syntax for a field is:
\f[R]
.fi
.PP
%(name[.keys][addition][>strf][,alternate][&replacement][|default])[flags][width][.precision][length]type
.IP
.nf
\f[C]
Additionally, you can set different output templates for the various metadata files separately from the general output template by specifying the type of file followed by the template separated by a colon \[ga]:\[ga]. The different file types supported are \[ga]subtitle\[ga], \[ga]thumbnail\[ga], \[ga]description\[ga], \[ga]annotation\[ga] (deprecated), \[ga]infojson\[ga], \[ga]link\[ga], \[ga]pl_thumbnail\[ga], \[ga]pl_description\[ga], \[ga]pl_infojson\[ga], \[ga]chapter\[ga], \[ga]pl_video\[ga]. E.g. \[ga]-o \[dq]%(title)s.%(ext)s\[dq] -o \[dq]thumbnail:%(title)s\[rs]%(title)s.%(ext)s\[dq]\[ga]  will put the thumbnails in a folder with the same name as the video. If any of the templates is empty, that type of file will not be written. E.g. \[ga]--write-thumbnail -o \[dq]thumbnail:\[dq]\[ga] will write thumbnails only for playlists and not for video.

<a id=\[dq]outtmpl-postprocess-note\[dq]/>

**Note**: Due to post-processing (i.e. merging etc.), the actual output filename might differ. Use \[ga]--print after_move:filepath\[ga] to get the name after all post-processing is complete.

The available fields are:

 - \[ga]id\[ga] (string): Video identifier
 - \[ga]title\[ga] (string): Video title
 - \[ga]fulltitle\[ga] (string): Video title ignoring live timestamp and generic title
 - \[ga]ext\[ga] (string): Video filename extension
 - \[ga]alt_title\[ga] (string): A secondary title of the video
 - \[ga]description\[ga] (string): The description of the video
 - \[ga]display_id\[ga] (string): An alternative identifier for the video
 - \[ga]uploader\[ga] (string): Full name of the video uploader
 - \[ga]license\[ga] (string): License name the video is licensed under
 - \[ga]creator\[ga] (string): The creator of the video
 - \[ga]timestamp\[ga] (numeric): UNIX timestamp of the moment the video became available
 - \[ga]upload_date\[ga] (string): Video upload date in UTC (YYYYMMDD)
 - \[ga]release_timestamp\[ga] (numeric): UNIX timestamp of the moment the video was released
 - \[ga]release_date\[ga] (string): The date (YYYYMMDD) when the video was released in UTC
 - \[ga]release_year\[ga] (numeric): Year (YYYY) when the video or album was released
 - \[ga]modified_timestamp\[ga] (numeric): UNIX timestamp of the moment the video was last modified
 - \[ga]modified_date\[ga] (string): The date (YYYYMMDD) when the video was last modified in UTC
 - \[ga]uploader_id\[ga] (string): Nickname or id of the video uploader
 - \[ga]channel\[ga] (string): Full name of the channel the video is uploaded on
 - \[ga]channel_id\[ga] (string): Id of the channel
 - \[ga]channel_follower_count\[ga] (numeric): Number of followers of the channel
 - \[ga]channel_is_verified\[ga] (boolean): Whether the channel is verified on the platform
 - \[ga]location\[ga] (string): Physical location where the video was filmed
 - \[ga]duration\[ga] (numeric): Length of the video in seconds
 - \[ga]duration_string\[ga] (string): Length of the video (HH:mm:ss)
 - \[ga]view_count\[ga] (numeric): How many users have watched the video on the platform
 - \[ga]concurrent_view_count\[ga] (numeric): How many users are currently watching the video on the platform.
 - \[ga]like_count\[ga] (numeric): Number of positive ratings of the video
 - \[ga]dislike_count\[ga] (numeric): Number of negative ratings of the video
 - \[ga]repost_count\[ga] (numeric): Number of reposts of the video
 - \[ga]average_rating\[ga] (numeric): Average rating give by users, the scale used depends on the webpage
 - \[ga]comment_count\[ga] (numeric): Number of comments on the video (For some extractors, comments are only downloaded at the end, and so this field cannot be used)
 - \[ga]age_limit\[ga] (numeric): Age restriction for the video (years)
 - \[ga]live_status\[ga] (string): One of \[dq]not_live\[dq], \[dq]is_live\[dq], \[dq]is_upcoming\[dq], \[dq]was_live\[dq], \[dq]post_live\[dq] (was live, but VOD is not yet processed)
 - \[ga]is_live\[ga] (boolean): Whether this video is a live stream or a fixed-length video
 - \[ga]was_live\[ga] (boolean): Whether this video was originally a live stream
 - \[ga]playable_in_embed\[ga] (string): Whether this video is allowed to play in embedded players on other sites
 - \[ga]availability\[ga] (string): Whether the video is \[dq]private\[dq], \[dq]premium_only\[dq], \[dq]subscriber_only\[dq], \[dq]needs_auth\[dq], \[dq]unlisted\[dq] or \[dq]public\[dq]
 - \[ga]media_type\[ga] (string): The type of media as classified by the site, e.g. \[dq]episode\[dq], \[dq]clip\[dq], \[dq]trailer\[dq]
 - \[ga]start_time\[ga] (numeric): Time in seconds where the reproduction should start, as specified in the URL
 - \[ga]end_time\[ga] (numeric): Time in seconds where the reproduction should end, as specified in the URL
 - \[ga]extractor\[ga] (string): Name of the extractor
 - \[ga]extractor_key\[ga] (string): Key name of the extractor
 - \[ga]epoch\[ga] (numeric): Unix epoch of when the information extraction was completed
 - \[ga]autonumber\[ga] (numeric): Number that will be increased with each download, starting at \[ga]--autonumber-start\[ga], padded with leading zeros to 5 digits
 - \[ga]video_autonumber\[ga] (numeric): Number that will be increased with each video
 - \[ga]n_entries\[ga] (numeric): Total number of extracted items in the playlist
 - \[ga]playlist_id\[ga] (string): Identifier of the playlist that contains the video
 - \[ga]playlist_title\[ga] (string): Name of the playlist that contains the video
 - \[ga]playlist\[ga] (string): \[ga]playlist_id\[ga] or \[ga]playlist_title\[ga]
 - \[ga]playlist_count\[ga] (numeric): Total number of items in the playlist. May not be known if entire playlist is not extracted
 - \[ga]playlist_index\[ga] (numeric): Index of the video in the playlist padded with leading zeros according the final index
 - \[ga]playlist_autonumber\[ga] (numeric): Position of the video in the playlist download queue padded with leading zeros according to the total length of the playlist
 - \[ga]playlist_uploader\[ga] (string): Full name of the playlist uploader
 - \[ga]playlist_uploader_id\[ga] (string): Nickname or id of the playlist uploader
 - \[ga]webpage_url\[ga] (string): A URL to the video webpage which if given to yt-dlp should allow to get the same result again
 - \[ga]webpage_url_basename\[ga] (string): The basename of the webpage URL
 - \[ga]webpage_url_domain\[ga] (string): The domain of the webpage URL
 - \[ga]original_url\[ga] (string): The URL given by the user (or same as \[ga]webpage_url\[ga] for playlist entries)
 
All the fields in [Filtering Formats](#filtering-formats) can also be used

Available for the video that belongs to some logical chapter or section:

 - \[ga]chapter\[ga] (string): Name or title of the chapter the video belongs to
 - \[ga]chapter_number\[ga] (numeric): Number of the chapter the video belongs to
 - \[ga]chapter_id\[ga] (string): Id of the chapter the video belongs to

Available for the video that is an episode of some series or programme:

 - \[ga]series\[ga] (string): Title of the series or programme the video episode belongs to
 - \[ga]season\[ga] (string): Title of the season the video episode belongs to
 - \[ga]season_number\[ga] (numeric): Number of the season the video episode belongs to
 - \[ga]season_id\[ga] (string): Id of the season the video episode belongs to
 - \[ga]episode\[ga] (string): Title of the video episode
 - \[ga]episode_number\[ga] (numeric): Number of the video episode within a season
 - \[ga]episode_id\[ga] (string): Id of the video episode

Available for the media that is a track or a part of a music album:

 - \[ga]track\[ga] (string): Title of the track
 - \[ga]track_number\[ga] (numeric): Number of the track within an album or a disc
 - \[ga]track_id\[ga] (string): Id of the track
 - \[ga]artist\[ga] (string): Artist(s) of the track
 - \[ga]genre\[ga] (string): Genre(s) of the track
 - \[ga]album\[ga] (string): Title of the album the track belongs to
 - \[ga]album_type\[ga] (string): Type of the album
 - \[ga]album_artist\[ga] (string): List of all artists appeared on the album
 - \[ga]disc_number\[ga] (numeric): Number of the disc or other physical medium the track belongs to

Available only when using \[ga]--download-sections\[ga] and for \[ga]chapter:\[ga] prefix when using \[ga]--split-chapters\[ga] for videos with internal chapters:

 - \[ga]section_title\[ga] (string): Title of the chapter
 - \[ga]section_number\[ga] (numeric): Number of the chapter within the file
 - \[ga]section_start\[ga] (numeric): Start time of the chapter in seconds
 - \[ga]section_end\[ga] (numeric): End time of the chapter in seconds

Available only when used in \[ga]--print\[ga]:

 - \[ga]urls\[ga] (string): The URLs of all requested formats, one in each line
 - \[ga]filename\[ga] (string): Name of the video file. Note that the [actual filename may differ](#outtmpl-postprocess-note)
 - \[ga]formats_table\[ga] (table): The video format table as printed by \[ga]--list-formats\[ga]
 - \[ga]thumbnails_table\[ga] (table): The thumbnail format table as printed by \[ga]--list-thumbnails\[ga]
 - \[ga]subtitles_table\[ga] (table): The subtitle format table as printed by \[ga]--list-subs\[ga]
 - \[ga]automatic_captions_table\[ga] (table): The automatic subtitle format table as printed by \[ga]--list-subs\[ga]
 
 Available only after the video is downloaded (\[ga]post_process\[ga]/\[ga]after_move\[ga]):
 
 - \[ga]filepath\[ga]: Actual path of downloaded video file

Available only in \[ga]--sponsorblock-chapter-title\[ga]:

 - \[ga]start_time\[ga] (numeric): Start time of the chapter in seconds
 - \[ga]end_time\[ga] (numeric): End time of the chapter in seconds
 - \[ga]categories\[ga] (list): The [SponsorBlock categories](https://wiki.sponsor.ajay.app/w/Types#Category) the chapter belongs to
 - \[ga]category\[ga] (string): The smallest SponsorBlock category the chapter belongs to
 - \[ga]category_names\[ga] (list): Friendly names of the categories
 - \[ga]name\[ga] (string): Friendly name of the smallest category
 - \[ga]type\[ga] (string): The [SponsorBlock action type](https://wiki.sponsor.ajay.app/w/Types#Action_Type) of the chapter

Each aforementioned sequence when referenced in an output template will be replaced by the actual value corresponding to the sequence name. E.g. for \[ga]-o %(title)s-%(id)s.%(ext)s\[ga] and an mp4 video with title \[ga]yt-dlp test video\[ga] and id \[ga]BaW_jenozKc\[ga], this will result in a \[ga]yt-dlp test video-BaW_jenozKc.mp4\[ga] file created in the current directory.

**Note**: Some of the sequences are not guaranteed to be present since they depend on the metadata obtained by a particular extractor. Such sequences will be replaced with placeholder value provided with \[ga]--output-na-placeholder\[ga] (\[ga]NA\[ga] by default).

**Tip**: Look at the \[ga]-j\[ga] output to identify which fields are available for the particular URL

For numeric sequences you can use [numeric related formatting](https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting); e.g. \[ga]%(view_count)05d\[ga] will result in a string with view count padded with zeros up to 5 characters, like in \[ga]00042\[ga].

Output templates can also contain arbitrary hierarchical path, e.g. \[ga]-o \[dq]%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s\[dq]\[ga] which will result in downloading each video in a directory corresponding to this path template. Any missing directory will be automatically created for you.

To use percent literals in an output template use \[ga]%%\[ga]. To output to stdout use \[ga]-o -\[ga].

The current default template is \[ga]%(title)s [%(id)s].%(ext)s\[ga].

In some cases, you don\[aq]t want special characters such as \[u4E2D], spaces, or &, such as when transferring the downloaded filename to a Windows system or the filename through an 8bit-unsafe channel. In these cases, add the \[ga]--restrict-filenames\[ga] flag to get a shorter title.

#### Output template examples

\[ga]\[ga]\[ga]bash
$ yt-dlp --print filename -o \[dq]test video.%(ext)s\[dq] BaW_jenozKc
test video.webm    # Literal name with correct extension

$ yt-dlp --print filename -o \[dq]%(title)s.%(ext)s\[dq] BaW_jenozKc
youtube-dl test video \[aq]\[aq]_\[:a]\[u21AD]\[u1D550].webm    # All kinds of weird characters

$ yt-dlp --print filename -o \[dq]%(title)s.%(ext)s\[dq] BaW_jenozKc --restrict-filenames
youtube-dl_test_video_.webm    # Restricted file name

# Download YouTube playlist videos in separate directory indexed by video order in a playlist
$ yt-dlp -o \[dq]%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s\[dq] \[dq]https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re\[dq]

# Download YouTube playlist videos in separate directories according to their uploaded year
$ yt-dlp -o \[dq]%(upload_date>%Y)s/%(title)s.%(ext)s\[dq] \[dq]https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re\[dq]

# Prefix playlist index with \[dq] - \[dq] separator, but only if it is available
$ yt-dlp -o \[dq]%(playlist_index&{} - |)s%(title)s.%(ext)s\[dq] BaW_jenozKc \[dq]https://www.youtube.com/user/TheLinuxFoundation/playlists\[dq]

# Download all playlists of YouTube channel/user keeping each playlist in separate directory:
$ yt-dlp -o \[dq]%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s\[dq] \[dq]https://www.youtube.com/user/TheLinuxFoundation/playlists\[dq]

# Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home
$ yt-dlp -u user -p password -P \[dq]\[ti]/MyVideos\[dq] -o \[dq]%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s\[dq] \[dq]https://www.udemy.com/java-tutorial\[dq]

# Download entire series season keeping each series and each season in separate directory under C:/MyVideos
$ yt-dlp -P \[dq]C:/MyVideos\[dq] -o \[dq]%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s\[dq] \[dq]https://videomore.ru/kino_v_detalayah/5_sezon/367617\[dq]

# Download video as \[dq]C:\[rs]MyVideos\[rs]uploader\[rs]title.ext\[dq], subtitles as \[dq]C:\[rs]MyVideos\[rs]subs\[rs]uploader\[rs]title.ext\[dq]
# and put all temporary files in \[dq]C:\[rs]MyVideos\[rs]tmp\[dq]
$ yt-dlp -P \[dq]C:/MyVideos\[dq] -P \[dq]temp:tmp\[dq] -P \[dq]subtitle:subs\[dq] -o \[dq]%(uploader)s/%(title)s.%(ext)s\[dq] BaW_jenoz --write-subs

# Download video as \[dq]C:\[rs]MyVideos\[rs]uploader\[rs]title.ext\[dq] and subtitles as \[dq]C:\[rs]MyVideos\[rs]uploader\[rs]subs\[rs]title.ext\[dq]
$ yt-dlp -P \[dq]C:/MyVideos\[dq] -o \[dq]%(uploader)s/%(title)s.%(ext)s\[dq] -o \[dq]subtitle:%(uploader)s/subs/%(title)s.%(ext)s\[dq] BaW_jenozKc --write-subs

# Stream the video being downloaded to stdout
$ yt-dlp -o - BaW_jenozKc
\f[R]
.fi
.SH FORMAT SELECTION
.PP
By default, yt-dlp tries to download the best available quality if you
\f[B]don\[aq]t\f[R] pass any options.
This is generally equivalent to using
\f[C]-f bestvideo*+bestaudio/best\f[R].
However, if multiple audiostreams is enabled
(\f[C]--audio-multistreams\f[R]), the default format changes to
\f[C]-f bestvideo+bestaudio/best\f[R].
Similarly, if ffmpeg is unavailable, or if you use yt-dlp to stream to
\f[C]stdout\f[R] (\f[C]-o -\f[R]), the default becomes
\f[C]-f best/bestvideo+bestaudio\f[R].
.PP
\f[B]Deprecation warning\f[R]: Latest versions of yt-dlp can stream
multiple formats to the stdout simultaneously using ffmpeg.
So, in future versions, the default for this will be set to
\f[C]-f bv*+ba/b\f[R] similar to normal downloads.
If you want to preserve the \f[C]-f b/bv+ba\f[R] setting, it is
recommended to explicitly specify it in the configuration options.
.PP
The general syntax for format selection is \f[C]-f FORMAT\f[R] (or
\f[C]--format FORMAT\f[R]) where \f[C]FORMAT\f[R] is a \f[I]selector
expression\f[R], i.e.
an expression that describes format or formats you would like to
download.
.PP
The simplest case is requesting a specific format; e.g.
with \f[C]-f 22\f[R] you can download the format with format code equal
to 22.
You can get the list of available format codes for particular video
using \f[C]--list-formats\f[R] or \f[C]-F\f[R].
Note that these format codes are extractor specific.
.PP
You can also use a file extension (currently \f[C]3gp\f[R],
\f[C]aac\f[R], \f[C]flv\f[R], \f[C]m4a\f[R], \f[C]mp3\f[R],
\f[C]mp4\f[R], \f[C]ogg\f[R], \f[C]wav\f[R], \f[C]webm\f[R] are
supported) to download the best quality format of a particular file
extension served as a single file, e.g.
\f[C]-f webm\f[R] will download the best quality format with the
\f[C]webm\f[R] extension served as a single file.
.PP
You can use \f[C]-f -\f[R] to interactively provide the format selector
\f[I]for each video\f[R]
.PP
You can also use special names to select particular edge case formats:
.IP \[bu] 2
\f[C]all\f[R]: Select \f[B]all formats\f[R] separately
.IP \[bu] 2
\f[C]mergeall\f[R]: Select and \f[B]merge all formats\f[R] (Must be used
with \f[C]--audio-multistreams\f[R], \f[C]--video-multistreams\f[R] or
both)
.IP \[bu] 2
\f[C]b*\f[R], \f[C]best*\f[R]: Select the best quality format that
\f[B]contains either\f[R] a video or an audio or both (ie;
\f[C]vcodec!=none or acodec!=none\f[R])
.IP \[bu] 2
\f[C]b\f[R], \f[C]best\f[R]: Select the best quality format that
\f[B]contains both\f[R] video and audio.
Equivalent to \f[C]best*[vcodec!=none][acodec!=none]\f[R]
.IP \[bu] 2
\f[C]bv\f[R], \f[C]bestvideo\f[R]: Select the best quality
\f[B]video-only\f[R] format.
Equivalent to \f[C]best*[acodec=none]\f[R]
.IP \[bu] 2
\f[C]bv*\f[R], \f[C]bestvideo*\f[R]: Select the best quality format that
\f[B]contains video\f[R].
It may also contain audio.
Equivalent to \f[C]best*[vcodec!=none]\f[R]
.IP \[bu] 2
\f[C]ba\f[R], \f[C]bestaudio\f[R]: Select the best quality
\f[B]audio-only\f[R] format.
Equivalent to \f[C]best*[vcodec=none]\f[R]
.IP \[bu] 2
\f[C]ba*\f[R], \f[C]bestaudio*\f[R]: Select the best quality format that
\f[B]contains audio\f[R].
It may also contain video.
Equivalent to \f[C]best*[acodec!=none]\f[R] (Do not
use! (https://github.com/yt-dlp/yt-dlp/issues/979#issuecomment-919629354))
.IP \[bu] 2
\f[C]w*\f[R], \f[C]worst*\f[R]: Select the worst quality format that
contains either a video or an audio
.IP \[bu] 2
\f[C]w\f[R], \f[C]worst\f[R]: Select the worst quality format that
contains both video and audio.
Equivalent to \f[C]worst*[vcodec!=none][acodec!=none]\f[R]
.IP \[bu] 2
\f[C]wv\f[R], \f[C]worstvideo\f[R]: Select the worst quality video-only
format.
Equivalent to \f[C]worst*[acodec=none]\f[R]
.IP \[bu] 2
\f[C]wv*\f[R], \f[C]worstvideo*\f[R]: Select the worst quality format
that contains video.
It may also contain audio.
Equivalent to \f[C]worst*[vcodec!=none]\f[R]
.IP \[bu] 2
\f[C]wa\f[R], \f[C]worstaudio\f[R]: Select the worst quality audio-only
format.
Equivalent to \f[C]worst*[vcodec=none]\f[R]
.IP \[bu] 2
\f[C]wa*\f[R], \f[C]worstaudio*\f[R]: Select the worst quality format
that contains audio.
It may also contain video.
Equivalent to \f[C]worst*[acodec!=none]\f[R]
.PP
For example, to download the worst quality video-only format you can use
\f[C]-f worstvideo\f[R].
It is however recommended not to use \f[C]worst\f[R] and related
options.
When your format selector is \f[C]worst\f[R], the format which is worst
in all respects is selected.
Most of the time, what you actually want is the video with the smallest
filesize instead.
So it is generally better to use \f[C]-S +size\f[R] or more rigorously,
\f[C]-S +size,+br,+res,+fps\f[R] instead of \f[C]-f worst\f[R].
See Sorting Formats for more details.
.PP
You can select the n\[aq]th best format of a type by using
\f[C]best<type>.<n>\f[R].
For example, \f[C]best.2\f[R] will select the 2nd best combined format.
Similarly, \f[C]bv*.3\f[R] will select the 3rd best format that contains
a video stream.
.PP
If you want to download multiple videos, and they don\[aq]t have the
same formats available, you can specify the order of preference using
slashes.
Note that formats on the left hand side are preferred; e.g.
\f[C]-f 22/17/18\f[R] will download format 22 if it\[aq]s available,
otherwise it will download format 17 if it\[aq]s available, otherwise it
will download format 18 if it\[aq]s available, otherwise it will
complain that no suitable formats are available for download.
.PP
If you want to download several formats of the same video use a comma as
a separator, e.g.
\f[C]-f 22,17,18\f[R] will download all these three formats, of course
if they are available.
Or a more sophisticated example combined with the precedence feature:
\f[C]-f 136/137/mp4/bestvideo,140/m4a/bestaudio\f[R].
.PP
You can merge the video and audio of multiple formats into a single file
using \f[C]-f <format1>+<format2>+...\f[R] (requires ffmpeg installed);
e.g.
\f[C]-f bestvideo+bestaudio\f[R] will download the best video-only
format, the best audio-only format and mux them together with ffmpeg.
.PP
\f[B]Deprecation warning\f[R]: Since the \f[I]below\f[R] described
behavior is complex and counter-intuitive, this will be removed and
multistreams will be enabled by default in the future.
A new operator will be instead added to limit formats to single
audio/video
.PP
Unless \f[C]--video-multistreams\f[R] is used, all formats with a video
stream except the first one are ignored.
Similarly, unless \f[C]--audio-multistreams\f[R] is used, all formats
with an audio stream except the first one are ignored.
E.g.
\f[C]-f bestvideo+best+bestaudio --video-multistreams --audio-multistreams\f[R]
will download and merge all 3 given formats.
The resulting file will have 2 video streams and 2 audio streams.
But \f[C]-f bestvideo+best+bestaudio --no-video-multistreams\f[R] will
download and merge only \f[C]bestvideo\f[R] and \f[C]bestaudio\f[R].
\f[C]best\f[R] is ignored since another format containing a video stream
(\f[C]bestvideo\f[R]) has already been selected.
The order of the formats is therefore important.
\f[C]-f best+bestaudio --no-audio-multistreams\f[R] will download only
\f[C]best\f[R] while \f[C]-f bestaudio+best --no-audio-multistreams\f[R]
will ignore \f[C]best\f[R] and download only \f[C]bestaudio\f[R].
.SS Filtering Formats
.PP
You can also filter the video formats by putting a condition in
brackets, as in \f[C]-f \[dq]best[height=720]\[dq]\f[R] (or
\f[C]-f \[dq][filesize>10M]\[dq]\f[R] since filters without a selector
are interpreted as \f[C]best\f[R]).
.PP
The following numeric meta fields can be used with comparisons
\f[C]<\f[R], \f[C]<=\f[R], \f[C]>\f[R], \f[C]>=\f[R], \f[C]=\f[R]
(equals), \f[C]!=\f[R] (not equals):
.IP \[bu] 2
\f[C]filesize\f[R]: The number of bytes, if known in advance
.IP \[bu] 2
\f[C]filesize_approx\f[R]: An estimate for the number of bytes
.IP \[bu] 2
\f[C]width\f[R]: Width of the video, if known
.IP \[bu] 2
\f[C]height\f[R]: Height of the video, if known
.IP \[bu] 2
\f[C]aspect_ratio\f[R]: Aspect ratio of the video, if known
.IP \[bu] 2
\f[C]tbr\f[R]: Average bitrate of audio and video in KBit/s
.IP \[bu] 2
\f[C]abr\f[R]: Average audio bitrate in KBit/s
.IP \[bu] 2
\f[C]vbr\f[R]: Average video bitrate in KBit/s
.IP \[bu] 2
\f[C]asr\f[R]: Audio sampling rate in Hertz
.IP \[bu] 2
\f[C]fps\f[R]: Frame rate
.IP \[bu] 2
\f[C]audio_channels\f[R]: The number of audio channels
.IP \[bu] 2
\f[C]stretched_ratio\f[R]: \f[C]width:height\f[R] of the video\[aq]s
pixels, if not square
.PP
Also filtering work for comparisons \f[C]=\f[R] (equals),
\f[C]\[ha]=\f[R] (starts with), \f[C]$=\f[R] (ends with), \f[C]*=\f[R]
(contains), \f[C]\[ti]=\f[R] (matches regex) and following string meta
fields:
.IP \[bu] 2
\f[C]url\f[R]: Video URL
.IP \[bu] 2
\f[C]ext\f[R]: File extension
.IP \[bu] 2
\f[C]acodec\f[R]: Name of the audio codec in use
.IP \[bu] 2
\f[C]vcodec\f[R]: Name of the video codec in use
.IP \[bu] 2
\f[C]container\f[R]: Name of the container format
.IP \[bu] 2
\f[C]protocol\f[R]: The protocol that will be used for the actual
download, lower-case (\f[C]http\f[R], \f[C]https\f[R], \f[C]rtsp\f[R],
\f[C]rtmp\f[R], \f[C]rtmpe\f[R], \f[C]mms\f[R], \f[C]f4m\f[R],
\f[C]ism\f[R], \f[C]http_dash_segments\f[R], \f[C]m3u8\f[R], or
\f[C]m3u8_native\f[R])
.IP \[bu] 2
\f[C]language\f[R]: Language code
.IP \[bu] 2
\f[C]dynamic_range\f[R]: The dynamic range of the video
.IP \[bu] 2
\f[C]format_id\f[R]: A short description of the format
.IP \[bu] 2
\f[C]format\f[R]: A human-readable description of the format
.IP \[bu] 2
\f[C]format_note\f[R]: Additional info about the format
.IP \[bu] 2
\f[C]resolution\f[R]: Textual description of width and height
.PP
Any string comparison may be prefixed with negation \f[C]!\f[R] in order
to produce an opposite comparison, e.g.
\f[C]!*=\f[R] (does not contain).
The comparand of a string comparison needs to be quoted with either
double or single quotes if it contains spaces or special characters
other than \f[C]._-\f[R].
.PP
\f[B]Note\f[R]: None of the aforementioned meta fields are guaranteed to
be present since this solely depends on the metadata obtained by
particular extractor, i.e.
the metadata offered by the website.
Any other field made available by the extractor can also be used for
filtering.
.PP
Formats for which the value is not known are excluded unless you put a
question mark (\f[C]?\f[R]) after the operator.
You can combine format filters, so
\f[C]-f \[dq]bv[height<=?720][tbr>500]\[dq]\f[R] selects up to 720p
videos (or videos where the height is not known) with a bitrate of at
least 500 KBit/s.
You can also use the filters with \f[C]all\f[R] to download all formats
that satisfy the filter, e.g.
\f[C]-f \[dq]all[vcodec=none]\[dq]\f[R] selects all audio-only formats.
.PP
Format selectors can also be grouped using parentheses; e.g.
\f[C]-f \[dq](mp4,webm)[height<480]\[dq]\f[R] will download the best
pre-merged mp4 and webm formats with a height lower than 480.
.SS Sorting Formats
.PP
You can change the criteria for being considered the \f[C]best\f[R] by
using \f[C]-S\f[R] (\f[C]--format-sort\f[R]).
The general format for this is \f[C]--format-sort field1,field2...\f[R].
.PP
The available fields are:
.IP \[bu] 2
\f[C]hasvid\f[R]: Gives priority to formats that have a video stream
.IP \[bu] 2
\f[C]hasaud\f[R]: Gives priority to formats that have an audio stream
.IP \[bu] 2
\f[C]ie_pref\f[R]: The format preference
.IP \[bu] 2
\f[C]lang\f[R]: The language preference
.IP \[bu] 2
\f[C]quality\f[R]: The quality of the format
.IP \[bu] 2
\f[C]source\f[R]: The preference of the source
.IP \[bu] 2
\f[C]proto\f[R]: Protocol used for download
(\f[C]https\f[R]/\f[C]ftps\f[R] > \f[C]http\f[R]/\f[C]ftp\f[R] >
\f[C]m3u8_native\f[R]/\f[C]m3u8\f[R] > \f[C]http_dash_segments\f[R]>
\f[C]websocket_frag\f[R] > \f[C]mms\f[R]/\f[C]rtsp\f[R] >
\f[C]f4f\f[R]/\f[C]f4m\f[R])
.IP \[bu] 2
\f[C]vcodec\f[R]: Video Codec (\f[C]av01\f[R] > \f[C]vp9.2\f[R] >
\f[C]vp9\f[R] > \f[C]h265\f[R] > \f[C]h264\f[R] > \f[C]vp8\f[R] >
\f[C]h263\f[R] > \f[C]theora\f[R] > other)
.IP \[bu] 2
\f[C]acodec\f[R]: Audio Codec (\f[C]flac\f[R]/\f[C]alac\f[R] >
\f[C]wav\f[R]/\f[C]aiff\f[R] > \f[C]opus\f[R] > \f[C]vorbis\f[R] >
\f[C]aac\f[R] > \f[C]mp4a\f[R] > \f[C]mp3\f[R] > \f[C]ac4\f[R] >
\f[C]eac3\f[R] > \f[C]ac3\f[R] > \f[C]dts\f[R] > other)
.IP \[bu] 2
\f[C]codec\f[R]: Equivalent to \f[C]vcodec,acodec\f[R]
.IP \[bu] 2
\f[C]vext\f[R]: Video Extension (\f[C]mp4\f[R] > \f[C]mov\f[R] >
\f[C]webm\f[R] > \f[C]flv\f[R] > other).
If \f[C]--prefer-free-formats\f[R] is used, \f[C]webm\f[R] is preferred.
.IP \[bu] 2
\f[C]aext\f[R]: Audio Extension (\f[C]m4a\f[R] > \f[C]aac\f[R] >
\f[C]mp3\f[R] > \f[C]ogg\f[R] > \f[C]opus\f[R] > \f[C]webm\f[R] >
other).
If \f[C]--prefer-free-formats\f[R] is used, the order changes to
\f[C]ogg\f[R] > \f[C]opus\f[R] > \f[C]webm\f[R] > \f[C]mp3\f[R] >
\f[C]m4a\f[R] > \f[C]aac\f[R]
.IP \[bu] 2
\f[C]ext\f[R]: Equivalent to \f[C]vext,aext\f[R]
.IP \[bu] 2
\f[C]filesize\f[R]: Exact filesize, if known in advance
.IP \[bu] 2
\f[C]fs_approx\f[R]: Approximate filesize
.IP \[bu] 2
\f[C]size\f[R]: Exact filesize if available, otherwise approximate
filesize
.IP \[bu] 2
\f[C]height\f[R]: Height of video
.IP \[bu] 2
\f[C]width\f[R]: Width of video
.IP \[bu] 2
\f[C]res\f[R]: Video resolution, calculated as the smallest dimension.
.IP \[bu] 2
\f[C]fps\f[R]: Framerate of video
.IP \[bu] 2
\f[C]hdr\f[R]: The dynamic range of the video (\f[C]DV\f[R] >
\f[C]HDR12\f[R] > \f[C]HDR10+\f[R] > \f[C]HDR10\f[R] > \f[C]HLG\f[R] >
\f[C]SDR\f[R])
.IP \[bu] 2
\f[C]channels\f[R]: The number of audio channels
.IP \[bu] 2
\f[C]tbr\f[R]: Total average bitrate in KBit/s
.IP \[bu] 2
\f[C]vbr\f[R]: Average video bitrate in KBit/s
.IP \[bu] 2
\f[C]abr\f[R]: Average audio bitrate in KBit/s
.IP \[bu] 2
\f[C]br\f[R]: Average bitrate in KBit/s,
\f[C]tbr\f[R]/\f[C]vbr\f[R]/\f[C]abr\f[R]
.IP \[bu] 2
\f[C]asr\f[R]: Audio sample rate in Hz
.PP
\f[B]Deprecation warning\f[R]: Many of these fields have (currently
undocumented) aliases, that may be removed in a future version.
It is recommended to use only the documented field names.
.PP
All fields, unless specified otherwise, are sorted in descending order.
To reverse this, prefix the field with a \f[C]+\f[R].
E.g.
\f[C]+res\f[R] prefers format with the smallest resolution.
Additionally, you can suffix a preferred value for the fields, separated
by a \f[C]:\f[R].
E.g.
\f[C]res:720\f[R] prefers larger videos, but no larger than 720p and the
smallest video if there are no videos less than 720p.
For \f[C]codec\f[R] and \f[C]ext\f[R], you can provide two preferred
values, the first for video and the second for audio.
E.g.
\f[C]+codec:avc:m4a\f[R] (equivalent to
\f[C]+vcodec:avc,+acodec:m4a\f[R]) sets the video codec preference to
\f[C]h264\f[R] > \f[C]h265\f[R] > \f[C]vp9\f[R] > \f[C]vp9.2\f[R] >
\f[C]av01\f[R] > \f[C]vp8\f[R] > \f[C]h263\f[R] > \f[C]theora\f[R] and
audio codec preference to \f[C]mp4a\f[R] > \f[C]aac\f[R] >
\f[C]vorbis\f[R] > \f[C]opus\f[R] > \f[C]mp3\f[R] > \f[C]ac3\f[R] >
\f[C]dts\f[R].
You can also make the sorting prefer the nearest values to the provided
by using \f[C]\[ti]\f[R] as the delimiter.
E.g.
\f[C]filesize\[ti]1G\f[R] prefers the format with filesize closest to 1
GiB.
.PP
The fields \f[C]hasvid\f[R] and \f[C]ie_pref\f[R] are always given
highest priority in sorting, irrespective of the user-defined order.
This behaviour can be changed by using \f[C]--format-sort-force\f[R].
Apart from these, the default order used is:
\f[C]lang,quality,res,fps,hdr:12,vcodec:vp9.2,channels,acodec,size,br,asr,proto,ext,hasaud,source,id\f[R].
The extractors may override this default order, but they cannot override
the user-provided order.
.PP
Note that the default has \f[C]vcodec:vp9.2\f[R]; i.e.
\f[C]av1\f[R] is not preferred.
Similarly, the default for hdr is \f[C]hdr:12\f[R]; i.e.
dolby vision is not preferred.
These choices are made since DV and AV1 formats are not yet fully
compatible with most devices.
This may be changed in the future as more devices become capable of
smoothly playing back these formats.
.PP
If your format selector is \f[C]worst\f[R], the last item is selected
after sorting.
This means it will select the format that is worst in all respects.
Most of the time, what you actually want is the video with the smallest
filesize instead.
So it is generally better to use
\f[C]-f best -S +size,+br,+res,+fps\f[R].
.PP
\f[B]Tip\f[R]: You can use the \f[C]-v -F\f[R] to see how the formats
have been sorted (worst to best).
.SS Format Selection examples
.IP
.nf
\f[C]
# Download and merge the best video-only format and the best audio-only format,
# or download the best combined format if video-only format is not available
$ yt-dlp -f \[dq]bv+ba/b\[dq]

# Download best format that contains video,
# and if it doesn\[aq]t already have an audio stream, merge it with best audio-only format
$ yt-dlp -f \[dq]bv*+ba/b\[dq]

# Same as above
$ yt-dlp

# Download the best video-only format and the best audio-only format without merging them
# For this case, an output template should be used since
# by default, bestvideo and bestaudio will have the same file name.
$ yt-dlp -f \[dq]bv,ba\[dq] -o \[dq]%(title)s.f%(format_id)s.%(ext)s\[dq]

# Download and merge the best format that has a video stream,
# and all audio-only formats into one file
$ yt-dlp -f \[dq]bv*+mergeall[vcodec=none]\[dq] --audio-multistreams

# Download and merge the best format that has a video stream,
# and the best 2 audio-only formats into one file
$ yt-dlp -f \[dq]bv*+ba+ba.2\[dq] --audio-multistreams


# The following examples show the old method (without -S) of format selection
# and how to use -S to achieve a similar but (generally) better result

# Download the worst video available (old method)
$ yt-dlp -f \[dq]wv*+wa/w\[dq]

# Download the best video available but with the smallest resolution
$ yt-dlp -S \[dq]+res\[dq]

# Download the smallest video available
$ yt-dlp -S \[dq]+size,+br\[dq]



# Download the best mp4 video available, or the best video if no mp4 available
$ yt-dlp -f \[dq]bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b\[dq]

# Download the best video with the best extension
# (For video, mp4 > mov > webm > flv. For audio, m4a > aac > mp3 ...)
$ yt-dlp -S \[dq]ext\[dq]



# Download the best video available but no better than 480p,
# or the worst video if there is no video under 480p
$ yt-dlp -f \[dq]bv*[height<=480]+ba/b[height<=480] / wv*+ba/w\[dq]

# Download the best video available with the largest height but no better than 480p,
# or the best video with the smallest resolution if there is no video under 480p
$ yt-dlp -S \[dq]height:480\[dq]

# Download the best video available with the largest resolution but no better than 480p,
# or the best video with the smallest resolution if there is no video under 480p
# Resolution is determined by using the smallest dimension.
# So this works correctly for vertical videos as well
$ yt-dlp -S \[dq]res:480\[dq]



# Download the best video (that also has audio) but no bigger than 50 MB,
# or the worst video (that also has audio) if there is no video under 50 MB
$ yt-dlp -f \[dq]b[filesize<50M] / w\[dq]

# Download largest video (that also has audio) but no bigger than 50 MB,
# or the smallest video (that also has audio) if there is no video under 50 MB
$ yt-dlp -f \[dq]b\[dq] -S \[dq]filesize:50M\[dq]

# Download best video (that also has audio) that is closest in size to 50 MB
$ yt-dlp -f \[dq]b\[dq] -S \[dq]filesize\[ti]50M\[dq]



# Download best video available via direct link over HTTP/HTTPS protocol,
# or the best video available via any protocol if there is no such video
$ yt-dlp -f \[dq](bv*+ba/b)[protocol\[ha]=http][protocol!*=dash] / (bv*+ba/b)\[dq]

# Download best video available via the best protocol
# (https/ftps > http/ftp > m3u8_native > m3u8 > http_dash_segments ...)
$ yt-dlp -S \[dq]proto\[dq]



# Download the best video with either h264 or h265 codec,
# or the best video if there is no such video
$ yt-dlp -f \[dq](bv*[vcodec\[ti]=\[aq]\[ha]((he|a)vc|h26[45])\[aq]]+ba) / (bv*+ba/b)\[dq]

# Download the best video with best codec no better than h264,
# or the best video with worst codec if there is no such video
$ yt-dlp -S \[dq]codec:h264\[dq]

# Download the best video with worst codec no worse than h264,
# or the best video with best codec if there is no such video
$ yt-dlp -S \[dq]+codec:h264\[dq]



# More complex examples

# Download the best video no better than 720p preferring framerate greater than 30,
# or the worst video (still preferring framerate greater than 30) if there is no such video
$ yt-dlp -f \[dq]((bv*[fps>30]/bv*)[height<=720]/(wv*[fps>30]/wv*)) + ba / (b[fps>30]/b)[height<=720]/(w[fps>30]/w)\[dq]

# Download the video with the largest resolution no better than 720p,
# or the video with the smallest resolution available if there is no such video,
# preferring larger framerate for formats with the same resolution
$ yt-dlp -S \[dq]res:720,fps\[dq]



# Download the video with smallest resolution no worse than 480p,
# or the video with the largest resolution available if there is no such video,
# preferring better codec and then larger total bitrate for the same resolution
$ yt-dlp -S \[dq]+res:480,codec,br\[dq]
\f[R]
.fi
.SH MODIFYING METADATA
.PP
The metadata obtained by the extractors can be modified by using
\f[C]--parse-metadata\f[R] and \f[C]--replace-in-metadata\f[R]
.PP
\f[C]--replace-in-metadata FIELDS REGEX REPLACE\f[R] is used to replace
text in any metadata field using python regular
expression (https://docs.python.org/3/library/re.html#regular-expression-syntax).
Backreferences (https://docs.python.org/3/library/re.html?highlight=backreferences#re.sub)
can be used in the replace string for advanced use.
.PP
The general syntax of \f[C]--parse-metadata FROM:TO\f[R] is to give the
name of a field or an output template to extract data from, and the
format to interpret it as, separated by a colon \f[C]:\f[R].
Either a python regular
expression (https://docs.python.org/3/library/re.html#regular-expression-syntax)
with named capture groups, a single field name, or a similar syntax to
the output template (only \f[C]%(field)s\f[R] formatting is supported)
can be used for \f[C]TO\f[R].
The option can be used multiple times to parse and modify various
fields.
.PP
Note that these options preserve their relative order, allowing
replacements to be made in parsed fields and viceversa.
Also, any field thus created can be used in the output template and will
also affect the media file\[aq]s metadata added when using
\f[C]--embed-metadata\f[R].
.PP
This option also has a few special uses:
.IP \[bu] 2
You can download an additional URL based on the metadata of the
currently downloaded video.
To do this, set the field \f[C]additional_urls\f[R] to the URL that you
want to download.
E.g.
\f[C]--parse-metadata \[dq]description:(?P<additional_urls>https?://www\[rs].vimeo\[rs].com/\[rs]d+)\[dq]\f[R]
will download the first vimeo video found in the description
.IP \[bu] 2
You can use this to change the metadata that is embedded in the media
file.
To do this, set the value of the corresponding field with a
\f[C]meta_\f[R] prefix.
For example, any value you set to \f[C]meta_description\f[R] field will
be added to the \f[C]description\f[R] field in the file - you can use
this to set a different \[dq]description\[dq] and \[dq]synopsis\[dq].
To modify the metadata of individual streams, use the \f[C]meta<n>_\f[R]
prefix (e.g.
\f[C]meta1_language\f[R]).
Any value set to the \f[C]meta_\f[R] field will overwrite all default
values.
.PP
\f[B]Note\f[R]: Metadata modification happens before format selection,
post-extraction and other post-processing operations.
Some fields may be added or changed during these steps, overriding your
changes.
.PP
For reference, these are the fields yt-dlp adds by default to the file
metadata:
.PP
.TS
tab(@);
l l.
T{
Metadata fields
T}@T{
From
T}
_
T{
\f[C]title\f[R]
T}@T{
\f[C]track\f[R] or \f[C]title\f[R]
T}
T{
\f[C]date\f[R]
T}@T{
\f[C]upload_date\f[R]
T}
T{
\f[C]description\f[R], \f[C]synopsis\f[R]
T}@T{
\f[C]description\f[R]
T}
T{
\f[C]purl\f[R], \f[C]comment\f[R]
T}@T{
\f[C]webpage_url\f[R]
T}
T{
\f[C]track\f[R]
T}@T{
\f[C]track_number\f[R]
T}
T{
\f[C]artist\f[R]
T}@T{
\f[C]artist\f[R], \f[C]creator\f[R], \f[C]uploader\f[R] or
\f[C]uploader_id\f[R]
T}
T{
\f[C]genre\f[R]
T}@T{
\f[C]genre\f[R]
T}
T{
\f[C]album\f[R]
T}@T{
\f[C]album\f[R]
T}
T{
\f[C]album_artist\f[R]
T}@T{
\f[C]album_artist\f[R]
T}
T{
\f[C]disc\f[R]
T}@T{
\f[C]disc_number\f[R]
T}
T{
\f[C]show\f[R]
T}@T{
\f[C]series\f[R]
T}
T{
\f[C]season_number\f[R]
T}@T{
\f[C]season_number\f[R]
T}
T{
\f[C]episode_id\f[R]
T}@T{
\f[C]episode\f[R] or \f[C]episode_id\f[R]
T}
T{
\f[C]episode_sort\f[R]
T}@T{
\f[C]episode_number\f[R]
T}
T{
\f[C]language\f[R] of each stream
T}@T{
the format\[aq]s \f[C]language\f[R]
T}
.TE
.PP
\f[B]Note\f[R]: The file format may not support some of these fields
.SS Modifying metadata examples
.IP
.nf
\f[C]
# Interpret the title as \[dq]Artist - Title\[dq]
$ yt-dlp --parse-metadata \[dq]title:%(artist)s - %(title)s\[dq]

# Regex example
$ yt-dlp --parse-metadata \[dq]description:Artist - (?P<artist>.+)\[dq]

# Set title as \[dq]Series name S01E05\[dq]
$ yt-dlp --parse-metadata \[dq]%(series)s S%(season_number)02dE%(episode_number)02d:%(title)s\[dq]

# Prioritize uploader as the \[dq]artist\[dq] field in video metadata
$ yt-dlp --parse-metadata \[dq]%(uploader|)s:%(meta_artist)s\[dq] --embed-metadata

# Set \[dq]comment\[dq] field in video metadata using description instead of webpage_url,
# handling multiple lines correctly
$ yt-dlp --parse-metadata \[dq]description:(?s)(?P<meta_comment>.+)\[dq] --embed-metadata

# Do not set any \[dq]synopsis\[dq] in the video metadata
$ yt-dlp --parse-metadata \[dq]:(?P<meta_synopsis>)\[dq]

# Remove \[dq]formats\[dq] field from the infojson by setting it to an empty string
$ yt-dlp --parse-metadata \[dq]video::(?P<formats>)\[dq] --write-info-json

# Replace all spaces and \[dq]_\[dq] in title and uploader with a \[ga]-\[ga]
$ yt-dlp --replace-in-metadata \[dq]title,uploader\[dq] \[dq][ _]\[dq] \[dq]-\[dq]
\f[R]
.fi
.SH EXTRACTOR ARGUMENTS
.PP
Some extractors accept additional arguments which can be passed using
\f[C]--extractor-args KEY:ARGS\f[R].
\f[C]ARGS\f[R] is a \f[C];\f[R] (semicolon) separated string of
\f[C]ARG=VAL1,VAL2\f[R].
E.g.
\f[C]--extractor-args \[dq]youtube:player-client=android_embedded,web;include_live_dash\[dq] --extractor-args \[dq]funimation:version=uncut\[dq]\f[R]
.PP
Note: In CLI, \f[C]ARG\f[R] can use \f[C]-\f[R] instead of \f[C]_\f[R];
e.g.
\f[C]youtube:player-client\[dq]\f[R] becomes
\f[C]youtube:player_client\[dq]\f[R]
.PP
The following extractors use this feature:
.SS youtube
.IP \[bu] 2
\f[C]lang\f[R]: Prefer translated metadata (\f[C]title\f[R],
\f[C]description\f[R] etc) of this language code (case-sensitive).
By default, the video primary language metadata is preferred, with a
fallback to \f[C]en\f[R] translated.
See
youtube.py (https://github.com/yt-dlp/yt-dlp/blob/c26f9b991a0681fd3ea548d535919cec1fbbd430/yt_dlp/extractor/youtube.py#L381-L390)
for list of supported content language codes
.IP \[bu] 2
\f[C]skip\f[R]: One or more of \f[C]hls\f[R], \f[C]dash\f[R] or
\f[C]translated_subs\f[R] to skip extraction of the m3u8 manifests, dash
manifests and auto-translated
subtitles (https://github.com/yt-dlp/yt-dlp/issues/4090#issuecomment-1158102032)
respectively
.IP \[bu] 2
\f[C]player_client\f[R]: Clients to extract video data from.
The main clients are \f[C]web\f[R], \f[C]android\f[R] and \f[C]ios\f[R]
with variants \f[C]_music\f[R], \f[C]_embedded\f[R],
\f[C]_embedscreen\f[R], \f[C]_creator\f[R] (e.g.
\f[C]web_embedded\f[R]); and \f[C]mweb\f[R], \f[C]mweb_embedscreen\f[R]
and \f[C]tv_embedded\f[R] (agegate bypass) with no variants.
By default, \f[C]ios,android,web\f[R] is used, but \f[C]tv_embedded\f[R]
and \f[C]creator\f[R] variants are added as required for age-gated
videos.
Similarly, the music variants are added for \f[C]music.youtube.com\f[R]
urls.
You can use \f[C]all\f[R] to use all the clients, and \f[C]default\f[R]
for the default clients.
.IP \[bu] 2
\f[C]player_skip\f[R]: Skip some network requests that are generally
needed for robust extraction.
One or more of \f[C]configs\f[R] (skip client configs),
\f[C]webpage\f[R] (skip initial webpage), \f[C]js\f[R] (skip js player).
While these options can help reduce the number of requests needed or
avoid some rate-limiting, they could cause some issues.
See #860 (https://github.com/yt-dlp/yt-dlp/pull/860) for more details
.IP \[bu] 2
\f[C]player_params\f[R]: YouTube player parameters to use for player
requests.
Will overwrite any default ones set by yt-dlp.
.IP \[bu] 2
\f[C]comment_sort\f[R]: \f[C]top\f[R] or \f[C]new\f[R] (default) -
choose comment sorting mode (on YouTube\[aq]s side)
.IP \[bu] 2
\f[C]max_comments\f[R]: Limit the amount of comments to gather.
Comma-separated list of integers representing
\f[C]max-comments,max-parents,max-replies,max-replies-per-thread\f[R].
Default is \f[C]all,all,all,all\f[R]
.RS 2
.IP \[bu] 2
E.g.
\f[C]all,all,1000,10\f[R] will get a maximum of 1000 replies total, with
up to 10 replies per thread.
\f[C]1000,all,100\f[R] will get a maximum of 1000 comments, with a
maximum of 100 replies total
.RE
.IP \[bu] 2
\f[C]formats\f[R]: Change the types of formats to return.
\f[C]dashy\f[R] (convert HTTP to DASH), \f[C]duplicate\f[R] (identical
content but different URLs or protocol; includes \f[C]dashy\f[R]),
\f[C]incomplete\f[R] (cannot be downloaded completely - live dash and
post-live m3u8)
.IP \[bu] 2
\f[C]innertube_host\f[R]: Innertube API host to use for all API
requests; e.g.
\f[C]studio.youtube.com\f[R], \f[C]youtubei.googleapis.com\f[R].
Note that cookies exported from one subdomain will not work on others
.IP \[bu] 2
\f[C]innertube_key\f[R]: Innertube API key to use for all API requests
.IP \[bu] 2
\f[C]raise_incomplete_data\f[R]: \f[C]Incomplete Data Received\f[R]
raises an error instead of reporting a warning
.SS youtubetab (YouTube playlists, channels, feeds, etc.)
.IP \[bu] 2
\f[C]skip\f[R]: One or more of \f[C]webpage\f[R] (skip initial webpage
download), \f[C]authcheck\f[R] (allow the download of playlists
requiring authentication when no initial webpage is downloaded.
This may cause unwanted behavior, see
#1122 (https://github.com/yt-dlp/yt-dlp/pull/1122) for more details)
.IP \[bu] 2
\f[C]approximate_date\f[R]: Extract approximate \f[C]upload_date\f[R]
and \f[C]timestamp\f[R] in flat-playlist.
This may cause date-based filters to be slightly off
.SS generic
.IP \[bu] 2
\f[C]fragment_query\f[R]: Passthrough any query in mpd/m3u8 manifest
URLs to their fragments if no value is provided, or else apply the query
string given as \f[C]fragment_query=VALUE\f[R].
Does not apply to ffmpeg
.IP \[bu] 2
\f[C]variant_query\f[R]: Passthrough the master m3u8 URL query to its
variant playlist URLs if no value is provided, or else apply the query
string given as \f[C]variant_query=VALUE\f[R]
.IP \[bu] 2
\f[C]hls_key\f[R]: An HLS AES-128 key URI \f[I]or\f[R] key (as hex), and
optionally the IV (as hex), in the form of \f[C](URI|KEY)[,IV]\f[R];
e.g.
\f[C]generic:hls_key=ABCDEF1234567980,0xFEDCBA0987654321\f[R].
Passing any of these values will force usage of the native HLS
downloader and override the corresponding values found in the m3u8
playlist
.IP \[bu] 2
\f[C]is_live\f[R]: Bypass live HLS detection and manually set
\f[C]live_status\f[R] - a value of \f[C]false\f[R] will set
\f[C]not_live\f[R], any other value (or no value) will set
\f[C]is_live\f[R]
.SS funimation
.IP \[bu] 2
\f[C]language\f[R]: Audio languages to extract, e.g.
\f[C]funimation:language=english,japanese\f[R]
.IP \[bu] 2
\f[C]version\f[R]: The video version to extract - \f[C]uncut\f[R] or
\f[C]simulcast\f[R]
.SS crunchyrollbeta (Crunchyroll)
.IP \[bu] 2
\f[C]format\f[R]: Which stream type(s) to extract (default:
\f[C]adaptive_hls\f[R]).
Potentially useful values include \f[C]adaptive_hls\f[R],
\f[C]adaptive_dash\f[R], \f[C]vo_adaptive_hls\f[R],
\f[C]vo_adaptive_dash\f[R], \f[C]download_hls\f[R],
\f[C]download_dash\f[R], \f[C]multitrack_adaptive_hls_v2\f[R]
.IP \[bu] 2
\f[C]hardsub\f[R]: Preference order for which hardsub versions to
extract, or \f[C]all\f[R] (default: \f[C]None\f[R] = no hardsubs), e.g.
\f[C]crunchyrollbeta:hardsub=en-US,None\f[R]
.SS vikichannel
.IP \[bu] 2
\f[C]video_types\f[R]: Types of videos to download - one or more of
\f[C]episodes\f[R], \f[C]movies\f[R], \f[C]clips\f[R],
\f[C]trailers\f[R]
.SS niconico
.IP \[bu] 2
\f[C]segment_duration\f[R]: Segment duration in milliseconds for HLS-DMC
formats.
Use it at your own risk since this feature \f[B]may result in your
account termination.\f[R]
.SS youtubewebarchive
.IP \[bu] 2
\f[C]check_all\f[R]: Try to check more at the cost of more requests.
One or more of \f[C]thumbnails\f[R], \f[C]captures\f[R]
.SS gamejolt
.IP \[bu] 2
\f[C]comment_sort\f[R]: \f[C]hot\f[R] (default), \f[C]you\f[R] (cookies
needed), \f[C]top\f[R], \f[C]new\f[R] - choose comment sorting mode (on
GameJolt\[aq]s side)
.SS hotstar
.IP \[bu] 2
\f[C]res\f[R]: resolution to ignore - one or more of \f[C]sd\f[R],
\f[C]hd\f[R], \f[C]fhd\f[R]
.IP \[bu] 2
\f[C]vcodec\f[R]: vcodec to ignore - one or more of \f[C]h264\f[R],
\f[C]h265\f[R], \f[C]dvh265\f[R]
.IP \[bu] 2
\f[C]dr\f[R]: dynamic range to ignore - one or more of \f[C]sdr\f[R],
\f[C]hdr10\f[R], \f[C]dv\f[R]
.SS niconicochannelplus
.IP \[bu] 2
\f[C]max_comments\f[R]: Maximum number of comments to extract - default
is \f[C]120\f[R]
.SS tiktok
.IP \[bu] 2
\f[C]api_hostname\f[R]: Hostname to use for mobile API requests, e.g.
\f[C]api-h2.tiktokv.com\f[R]
.IP \[bu] 2
\f[C]app_version\f[R]: App version to call mobile APIs with - should be
set along with \f[C]manifest_app_version\f[R], e.g.
\f[C]20.2.1\f[R]
.IP \[bu] 2
\f[C]manifest_app_version\f[R]: Numeric app version to call mobile APIs
with, e.g.
\f[C]221\f[R]
.SS rokfinchannel
.IP \[bu] 2
\f[C]tab\f[R]: Which tab to download - one of \f[C]new\f[R],
\f[C]top\f[R], \f[C]videos\f[R], \f[C]podcasts\f[R], \f[C]streams\f[R],
\f[C]stacks\f[R]
.SS twitter
.IP \[bu] 2
\f[C]api\f[R]: Select one of \f[C]graphql\f[R] (default),
\f[C]legacy\f[R] or \f[C]syndication\f[R] as the API for tweet
extraction.
Has no effect if logged in
.SS stacommu, wrestleuniverse
.IP \[bu] 2
\f[C]device_id\f[R]: UUID value assigned by the website and used to
enforce device limits for paid livestream content.
Can be found in browser local storage
.SS twitch
.IP \[bu] 2
\f[C]client_id\f[R]: Client ID value to be sent with GraphQL requests,
e.g.
\f[C]twitch:client_id=kimne78kx3ncx6brgo4mv6wki5h1ko\f[R]
.SS nhkradirulive (NHK \[u3089]\[u3058]\[u308B]\[u2605]\[u3089]\[u3058]\[u308B] LIVE)
.IP \[bu] 2
\f[C]area\f[R]: Which regional variation to extract.
Valid areas are: \f[C]sapporo\f[R], \f[C]sendai\f[R], \f[C]tokyo\f[R],
\f[C]nagoya\f[R], \f[C]osaka\f[R], \f[C]hiroshima\f[R],
\f[C]matsuyama\f[R], \f[C]fukuoka\f[R].
Defaults to \f[C]tokyo\f[R]
.SS nflplusreplay
.IP \[bu] 2
\f[C]type\f[R]: Type(s) of game replays to extract.
Valid types are: \f[C]full_game\f[R], \f[C]full_game_spanish\f[R],
\f[C]condensed_game\f[R] and \f[C]all_22\f[R].
You can use \f[C]all\f[R] to extract all available replay types, which
is the default
.PP
\f[B]Note\f[R]: These options may be changed/removed in the future
without concern for backward compatibility
.SH INSTALLATION
.PP
You can install yt-dlp using the binaries,
pip (https://pypi.org/project/yt-dlp) or one using a third-party package
manager.
See the wiki (https://github.com/yt-dlp/yt-dlp/wiki/Installation) for
detailed instructions
.SS UPDATE
.PP
You can use \f[C]yt-dlp -U\f[R] to update if you are using the release
binaries
.PP
If you installed with
pip (https://github.com/yt-dlp/yt-dlp/wiki/Installation#with-pip),
simply re-run the same command that was used to install the program
.PP
For other third-party package managers, see the
wiki (https://github.com/yt-dlp/yt-dlp/wiki/Installation#third-party-package-managers)
or refer their documentation
.PP
.PP
There are currently three release channels for binaries:
\f[C]stable\f[R], \f[C]nightly\f[R] and \f[C]master\f[R].
.IP \[bu] 2
\f[C]stable\f[R] is the default channel, and many of its changes have
been tested by users of the \f[C]nightly\f[R] and \f[C]master\f[R]
channels.
.IP \[bu] 2
The \f[C]nightly\f[R] channel has releases scheduled to build every day
around midnight UTC, for a snapshot of the project\[aq]s new patches and
changes.
This is the \f[B]recommended channel for regular users\f[R] of yt-dlp.
The \f[C]nightly\f[R] releases are available from
yt-dlp/yt-dlp-nightly-builds (https://github.com/yt-dlp/yt-dlp-nightly-builds/releases)
or as development releases of the \f[C]yt-dlp\f[R] PyPI package (which
can be installed with pip\[aq]s \f[C]--pre\f[R] flag).
.IP \[bu] 2
The \f[C]master\f[R] channel features releases that are built after each
push to the master branch, and these will have the very latest fixes and
additions, but may also be more prone to regressions.
They are available from
yt-dlp/yt-dlp-master-builds (https://github.com/yt-dlp/yt-dlp-master-builds/releases).
.PP
When using \f[C]--update\f[R]/\f[C]-U\f[R], a release binary will only
update to its current channel.
\f[C]--update-to CHANNEL\f[R] can be used to switch to a different
channel when a newer version is available.
\f[C]--update-to [CHANNEL\[at]]TAG\f[R] can also be used to upgrade or
downgrade to specific tags from a channel.
.PP
You may also use \f[C]--update-to <repository>\f[R]
(\f[C]<owner>/<repository>\f[R]) to update to a channel on a completely
different repository.
Be careful with what repository you are updating to though, there is no
verification done for binaries from different repositories.
.PP
Example usage: * \f[C]yt-dlp --update-to master\f[R] switch to the
\f[C]master\f[R] channel and update to its latest release *
\f[C]yt-dlp --update-to stable\[at]2023.07.06\f[R] upgrade/downgrade to
release to \f[C]stable\f[R] channel tag \f[C]2023.07.06\f[R] *
\f[C]yt-dlp --update-to 2023.10.07\f[R] upgrade/downgrade to tag
\f[C]2023.10.07\f[R] if it exists on the current channel *
\f[C]yt-dlp --update-to example/yt-dlp\[at]2023.09.24\f[R]
upgrade/downgrade to the release from the \f[C]example/yt-dlp\f[R]
repository, tag \f[C]2023.09.24\f[R]
.PP
\f[B]Important\f[R]: Any user experiencing an issue with the
\f[C]stable\f[R] release should install or update to the
\f[C]nightly\f[R] release before submitting a bug report:
.IP
.nf
\f[C]


# PLUGINS

Note that **all** plugins are imported even if not invoked, and that **there are no checks** performed on plugin code. **Use plugins at your own risk and only if you trust the code!**

Plugins can be of \[ga]<type>\[ga]s \[ga]extractor\[ga] or \[ga]postprocessor\[ga]. 
- Extractor plugins do not need to be enabled from the CLI and are automatically invoked when the input URL is suitable for it. 
- Extractor plugins take priority over builtin extractors.
- Postprocessor plugins can be invoked using \[ga]--use-postprocessor NAME\[ga].


Plugins are loaded from the namespace packages \[ga]yt_dlp_plugins.extractor\[ga] and \[ga]yt_dlp_plugins.postprocessor\[ga].

In other words, the file structure on the disk looks something like:
    
        yt_dlp_plugins/
            extractor/
                myplugin.py
            postprocessor/
                myplugin.py

yt-dlp looks for these \[ga]yt_dlp_plugins\[ga] namespace folders in many locations (see below) and loads in plugins from **all** of them.

See the [wiki for some known plugins](https://github.com/yt-dlp/yt-dlp/wiki/Plugins)

## Installing Plugins

Plugins can be installed using various methods and locations.

1. **Configuration directories**:
   Plugin packages (containing a \[ga]yt_dlp_plugins\[ga] namespace folder) can be dropped into the following standard [configuration locations](#configuration):
    * **User Plugins**
      * \[ga]${XDG_CONFIG_HOME}/yt-dlp/plugins/<package name>/yt_dlp_plugins/\[ga] (recommended on Linux/macOS)
      * \[ga]${XDG_CONFIG_HOME}/yt-dlp-plugins/<package name>/yt_dlp_plugins/\[ga]
      * \[ga]${APPDATA}/yt-dlp/plugins/<package name>/yt_dlp_plugins/\[ga] (recommended on Windows)
      * \[ga]${APPDATA}/yt-dlp-plugins/<package name>/yt_dlp_plugins/\[ga]
      * \[ga]\[ti]/.yt-dlp/plugins/<package name>/yt_dlp_plugins/\[ga]
      * \[ga]\[ti]/yt-dlp-plugins/<package name>/yt_dlp_plugins/\[ga]
    * **System Plugins**
      * \[ga]/etc/yt-dlp/plugins/<package name>/yt_dlp_plugins/\[ga]
      * \[ga]/etc/yt-dlp-plugins/<package name>/yt_dlp_plugins/\[ga]
2. **Executable location**: Plugin packages can similarly be installed in a \[ga]yt-dlp-plugins\[ga] directory under the executable location (recommended for portable installations):
    * Binary: where \[ga]<root-dir>/yt-dlp.exe\[ga], \[ga]<root-dir>/yt-dlp-plugins/<package name>/yt_dlp_plugins/\[ga]
    * Source: where \[ga]<root-dir>/yt_dlp/__main__.py\[ga], \[ga]<root-dir>/yt-dlp-plugins/<package name>/yt_dlp_plugins/\[ga]

3. **pip and other locations in \[ga]PYTHONPATH\[ga]**
    * Plugin packages can be installed and managed using \[ga]pip\[ga]. See [yt-dlp-sample-plugins](https://github.com/yt-dlp/yt-dlp-sample-plugins) for an example.
      * Note: plugin files between plugin packages installed with pip must have unique filenames.
    * Any path in \[ga]PYTHONPATH\[ga] is searched in for the \[ga]yt_dlp_plugins\[ga] namespace folder.
      * Note: This does not apply for Pyinstaller/py2exe builds.


\[ga].zip\[ga], \[ga].egg\[ga] and \[ga].whl\[ga] archives containing a \[ga]yt_dlp_plugins\[ga] namespace folder in their root are also supported as plugin packages.
* e.g. \[ga]${XDG_CONFIG_HOME}/yt-dlp/plugins/mypluginpkg.zip\[ga] where \[ga]mypluginpkg.zip\[ga] contains \[ga]yt_dlp_plugins/<type>/myplugin.py\[ga]

Run yt-dlp with \[ga]--verbose\[ga] to check if the plugin has been loaded.

## Developing Plugins

See the [yt-dlp-sample-plugins](https://github.com/yt-dlp/yt-dlp-sample-plugins) repo for a template plugin package and the [Plugin Development](https://github.com/yt-dlp/yt-dlp/wiki/Plugin-Development) section of the wiki for a plugin development guide.

All public classes with a name ending in \[ga]IE\[ga]/\[ga]PP\[ga] are imported from each file for extractors and postprocessors repectively. This respects underscore prefix (e.g. \[ga]_MyBasePluginIE\[ga] is private) and \[ga]__all__\[ga]. Modules can similarly be excluded by prefixing the module name with an underscore (e.g. \[ga]_myplugin.py\[ga]).

To replace an existing extractor with a subclass of one, set the \[ga]plugin_name\[ga] class keyword argument (e.g. \[ga]class MyPluginIE(ABuiltInIE, plugin_name=\[aq]myplugin\[aq])\[ga] will replace \[ga]ABuiltInIE\[ga] with \[ga]MyPluginIE\[ga]). Since the extractor replaces the parent, you should exclude the subclass extractor from being imported separately by making it private using one of the methods described above.

If you are a plugin author, add [yt-dlp-plugins](https://github.com/topics/yt-dlp-plugins) as a topic to your repository for discoverability.

See the [Developer Instructions](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) on how to write and test an extractor.

# EMBEDDING YT-DLP

yt-dlp makes the best effort to be a good command-line program, and thus should be callable from any programming language.

Your program should avoid parsing the normal stdout since they may change in future versions. Instead they should use options such as \[ga]-J\[ga], \[ga]--print\[ga], \[ga]--progress-template\[ga], \[ga]--exec\[ga] etc to create console output that you can reliably reproduce and parse.

From a Python program, you can embed yt-dlp in a more powerful fashion, like this:

\[ga]\[ga]\[ga]python
from yt_dlp import YoutubeDL

URLS = [\[aq]https://www.youtube.com/watch?v=BaW_jenozKc\[aq]]
with YoutubeDL() as ydl:
    ydl.download(URLS)
\f[R]
.fi
.PP
Most likely, you\[aq]ll want to use various options.
For a list of options available, have a look at
\f[C]yt_dlp/YoutubeDL.py\f[R] or \f[C]help(yt_dlp.YoutubeDL)\f[R] in a
Python shell.
If you are already familiar with the CLI, you can use
\f[C]devscripts/cli_to_api.py\f[R] (https://github.com/yt-dlp/yt-dlp/blob/master/devscripts/cli_to_api.py)
to translate any CLI switches to \f[C]YoutubeDL\f[R] params.
.PP
\f[B]Tip\f[R]: If you are porting your code from youtube-dl to yt-dlp,
one important point to look out for is that we do not guarantee the
return value of \f[C]YoutubeDL.extract_info\f[R] to be json
serializable, or even be a dictionary.
It will be dictionary-like, but if you want to ensure it is a
serializable dictionary, pass it through
\f[C]YoutubeDL.sanitize_info\f[R] as shown in the example below
.SS Embedding examples
.SS Extracting information
.IP
.nf
\f[C]
import json
import yt_dlp

URL = \[aq]https://www.youtube.com/watch?v=BaW_jenozKc\[aq]

# \[u2139]\[uFE0F] See help(yt_dlp.YoutubeDL) for a list of available options and public functions
ydl_opts = {}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
    info = ydl.extract_info(URL, download=False)

    # \[u2139]\[uFE0F] ydl.sanitize_info makes the info json-serializable
    print(json.dumps(ydl.sanitize_info(info)))
\f[R]
.fi
.SS Download using an info-json
.IP
.nf
\f[C]
import yt_dlp

INFO_FILE = \[aq]path/to/video.info.json\[aq]

with yt_dlp.YoutubeDL() as ydl:
    error_code = ydl.download_with_info_file(INFO_FILE)

print(\[aq]Some videos failed to download\[aq] if error_code
      else \[aq]All videos successfully downloaded\[aq])
\f[R]
.fi
.SS Extract audio
.IP
.nf
\f[C]
import yt_dlp

URLS = [\[aq]https://www.youtube.com/watch?v=BaW_jenozKc\[aq]]

ydl_opts = {
    \[aq]format\[aq]: \[aq]m4a/bestaudio/best\[aq],
    # \[u2139]\[uFE0F] See help(yt_dlp.postprocessor) for a list of available Postprocessors and their arguments
    \[aq]postprocessors\[aq]: [{  # Extract audio using ffmpeg
        \[aq]key\[aq]: \[aq]FFmpegExtractAudio\[aq],
        \[aq]preferredcodec\[aq]: \[aq]m4a\[aq],
    }]
}

with yt_dlp.YoutubeDL(ydl_opts) as ydl:
    error_code = ydl.download(URLS)
\f[R]
.fi
.SS Filter videos
.IP
.nf
\f[C]
import yt_dlp

URLS = [\[aq]https://www.youtube.com/watch?v=BaW_jenozKc\[aq]]

def longer_than_a_minute(info, *, incomplete):
    \[dq]\[dq]\[dq]Download only videos longer than a minute (or with unknown duration)\[dq]\[dq]\[dq]
    duration = info.get(\[aq]duration\[aq])
    if duration and duration < 60:
        return \[aq]The video is too short\[aq]

ydl_opts = {
    \[aq]match_filter\[aq]: longer_than_a_minute,
}

with yt_dlp.YoutubeDL(ydl_opts) as ydl:
    error_code = ydl.download(URLS)
\f[R]
.fi
.SS Adding logger and progress hook
.IP
.nf
\f[C]
import yt_dlp

URLS = [\[aq]https://www.youtube.com/watch?v=BaW_jenozKc\[aq]]

class MyLogger:
    def debug(self, msg):
        # For compatibility with youtube-dl, both debug and info are passed into debug
        # You can distinguish them by the prefix \[aq][debug] \[aq]
        if msg.startswith(\[aq][debug] \[aq]):
            pass
        else:
            self.info(msg)

    def info(self, msg):
        pass

    def warning(self, msg):
        pass

    def error(self, msg):
        print(msg)


# \[u2139]\[uFE0F] See \[dq]progress_hooks\[dq] in help(yt_dlp.YoutubeDL)
def my_hook(d):
    if d[\[aq]status\[aq]] == \[aq]finished\[aq]:
        print(\[aq]Done downloading, now post-processing ...\[aq])


ydl_opts = {
    \[aq]logger\[aq]: MyLogger(),
    \[aq]progress_hooks\[aq]: [my_hook],
}

with yt_dlp.YoutubeDL(ydl_opts) as ydl:
    ydl.download(URLS)
\f[R]
.fi
.SS Add a custom PostProcessor
.IP
.nf
\f[C]
import yt_dlp

URLS = [\[aq]https://www.youtube.com/watch?v=BaW_jenozKc\[aq]]

# \[u2139]\[uFE0F] See help(yt_dlp.postprocessor.PostProcessor)
class MyCustomPP(yt_dlp.postprocessor.PostProcessor):
    def run(self, info):
        self.to_screen(\[aq]Doing stuff\[aq])
        return [], info


with yt_dlp.YoutubeDL() as ydl:
    # \[u2139]\[uFE0F] \[dq]when\[dq] can take any value in yt_dlp.utils.POSTPROCESS_WHEN
    ydl.add_post_processor(MyCustomPP(), when=\[aq]pre_process\[aq])
    ydl.download(URLS)
\f[R]
.fi
.SS Use a custom format selector
.IP
.nf
\f[C]
import yt_dlp

URLS = [\[aq]https://www.youtube.com/watch?v=BaW_jenozKc\[aq]]

def format_selector(ctx):
    \[dq]\[dq]\[dq] Select the best video and the best audio that won\[aq]t result in an mkv.
    NOTE: This is just an example and does not handle all cases \[dq]\[dq]\[dq]

    # formats are already sorted worst to best
    formats = ctx.get(\[aq]formats\[aq])[::-1]

    # acodec=\[aq]none\[aq] means there is no audio
    best_video = next(f for f in formats
                      if f[\[aq]vcodec\[aq]] != \[aq]none\[aq] and f[\[aq]acodec\[aq]] == \[aq]none\[aq])

    # find compatible audio extension
    audio_ext = {\[aq]mp4\[aq]: \[aq]m4a\[aq], \[aq]webm\[aq]: \[aq]webm\[aq]}[best_video[\[aq]ext\[aq]]]
    # vcodec=\[aq]none\[aq] means there is no video
    best_audio = next(f for f in formats if (
        f[\[aq]acodec\[aq]] != \[aq]none\[aq] and f[\[aq]vcodec\[aq]] == \[aq]none\[aq] and f[\[aq]ext\[aq]] == audio_ext))

    # These are the minimum required fields for a merged format
    yield {
        \[aq]format_id\[aq]: f\[aq]{best_video[\[dq]format_id\[dq]]}+{best_audio[\[dq]format_id\[dq]]}\[aq],
        \[aq]ext\[aq]: best_video[\[aq]ext\[aq]],
        \[aq]requested_formats\[aq]: [best_video, best_audio],
        # Must be + separated list of protocols
        \[aq]protocol\[aq]: f\[aq]{best_video[\[dq]protocol\[dq]]}+{best_audio[\[dq]protocol\[dq]]}\[aq]
    }


ydl_opts = {
    \[aq]format\[aq]: format_selector,
}

with yt_dlp.YoutubeDL(ydl_opts) as ydl:
    ydl.download(URLS)
\f[R]
.fi
.SH NEW FEATURES
.IP \[bu] 2
Forked from
\f[B]yt-dlc\[at]f9401f2\f[R] (https://github.com/blackjack4494/yt-dlc/commit/f9401f2a91987068139c5f757b12fc711d4c0cee)
and merged with
\f[B]youtube-dl\[at]be008e6\f[R] (https://github.com/ytdl-org/youtube-dl/commit/be008e657d79832642e2158557c899249c9e31cd)
(exceptions (https://github.com/yt-dlp/yt-dlp/issues/21))
.IP \[bu] 2
\f[B]SponsorBlock Integration\f[R]: You can mark/remove sponsor sections
in YouTube videos by utilizing the
SponsorBlock (https://sponsor.ajay.app) API
.IP \[bu] 2
\f[B]Format Sorting\f[R]: The default format sorting options have been
changed so that higher resolution and better codecs will be now
preferred instead of simply using larger bitrate.
Furthermore, you can now specify the sort order using \f[C]-S\f[R].
This allows for much easier format selection than what is possible by
simply using \f[C]--format\f[R] (examples)
.IP \[bu] 2
\f[B]Merged with animelover1984/youtube-dl\f[R]: You get most of the
features and improvements from
animelover1984/youtube-dl (https://github.com/animelover1984/youtube-dl)
including \f[C]--write-comments\f[R], \f[C]BiliBiliSearch\f[R],
\f[C]BilibiliChannel\f[R], Embedding thumbnail in mp4/ogg/opus, playlist
infojson etc.
Note that NicoNico livestreams are not available.
See #31 (https://github.com/yt-dlp/yt-dlp/pull/31) for details.
.IP \[bu] 2
\f[B]YouTube improvements\f[R]:
.RS 2
.IP \[bu] 2
Supports Clips, Stories (\f[C]ytstories:<channel UCID>\f[R]), Search
(including filters)\f[B]*\f[R], YouTube Music Search, Channel-specific
search, Search prefixes (\f[C]ytsearch:\f[R],
\f[C]ytsearchdate:\f[R])\f[B]*\f[R], Mixes, and Feeds (\f[C]:ytfav\f[R],
\f[C]:ytwatchlater\f[R], \f[C]:ytsubs\f[R], \f[C]:ythistory\f[R],
\f[C]:ytrec\f[R], \f[C]:ytnotif\f[R])
.IP \[bu] 2
Fix for n-sig based
throttling (https://github.com/ytdl-org/youtube-dl/issues/29326)
\f[B]*\f[R]
.IP \[bu] 2
Supports some (but not all) age-gated content without cookies
.IP \[bu] 2
Download livestreams from the start using \f[C]--live-from-start\f[R]
(\f[I]experimental\f[R])
.IP \[bu] 2
Channel URLs download all uploads of the channel, including shorts and
live
.RE
.IP \[bu] 2
\f[B]Cookies from browser\f[R]: Cookies can be automatically extracted
from all major web browsers using
\f[C]--cookies-from-browser BROWSER[+KEYRING][:PROFILE][::CONTAINER]\f[R]
.IP \[bu] 2
\f[B]Download time range\f[R]: Videos can be downloaded partially based
on either timestamps or chapters using \f[C]--download-sections\f[R]
.IP \[bu] 2
\f[B]Split video by chapters\f[R]: Videos can be split into multiple
files based on chapters using \f[C]--split-chapters\f[R]
.IP \[bu] 2
\f[B]Multi-threaded fragment downloads\f[R]: Download multiple fragments
of m3u8/mpd videos in parallel.
Use \f[C]--concurrent-fragments\f[R] (\f[C]-N\f[R]) option to set the
number of threads used
.IP \[bu] 2
\f[B]Aria2c with HLS/DASH\f[R]: You can use \f[C]aria2c\f[R] as the
external downloader for DASH(mpd) and HLS(m3u8) formats
.IP \[bu] 2
\f[B]New and fixed extractors\f[R]: Many new extractors have been added
and a lot of existing ones have been fixed.
See the changelog or the list of supported sites
.IP \[bu] 2
\f[B]New MSOs\f[R]: Philo, Spectrum, SlingTV, Cablevision, RCN etc.
.IP \[bu] 2
\f[B]Subtitle extraction from manifests\f[R]: Subtitles can be extracted
from streaming media manifests.
See
commit/be6202f (https://github.com/yt-dlp/yt-dlp/commit/be6202f12b97858b9d716e608394b51065d0419f)
for details
.IP \[bu] 2
\f[B]Multiple paths and output templates\f[R]: You can give different
output templates and download paths for different types of files.
You can also set a temporary path where intermediary files are
downloaded to using \f[C]--paths\f[R] (\f[C]-P\f[R])
.IP \[bu] 2
\f[B]Portable Configuration\f[R]: Configuration files are automatically
loaded from the home and root directories.
See CONFIGURATION for details
.IP \[bu] 2
\f[B]Output template improvements\f[R]: Output templates can now have
date-time formatting, numeric offsets, object traversal etc.
See output template for details.
Even more advanced operations can also be done with the help of
\f[C]--parse-metadata\f[R] and \f[C]--replace-in-metadata\f[R]
.IP \[bu] 2
\f[B]Other new options\f[R]: Many new options have been added such as
\f[C]--alias\f[R], \f[C]--print\f[R], \f[C]--concat-playlist\f[R],
\f[C]--wait-for-video\f[R], \f[C]--retry-sleep\f[R],
\f[C]--sleep-requests\f[R], \f[C]--convert-thumbnails\f[R],
\f[C]--force-download-archive\f[R], \f[C]--force-overwrites\f[R],
\f[C]--break-match-filter\f[R] etc
.IP \[bu] 2
\f[B]Improvements\f[R]: Regex and other operators in
\f[C]--format\f[R]/\f[C]--match-filter\f[R], multiple
\f[C]--postprocessor-args\f[R] and \f[C]--downloader-args\f[R], faster
archive checking, more format selection options, merge
multi-video/audio, multiple \f[C]--config-locations\f[R],
\f[C]--exec\f[R] at different stages, etc
.IP \[bu] 2
\f[B]Plugins\f[R]: Extractors and PostProcessors can be loaded from an
external file.
See plugins for details
.IP \[bu] 2
\f[B]Self updater\f[R]: The releases can be updated using
\f[C]yt-dlp -U\f[R], and downgraded using \f[C]--update-to\f[R] if
required
.IP \[bu] 2
\f[B]Automated builds\f[R]: Nightly/master builds can be used with
\f[C]--update-to nightly\f[R] and \f[C]--update-to master\f[R]
.PP
See changelog or commits (https://github.com/yt-dlp/yt-dlp/commits) for
the full list of changes
.PP
Features marked with a \f[B]*\f[R] have been back-ported to youtube-dl
.SS Differences in default behavior
.PP
Some of yt-dlp\[aq]s default options are different from that of
youtube-dl and youtube-dlc:
.IP \[bu] 2
yt-dlp supports only Python 3.8+, and \f[I]may\f[R] remove support for
more versions as they become
EOL (https://devguide.python.org/versions/#python-release-cycle); while
youtube-dl still supports Python 2.6+ and
3.2+ (https://github.com/ytdl-org/youtube-dl/issues/30568#issue-1118238743)
.IP \[bu] 2
The options \f[C]--auto-number\f[R] (\f[C]-A\f[R]), \f[C]--title\f[R]
(\f[C]-t\f[R]) and \f[C]--literal\f[R] (\f[C]-l\f[R]), no longer work.
See removed options for details
.IP \[bu] 2
\f[C]avconv\f[R] is not supported as an alternative to \f[C]ffmpeg\f[R]
.IP \[bu] 2
yt-dlp stores config files in slightly different locations to
youtube-dl.
See CONFIGURATION for a list of correct locations
.IP \[bu] 2
The default output template is \f[C]%(title)s [%(id)s].%(ext)s\f[R].
There is no real reason for this change.
This was changed before yt-dlp was ever made public and now there are no
plans to change it back to \f[C]%(title)s-%(id)s.%(ext)s\f[R].
Instead, you may use \f[C]--compat-options filename\f[R]
.IP \[bu] 2
The default format sorting is different from youtube-dl and prefers
higher resolution and better codecs rather than higher bitrates.
You can use the \f[C]--format-sort\f[R] option to change this to any
order you prefer, or use \f[C]--compat-options format-sort\f[R] to use
youtube-dl\[aq]s sorting order
.IP \[bu] 2
The default format selector is \f[C]bv*+ba/b\f[R].
This means that if a combined video + audio format that is better than
the best video-only format is found, the former will be preferred.
Use \f[C]-f bv+ba/b\f[R] or \f[C]--compat-options format-spec\f[R] to
revert this
.IP \[bu] 2
Unlike youtube-dlc, yt-dlp does not allow merging multiple audio/video
streams into one file by default (since this conflicts with the use of
\f[C]-f bv*+ba\f[R]).
If needed, this feature must be enabled using
\f[C]--audio-multistreams\f[R] and \f[C]--video-multistreams\f[R].
You can also use \f[C]--compat-options multistreams\f[R] to enable both
.IP \[bu] 2
\f[C]--no-abort-on-error\f[R] is enabled by default.
Use \f[C]--abort-on-error\f[R] or
\f[C]--compat-options abort-on-error\f[R] to abort on errors instead
.IP \[bu] 2
When writing metadata files such as thumbnails, description or infojson,
the same information (if available) is also written for playlists.
Use \f[C]--no-write-playlist-metafiles\f[R] or
\f[C]--compat-options no-playlist-metafiles\f[R] to not write these
files
.IP \[bu] 2
\f[C]--add-metadata\f[R] attaches the \f[C]infojson\f[R] to
\f[C]mkv\f[R] files in addition to writing the metadata when used with
\f[C]--write-info-json\f[R].
Use \f[C]--no-embed-info-json\f[R] or
\f[C]--compat-options no-attach-info-json\f[R] to revert this
.IP \[bu] 2
Some metadata are embedded into different fields when using
\f[C]--add-metadata\f[R] as compared to youtube-dl.
Most notably, \f[C]comment\f[R] field contains the \f[C]webpage_url\f[R]
and \f[C]synopsis\f[R] contains the \f[C]description\f[R].
You can use \f[C]--parse-metadata\f[R] to modify this to your liking or
use \f[C]--compat-options embed-metadata\f[R] to revert this
.IP \[bu] 2
\f[C]playlist_index\f[R] behaves differently when used with options like
\f[C]--playlist-reverse\f[R] and \f[C]--playlist-items\f[R].
See #302 (https://github.com/yt-dlp/yt-dlp/issues/302) for details.
You can use \f[C]--compat-options playlist-index\f[R] if you want to
keep the earlier behavior
.IP \[bu] 2
The output of \f[C]-F\f[R] is listed in a new format.
Use \f[C]--compat-options list-formats\f[R] to revert this
.IP \[bu] 2
Live chats (if available) are considered as subtitles.
Use \f[C]--sub-langs all,-live_chat\f[R] to download all subtitles
except live chat.
You can also use \f[C]--compat-options no-live-chat\f[R] to prevent any
live chat/danmaku from downloading
.IP \[bu] 2
YouTube channel URLs download all uploads of the channel.
To download only the videos in a specific tab, pass the tab\[aq]s URL.
If the channel does not show the requested tab, an error will be raised.
Also, \f[C]/live\f[R] URLs raise an error if there are no live videos
instead of silently downloading the entire channel.
You may use \f[C]--compat-options no-youtube-channel-redirect\f[R] to
revert all these redirections
.IP \[bu] 2
Unavailable videos are also listed for YouTube playlists.
Use \f[C]--compat-options no-youtube-unavailable-videos\f[R] to remove
this
.IP \[bu] 2
The upload dates extracted from YouTube are in UTC when
available (https://github.com/yt-dlp/yt-dlp/blob/89e4d86171c7b7c997c77d4714542e0383bf0db0/yt_dlp/extractor/youtube.py#L3898-L3900).
Use \f[C]--compat-options no-youtube-prefer-utc-upload-date\f[R] to
prefer the non-UTC upload date.
.IP \[bu] 2
If \f[C]ffmpeg\f[R] is used as the downloader, the downloading and
merging of formats happen in a single step when possible.
Use \f[C]--compat-options no-direct-merge\f[R] to revert this
.IP \[bu] 2
Thumbnail embedding in \f[C]mp4\f[R] is done with mutagen if possible.
Use \f[C]--compat-options embed-thumbnail-atomicparsley\f[R] to force
the use of AtomicParsley instead
.IP \[bu] 2
Some internal metadata such as filenames are removed by default from the
infojson.
Use \f[C]--no-clean-infojson\f[R] or
\f[C]--compat-options no-clean-infojson\f[R] to revert this
.IP \[bu] 2
When \f[C]--embed-subs\f[R] and \f[C]--write-subs\f[R] are used
together, the subtitles are written to disk and also embedded in the
media file.
You can use just \f[C]--embed-subs\f[R] to embed the subs and
automatically delete the separate file.
See #630
(comment) (https://github.com/yt-dlp/yt-dlp/issues/630#issuecomment-893659460)
for more info.
\f[C]--compat-options no-keep-subs\f[R] can be used to revert this
.IP \[bu] 2
\f[C]certifi\f[R] will be used for SSL root certificates, if installed.
If you want to use system certificates (e.g.
self-signed), use \f[C]--compat-options no-certifi\f[R]
.IP \[bu] 2
yt-dlp\[aq]s sanitization of invalid characters in filenames is
different/smarter than in youtube-dl.
You can use \f[C]--compat-options filename-sanitization\f[R] to revert
to youtube-dl\[aq]s behavior
.IP \[bu] 2
yt-dlp tries to parse the external downloader outputs into the standard
progress output if possible (Currently implemented:
[STRIKEOUT:aria2c] (https://github.com/yt-dlp/yt-dlp/issues/5931)).
You can use \f[C]--compat-options no-external-downloader-progress\f[R]
to get the downloader output as-is
.IP \[bu] 2
yt-dlp versions between 2021.09.01 and 2023.01.02 applies
\f[C]--match-filter\f[R] to nested playlists.
This was an unintentional side-effect of
8f18ac (https://github.com/yt-dlp/yt-dlp/commit/8f18aca8717bb0dd49054555af8d386e5eda3a88)
and is fixed in
d7b460 (https://github.com/yt-dlp/yt-dlp/commit/d7b460d0e5fc710950582baed2e3fc616ed98a80).
Use \f[C]--compat-options playlist-match-filter\f[R] to revert this
.IP \[bu] 2
yt-dlp versions between 2021.11.10 and 2023.06.21 estimated
\f[C]filesize_approx\f[R] values for fragmented/manifest formats.
This was added for convenience in
f2fe69 (https://github.com/yt-dlp/yt-dlp/commit/f2fe69c7b0d208bdb1f6292b4ae92bc1e1a7444a),
but was reverted in
0dff8e (https://github.com/yt-dlp/yt-dlp/commit/0dff8e4d1e6e9fb938f4256ea9af7d81f42fd54f)
due to the potentially extreme inaccuracy of the estimated values.
Use \f[C]--compat-options manifest-filesize-approx\f[R] to keep
extracting the estimated values
.IP \[bu] 2
yt-dlp uses modern http client backends such as \f[C]requests\f[R].
Use \f[C]--compat-options prefer-legacy-http-handler\f[R] to prefer the
legacy http handler (\f[C]urllib\f[R]) to be used for standard http
requests.
.IP \[bu] 2
The sub-module \f[C]swfinterp\f[R] is removed.
.PP
For ease of use, a few more compat options are available:
.IP \[bu] 2
\f[C]--compat-options all\f[R]: Use all compat options (Do NOT use)
.IP \[bu] 2
\f[C]--compat-options youtube-dl\f[R]: Same as
\f[C]--compat-options all,-multistreams,-playlist-match-filter,-manifest-filesize-approx\f[R]
.IP \[bu] 2
\f[C]--compat-options youtube-dlc\f[R]: Same as
\f[C]--compat-options all,-no-live-chat,-no-youtube-channel-redirect,-playlist-match-filter,-manifest-filesize-approx\f[R]
.IP \[bu] 2
\f[C]--compat-options 2021\f[R]: Same as
\f[C]--compat-options 2022,no-certifi,filename-sanitization,no-youtube-prefer-utc-upload-date\f[R]
.IP \[bu] 2
\f[C]--compat-options 2022\f[R]: Same as
\f[C]--compat-options playlist-match-filter,no-external-downloader-progress,prefer-legacy-http-handler,manifest-filesize-approx\f[R].
Use this to enable all future compat options
.SH DEPRECATED OPTIONS
.PP
These are all the deprecated options and the current alternative to
achieve the same effect
.SS Almost redundant options
.PP
While these options are almost the same as their new counterparts, there
are some differences that prevents them being redundant
.IP
.nf
\f[C]
-j, --dump-json                  --print \[dq]%()j\[dq]
-F, --list-formats               --print formats_table
--list-thumbnails                --print thumbnails_table --print playlist:thumbnails_table
--list-subs                      --print automatic_captions_table --print subtitles_table
\f[R]
.fi
.SS Redundant options
.PP
While these options are redundant, they are still expected to be used
due to their ease of use
.IP
.nf
\f[C]
--get-description                --print description
--get-duration                   --print duration_string
--get-filename                   --print filename
--get-format                     --print format
--get-id                         --print id
--get-thumbnail                  --print thumbnail
-e, --get-title                  --print title
-g, --get-url                    --print urls
--match-title REGEX              --match-filter \[dq]title \[ti]= (?i)REGEX\[dq]
--reject-title REGEX             --match-filter \[dq]title !\[ti]= (?i)REGEX\[dq]
--min-views COUNT                --match-filter \[dq]view_count >=? COUNT\[dq]
--max-views COUNT                --match-filter \[dq]view_count <=? COUNT\[dq]
--break-on-reject                Use --break-match-filter
--user-agent UA                  --add-header \[dq]User-Agent:UA\[dq]
--referer URL                    --add-header \[dq]Referer:URL\[dq]
--playlist-start NUMBER          -I NUMBER:
--playlist-end NUMBER            -I :NUMBER
--playlist-reverse               -I ::-1
--no-playlist-reverse            Default
--no-colors                      --color no_color
\f[R]
.fi
.SS Not recommended
.PP
While these options still work, their use is not recommended since there
are other alternatives to achieve the same
.IP
.nf
\f[C]
--force-generic-extractor        --ies generic,default
--exec-before-download CMD       --exec \[dq]before_dl:CMD\[dq]
--no-exec-before-download        --no-exec
--all-formats                    -f all
--all-subs                       --sub-langs all --write-subs
--print-json                     -j --no-simulate
--autonumber-size NUMBER         Use string formatting, e.g. %(autonumber)03d
--autonumber-start NUMBER        Use internal field formatting like %(autonumber+NUMBER)s
--id                             -o \[dq]%(id)s.%(ext)s\[dq]
--metadata-from-title FORMAT     --parse-metadata \[dq]%(title)s:FORMAT\[dq]
--hls-prefer-native              --downloader \[dq]m3u8:native\[dq]
--hls-prefer-ffmpeg              --downloader \[dq]m3u8:ffmpeg\[dq]
--list-formats-old               --compat-options list-formats (Alias: --no-list-formats-as-table)
--list-formats-as-table          --compat-options -list-formats [Default] (Alias: --no-list-formats-old)
--youtube-skip-dash-manifest     --extractor-args \[dq]youtube:skip=dash\[dq] (Alias: --no-youtube-include-dash-manifest)
--youtube-skip-hls-manifest      --extractor-args \[dq]youtube:skip=hls\[dq] (Alias: --no-youtube-include-hls-manifest)
--youtube-include-dash-manifest  Default (Alias: --no-youtube-skip-dash-manifest)
--youtube-include-hls-manifest   Default (Alias: --no-youtube-skip-hls-manifest)
--geo-bypass                     --xff \[dq]default\[dq]
--no-geo-bypass                  --xff \[dq]never\[dq]
--geo-bypass-country CODE        --xff CODE
--geo-bypass-ip-block IP_BLOCK   --xff IP_BLOCK
\f[R]
.fi
.SS Developer options
.PP
These options are not intended to be used by the end-user
.IP
.nf
\f[C]
--test                           Download only part of video for testing extractors
--load-pages                     Load pages dumped by --write-pages
--youtube-print-sig-code         For testing youtube signatures
--allow-unplayable-formats       List unplayable formats also
--no-allow-unplayable-formats    Default
\f[R]
.fi
.SS Old aliases
.PP
These are aliases that are no longer documented for various reasons
.IP
.nf
\f[C]
--avconv-location                --ffmpeg-location
--clean-infojson                 --clean-info-json
--cn-verification-proxy URL      --geo-verification-proxy URL
--dump-headers                   --print-traffic
--dump-intermediate-pages        --dump-pages
--force-write-download-archive   --force-write-archive
--load-info                      --load-info-json
--no-clean-infojson              --no-clean-info-json
--no-split-tracks                --no-split-chapters
--no-write-srt                   --no-write-subs
--prefer-unsecure                --prefer-insecure
--rate-limit RATE                --limit-rate RATE
--split-tracks                   --split-chapters
--srt-lang LANGS                 --sub-langs LANGS
--trim-file-names LENGTH         --trim-filenames LENGTH
--write-srt                      --write-subs
--yes-overwrites                 --force-overwrites
\f[R]
.fi
.SS Sponskrub Options
.PP
Support for SponSkrub (https://github.com/faissaloo/SponSkrub) has been
deprecated in favor of the \f[C]--sponsorblock\f[R] options
.IP
.nf
\f[C]
--sponskrub                      --sponsorblock-mark all
--no-sponskrub                   --no-sponsorblock
--sponskrub-cut                  --sponsorblock-remove all
--no-sponskrub-cut               --sponsorblock-remove -all
--sponskrub-force                Not applicable
--no-sponskrub-force             Not applicable
--sponskrub-location             Not applicable
--sponskrub-args                 Not applicable
\f[R]
.fi
.SS No longer supported
.PP
These options may no longer work as intended
.IP
.nf
\f[C]
--prefer-avconv                  avconv is not officially supported by yt-dlp (Alias: --no-prefer-ffmpeg)
--prefer-ffmpeg                  Default (Alias: --no-prefer-avconv)
-C, --call-home                  Not implemented
--no-call-home                   Default
--include-ads                    No longer supported
--no-include-ads                 Default
--write-annotations              No supported site has annotations now
--no-write-annotations           Default
--compat-options seperate-video-versions  No longer needed
\f[R]
.fi
.SS Removed
.PP
These options were deprecated since 2014 and have now been entirely
removed
.IP
.nf
\f[C]
-A, --auto-number                -o \[dq]%(autonumber)s-%(id)s.%(ext)s\[dq]
-t, -l, --title, --literal       -o \[dq]%(title)s-%(id)s.%(ext)s\[dq]
\f[R]
.fi
.SH CONTRIBUTING
.PP
See CONTRIBUTING.md for instructions on Opening an Issue and
Contributing code to the project
.SH WIKI
.PP
See the Wiki (https://github.com/yt-dlp/yt-dlp/wiki) for more
information