Javicle - a JSON Video Composition Language
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

4 лет назад
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Running JVCL
  2. ## The `jvcl` Script
  3. The `bin/jvcl` script is the primary way to transform video assets with JVCL.
  4. ## Operation-specific scripts
  5. There are other scripts in `bin` that perform a single operation using
  6. command-line arguments. If you need to do a quick operation and don't want to write
  7. a JVCL spec, use one of these tools.
  8. For example, to extract the first 5 seconds of a video:
  9. ```shell script
  10. jtrim /tmp/input-file.mp4 /tmp/output-5s.mp4 0 5
  11. ```
  12. All commands accept a `-h` / `--help` option, use this to print usage information:
  13. ```shell script
  14. jscale -h
  15. ```
  16. ## JVCL Spec Files
  17. A JVCL spec is just a regular JSON file that happens to contain a single JSON object,
  18. whose properties are `assets` and `operations`.
  19. When you run `jvcl` on a spec file, it will load the `assets`, then perform the `operations` in order.
  20. Learn more about [Assets and Operations](concepts.md)
  21. Unlike most JSON, comments *are* allowed in JVCL spec files:
  22. * A line comment starts with `//` and continue to the end of the line
  23. * A multi-line block syntax starts with `/*` and ends with `*/`
  24. ## Writing a JVCL Spec
  25. The easiest way to write a spec is to copy one of the
  26. [test specs](../src/test/resources/tests) and edit it.
  27. There examples for every JVCL operation.
  28. ## Executing a JVCL Spec
  29. To execute a spec stored in the file `my-spec.json`, you would run:
  30. ```shell script
  31. jvcl my-spec.jvcl
  32. ```
  33. or use stdin:
  34. ```shell script
  35. cat my-spec.jvcl | jvcl
  36. ```
  37. #### Scratch Directory
  38. Output assets will be placed in the scratch directory, unless otherwise specified
  39. in the spec file. By default, JVCL will create a new temporary directory to use as the scratch
  40. directory. You can set the scratch directory explicitly using the `-t` or `--temp-dir` option:
  41. ```shell script
  42. jvcl -t /some/tempdir my-spec.json
  43. ```
  44. #### Dry Run
  45. Use the `-n` or `--no-exec` option to print out the commands that would have been run,
  46. but do not actually run anything.
  47. ```shell script
  48. jvcl -n my-spec.json # will not run any ffmpeg commands
  49. ```
  50. Note that this breaks JVCL operations that require information from any assets created by
  51. previous operations: since the command did not actually run, the intermediate asset was
  52. never created.
  53. #### Help
  54. To view a list of all `jvcl` command-line options, run `jvcl -h` or `jvcl --help`
  55. # What's Next?
  56. Learn about [Assets and Operations](concepts.md), the core concepts of JVCL.