Video.proto 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. syntax = "proto2";
  2. // Publication status before joystream
  3. message PublishedBeforeJoystream {
  4. // Was video published before joystream platform
  5. optional bool is_published = 1;
  6. // Date of publication: 'YYYY-MM-DD' [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
  7. optional string date = 2;
  8. }
  9. // License types defined by Joystream
  10. message License {
  11. // License code defined by Joystream. [reference](../src/KnownLicenses.json)
  12. optional uint32 code = 1;
  13. // Text for licenses that require an attribution
  14. optional string attribution = 2;
  15. // Text for custom license type
  16. optional string custom_text = 3;
  17. }
  18. // Codec, Container, MIME media-type information
  19. message MediaType {
  20. // Codec corresponding to `name` field from [FFmpeg](https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/codec_desc.c)
  21. optional string codec_name = 1;
  22. // Video container format, eg. 'MP4', 'WebM', 'Ogg' [ref](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs)
  23. optional string container = 2;
  24. // MIME Media Type, eg. 'video/mp4' [ref](https://www.iana.org/assignments/media-types/media-types.xhtml#video)
  25. optional string mime_media_type = 3;
  26. }
  27. message VideoMetadata {
  28. // Video Title
  29. optional string title = 1;
  30. // Video Description
  31. optional string description = 2;
  32. // Assets
  33. // index into external [assets array](#.Assets)
  34. optional uint32 video = 3;
  35. // index into external [assets array](#.Assets)
  36. optional uint32 thumbnail_photo = 4;
  37. // Lengths of video in seconds
  38. optional uint32 duration = 5;
  39. // Resolution of the video (Height)
  40. optional uint32 media_pixel_height = 6;
  41. // Resolution of the video (Width)
  42. optional uint32 media_pixel_width = 7;
  43. // Encoding and Container format used
  44. optional MediaType media_type = 8;
  45. // ISO_639-1 Language [Code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
  46. optional string language = 9;
  47. // License type for the media
  48. optional License license = 10;
  49. // Date of publication
  50. optional PublishedBeforeJoystream published_before_joystream = 11;
  51. // Does video have marketing or advertising in the stream
  52. optional bool has_marketing = 12;
  53. // Should video be publicy visible yet
  54. optional bool is_public = 13;
  55. // Does Video have explicit language or scenes
  56. optional bool is_explicit = 14;
  57. // Person(s) referenced by PersonId involved in this video
  58. repeated uint64 persons = 15 [packed=true];
  59. // Video Category Id
  60. optional uint64 category = 16;
  61. }
  62. message VideoCategoryMetadata {
  63. // Category name
  64. optional string name = 1;
  65. }