Video.proto 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. // Unix timestamp in milli-seconds
  7. optional uint32 timestamp = 2;
  8. }
  9. // License types defined by Joystream
  10. message License {
  11. // License code defined by Joystream. [reference](../src/KnownLicenses.json)
  12. optional int32 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. // Lengths of video in seconds
  33. optional int32 duration = 3;
  34. // Resolution of the video (Height)
  35. optional int32 media_pixel_height = 4;
  36. // Resolution of the video (Width)
  37. optional int32 media_pixel_width = 5;
  38. // Encoding and Container format used
  39. optional MediaType media_type = 6;
  40. // ISO_639-1 Language [Code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
  41. optional string language = 7;
  42. // License type for the media
  43. optional License license = 8;
  44. // Date of publication
  45. optional PublishedBeforeJoystream published_before_joystream = 9;
  46. // Does video have marketing or advertising in the stream
  47. optional bool has_marketing = 10;
  48. // Should video be publicy visible yet
  49. optional bool is_public = 11;
  50. // Does Video have explicit language or scenes
  51. optional bool is_explicit = 12;
  52. }