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.

83 lines
2.0 KiB

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