Javicle - a JSON Video Composition Language
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.

преди 3 години
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Javicle - a JSON Video Composition Language
  2. Javicle is not a replacement for Final Cut Pro or even iMovie.
  3. Javicle might be right for you if your video composition and manipulation needs are relatively simple
  4. and you enjoy doing things with the command line and some JSON config instead of a GUI.
  5. This also give you the ability to track more of your workflow in source control - if you commit all
  6. the original assets and the .jvcl files that describe how to create the output assets, you don't need
  7. to save/archive the output assets anywhere.
  8. Note, for those who want truly 100% re-creatable builds, you would also need to record the versions
  9. of the various tools used (ffmpeg, etc) and reuse those same versions when recreating a build. This is
  10. generally overkill though, since the options we use on the different tools have been stable for a while
  11. and I see a low likelihood of a significant change in behavior, or a bug being introduced.
  12. In JVCL there are two main concepts: assets and operations.
  13. Assets are the inputs - generally image, audio and video files. Assets have a name and a path.
  14. The path can be a file or a URL.
  15. Operations are transformations to perform on the inputs.
  16. An operation can produce a new intermediate asset.
  17. Intermediate assets have names, and special paths that indicate how to reconstruct them from their assets, such that if you have the path of an intermediate asset, you can recreate its content, assuming you supply the same input assets.
  18. ## Operations
  19. ### split
  20. Split an audio/video asset into multiple assets
  21. ### concat
  22. Concatenate audio/video assets together into one asset
  23. ### trim
  24. Trim audio/video - crop from beginning, end, or both
  25. ### overlay
  26. Overlay one video file onto another
  27. ### ken-burns
  28. For transforming still images into video via a fade-pan (aka Ken Burns) effect
  29. ### letterbox
  30. Transform a video in one size to another size using black letterboxes on the sides or top/bottom. Handy for embedding mobile videos into other screen formats
  31. ### split-silence
  32. Split an audio file according to silence
  33. ## Example
  34. ```json
  35. {
  36. "assets": [
  37. {"name": "vid1", "path": "/tmp/path/to/video1.mp4"},
  38. {"name": "vid2", "path": "/tmp/path/to/video2.mp4"}
  39. ],
  40. "operations": [
  41. {
  42. "operation": "split", // name of the operation
  43. "creates": "vid1_split_%", // assets it creates, the '%' will be replaced with a counter
  44. "perform": {
  45. "split": "vid1", // split this source asset
  46. "interval": "10s" // split every ten seconds
  47. }
  48. },
  49. {
  50. "operation": "concat", // name of the operation
  51. "creates": "recombined_vid1", // assets it creates, the '%' will be replaced with a counter
  52. "perform": {
  53. "concat": ["vid1_split"] // recombine all split assets
  54. }
  55. },
  56. {
  57. "operation": "concat", // name of the operation
  58. "creates": "combined_vid", // asset it creates, can be referenced later
  59. "perform": {
  60. "concat": ["vid1", "vid2"] // operation-specific: this says, concatenate these named assets
  61. }
  62. },
  63. {
  64. "operation": "concat", // name of the operation
  65. "creates": "combined_vid", // the asset it creates, can be referenced later
  66. "perform": {
  67. "concat": ["vid1", "vid2"] // operation-specific: this says, concatenate these named assets
  68. }
  69. },
  70. {
  71. "operation": "overlay", // name of the operation
  72. "creates": "overlay1", // asset it creates
  73. "perform": {
  74. "source": "combined_vid1", // main video asset
  75. "overlay": "vid1", // overlay this video on the main video
  76. "start": "vid1.end_ts", // when (on the main video timeline) to start the overlay. default is 0 (beginning)
  77. "duration": "vid1.duration", // how long to play the overlay. default is to play the entire overlay asset
  78. "width": 400, // how wide the overlay will be, in pixels. default is "overlay.width"
  79. "height": 300, // how tall the overlay will be, in pixels. default is "overlay.height"
  80. "x": "source.width / 2", // horizontal overlay position. default is 0
  81. "y": "source.height / 2", // vertical overlay position. default is 0
  82. "out": "1080p", // this is a shortcut to the two lines below, and is the preferred way of specifying the output resolution
  83. "out_width": 1920, // output width in pixels. default is source width
  84. "out_height": 1024 // output height in pixes. default is source height
  85. }
  86. }
  87. ]
  88. }
  89. ```