Javicle - a JSON Video Composition Language
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
3 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. # Javicle - a JSON Video Composition Language
  2. Javicle (JVC for short) is a JSON DSL for audio/video transformations.
  3. Under the hood, it's all shell commands: `ffmpeg`, `mediainfo` and so on.
  4. JVC provides higher-level semantics for working with these lower level tools.
  5. # Motivation
  6. I infrequently find myself doing video editing, so I've never bothered to
  7. learn iMovie or any graphical video editor.
  8. My editing needs are usually pretty simple, so I bust out ffmpeg and get the
  9. job done.
  10. But it seems like every time, there is at least one wrinkle in the requirements
  11. that requires some deep research into
  12. [ffmpeg filter arcana](https://ffmpeg.org/ffmpeg-filters.html).
  13. Hours later, before I know it, the day has gone by.
  14. I created JVC to make it really easy to do the most common things people
  15. usually do to videos: splitting, concatenating, letterboxing, overlaying
  16. one video onto another, and so on.
  17. # A Quick Example
  18. Suppose you have one video that is five minutes long,
  19. and you want to split it into five videos, each one minute long.
  20. With ffmpeg and bash, you might do something like this:
  21. ```shell script
  22. INCR=60
  23. for ((i=0;i<300;i=(i+INCR))); do
  24. ffmpeg -i /tmp/my/source.mp4 -ss ${i} -t $((i+INCR)) /tmp/my/slice_${i}_$((i+INCR)).mp4
  25. done
  26. ```
  27. With JVC, you'd write this spec file and save it to a file
  28. (for example `my-spec.jvc`):
  29. ```json
  30. {
  31. "assets": [ {"name": "src", "path": "/tmp/my/source.mp4"} ],
  32. "operations": [{
  33. "operation": "split",
  34. "creates": "src_split_files",
  35. "source": "src",
  36. "interval": "60"
  37. }]
  38. }
  39. ```
  40. and then run it like this:
  41. ```shell script
  42. jvc my-spec.jvc
  43. ```
  44. Yes, the JVC is longer, but I think many would agree it is easier to read
  45. and maintain.
  46. **As the number of media assets and operations grows, hand-crafted shell
  47. scripts with magical ffmpeg incantations become ever more inscrutable.**
  48. JVC is designed for readability and maintainability. JVC will continue to
  49. evolve towards greater coverage of the full capabilities of ffmpeg.
  50. # Who is JVC not for?
  51. If you like GUIs, JVC is probably not for you.
  52. JVC is not a replacement for Final Cut Pro or even iMovie.
  53. # Who is JVC for?
  54. JVC is for people who like CLIs and automation.
  55. JVC is for people with relatively simple video composition needs (for now),
  56. since the range of operations supported is limited.
  57. JVC is for people who have used ffmpeg filters before and had flashbacks
  58. of editing Sendmail configs, debugging PostScript, or maintaining a legacy
  59. Perl system.
  60. ##### Caveat Emptor
  61. Obligatory Disclaimer: JVC is still relatively new software and lots of stuff
  62. might not work right, ffmpeg could crap out on bad arguments, encodings,
  63. formats, filter syntax errors, or whatever.
  64. In any case, JVC should never overwrite your source files, since all output
  65. goes to new files.
  66. # Requirements
  67. * Java 11
  68. * Maven 3
  69. The first time you run `jvc`, it will automatically build the JVC jar file
  70. from sources, using maven and javac. This takes a little time but only needs
  71. to be done once.
  72. # Running JVC
  73. Learn more about **[running `jvc`](docs/running.md)** and other useful tools.
  74. # JVC Concepts
  75. Learn about **[Assets and Operations](docs/concepts.md)**, the core concepts
  76. of JVC.
  77. # Supported Operations
  78. Today, JVC supports several basic operations.
  79. For each operation listed below, the header links to an example from the JVC
  80. test suite.
  81. ### [add-silence](src/test/resources/tests/test_add_silence.jvc)
  82. Add a silent audio track to a video asset.
  83. ### [concat](src/test/resources/tests/test_concat.jvc)
  84. Concatenate audio/video assets together into one asset.
  85. ### [ken-burns](src/test/resources/tests/test_ken_burns.jvc)
  86. Transform a still image into video via a zoom-pan (aka Ken Burns) effect.
  87. ### [letterbox](src/test/resources/tests/test_letterbox.jvc)
  88. Transform a video from one size to another size, maintaining the aspect ratio
  89. of the video and adding letterboxes on the sides or top/bottom.
  90. Handy for embedding mobile videos into other screen formats.
  91. ### [merge-audio](src/test/resources/tests/test_merge_audio.jvc)
  92. Merge an audio asset into the audio track of a video asset.
  93. ### [overlay](src/test/resources/tests/test_overlay.jvc)
  94. Overlay one video onto another.
  95. ### [remove-track](src/test/resources/tests/test_remove_track.jvc)
  96. Remove a track from a video asset.
  97. ### [scale](src/test/resources/tests/test_scale.jvc)
  98. Scale a video asset from one size to another. Scaling can be proportional
  99. or anamorphic.
  100. ### [split](src/test/resources/tests/test_split.jvc)
  101. Split an audio/video asset into multiple assets of equal time lengths.
  102. ### [trim](src/test/resources/tests/test_trim.jvc)
  103. Trim audio/video; crop a section of an asset, becomes a new asset.
  104. ## Complex Example
  105. Here is a [long, complex example](docs/complex_example.md) that uses
  106. every operation.
  107. ## What's with the name?
  108. A cross between a javelin and an icicle? JSON and a miracle?
  109. Something with positive connotations?
  110. I really don't like naming things.