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.

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