You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.0 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. # -*- coding: UTF-8 -*-
  2. from .utils import TwoWayOrderedDict as tdict
  3. OUTPUT_FORMATS = tdict([
  4. (0, "ID"),
  5. (1, "Title"),
  6. (2, "Title + ID"),
  7. (4, "Title + Quality"),
  8. (5, "Title + ID + Quality"),
  9. (3, "Custom")
  10. ])
  11. DEFAULT_FORMATS = tdict([
  12. ("0", "default")
  13. ])
  14. VIDEO_FORMATS = tdict([
  15. ("3gp", "3gp"),
  16. ("17", "3gp [144p]"),
  17. ("36", "3gp [240p]"),
  18. ("flv", "flv"),
  19. ("5", "flv [240p]"),
  20. ("34", "flv [360p]"),
  21. ("35", "flv [480p]"),
  22. ("webm", "webm"),
  23. ("43", "webm [360p]"),
  24. ("44", "webm [480p]"),
  25. ("45", "webm [720p]"),
  26. ("46", "webm [1080p]"),
  27. ("mp4", "mp4"),
  28. ("18", "mp4 [360p]"),
  29. ("22", "mp4 [720p]"),
  30. ("37", "mp4 [1080p]"),
  31. ("38", "mp4 [4K]"),
  32. ("160", "mp4 [144p] (DASH Video)"),
  33. ("133", "mp4 [240p] (DASH Video)"),
  34. ("134", "mp4 [360p] (DASH Video)"),
  35. ("135", "mp4 [480p] (DASH Video)"),
  36. ("136", "mp4 [720p] (DASH Video)"),
  37. ("137", "mp4 [1080p] (DASH Video)"),
  38. ("264", "mp4 [1440p] (DASH Video)"),
  39. ("138", "mp4 [2160p] (DASH Video)"),
  40. ("242", "webm [240p] (DASH Video)"),
  41. ("243", "webm [360p] (DASH Video)"),
  42. ("244", "webm [480p] (DASH Video)"),
  43. ("247", "webm [720p] (DASH Video)"),
  44. ("248", "webm [1080p] (DASH Video)"),
  45. ("271", "webm [1440p] (DASH Video)"),
  46. ("272", "webm [2160p] (DASH Video)"),
  47. ("82", "mp4 [360p] (3D)"),
  48. ("83", "mp4 [480p] (3D)"),
  49. ("84", "mp4 [720p] (3D)"),
  50. ("85", "mp4 [1080p] (3D)"),
  51. ("100", "webm [360p] (3D)"),
  52. ("101", "webm [480p] (3D)"),
  53. ("102", "webm [720p] (3D)"),
  54. ("139", "m4a 48k (DASH Audio)"),
  55. ("140", "m4a 128k (DASH Audio)"),
  56. ("141", "m4a 256k (DASH Audio)"),
  57. ("171", "webm 48k (DASH Audio)"),
  58. ("172", "webm 256k (DASH Audio)")
  59. ])
  60. AUDIO_FORMATS = tdict([
  61. ("mp3", "mp3"),
  62. ("wav", "wav"),
  63. ("aac", "aac"),
  64. ("m4a", "m4a"),
  65. ("vorbis", "vorbis"),
  66. ("opus", "opus")
  67. ])
  68. FORMATS = DEFAULT_FORMATS.copy()
  69. FORMATS.update(VIDEO_FORMATS)
  70. FORMATS.update(AUDIO_FORMATS)