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.

75 lines
1.7 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. (3, "Custom")
  8. ])
  9. DEFAULT_FORMATS = tdict([
  10. ("0", "default")
  11. ])
  12. VIDEO_FORMATS = tdict([
  13. ("17", "3gp [176x144]"),
  14. ("36", "3gp [320x240]"),
  15. ("5", "flv [400x240]"),
  16. ("34", "flv [640x360]"),
  17. ("35", "flv [854x480]"),
  18. ("43", "webm [640x360]"),
  19. ("44", "webm [854x480]"),
  20. ("45", "webm [1280x720]"),
  21. ("46", "webm [1920x1080]"),
  22. ("18", "mp4 [640x360]"),
  23. ("22", "mp4 [1280x720]"),
  24. ("37", "mp4 [1920x1080]"),
  25. ("38", "mp4 [4096x3072]"),
  26. ("160", "mp4 144p (DASH)"),
  27. ("133", "mp4 240p (DASH)"),
  28. ("134", "mp4 360p (DASH)"),
  29. ("135", "mp4 480p (DASH)"),
  30. ("136", "mp4 720p (DASH)"),
  31. ("137", "mp4 1080p (DASH)"),
  32. ("264", "mp4 1440p (DASH)"),
  33. ("138", "mp4 2160p (DASH)"),
  34. ("242", "webm 240p (DASH)"),
  35. ("243", "webm 360p (DASH)"),
  36. ("244", "webm 480p (DASH)"),
  37. ("247", "webm 720p (DASH)"),
  38. ("248", "webm 1080p (DASH)"),
  39. ("271", "webm 1440p (DASH)"),
  40. ("272", "webm 2160p (DASH)"),
  41. ("82", "mp4 360p (3D)"),
  42. ("83", "mp4 480p (3D)"),
  43. ("84", "mp4 720p (3D)"),
  44. ("85", "mp4 1080p (3D)"),
  45. ("100", "webm 360p (3D)"),
  46. ("101", "webm 480p (3D)"),
  47. ("102", "webm 720p (3D)"),
  48. ("139", "m4a 48k (DASH AUDIO)"),
  49. ("140", "m4a 128k (DASH AUDIO)"),
  50. ("141", "m4a 256k (DASH AUDIO)"),
  51. ("171", "webm 48k (DASH AUDIO)"),
  52. ("172", "webm 256k (DASH AUDIO)")
  53. ])
  54. AUDIO_FORMATS = tdict([
  55. ("mp3", "mp3"),
  56. ("wav", "wav"),
  57. ("aac", "aac"),
  58. ("m4a", "m4a"),
  59. ("vorbis", "vorbis"),
  60. ("opus", "opus")
  61. ])
  62. FORMATS = DEFAULT_FORMATS.copy()
  63. FORMATS.update(VIDEO_FORMATS)
  64. FORMATS.update(AUDIO_FORMATS)