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.

running.md 2.9 KiB

4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
4 vuotta sitten
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Running JVC
  2. ## The `jvc` Script
  3. The `bin/jvc` script is the primary way to transform video assets with JVC.
  4. ## Operation-specific scripts
  5. There are other scripts in [`bin`](../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 JVC spec, use one of [these tools](../bin).
  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. ## Help
  17. To view a list of all `jvc` command-line options, run `jvc -h` or `jvc --help`
  18. ## JVC Spec Files
  19. A JVC spec is just a regular JSON file that happens to contain a single JSON object,
  20. whose properties are `assets` and `operations`.
  21. When you run `jvc` on a spec file, it will load the `assets`, then perform the `operations` in order.
  22. Learn more about [Assets and Operations](concepts.md)
  23. Unlike most JSON, comments *are* allowed in JVC spec files:
  24. * A line comment starts with `//` and continue to the end of the line
  25. * A multi-line block starts with `/*` and ends with `*/`
  26. ## Writing a JVC Spec
  27. The easiest way to write a spec is to copy one of the
  28. [test specs](../src/test/resources/tests) and edit it.
  29. There examples for every JVC operation.
  30. ## Executing a JVC Spec
  31. To execute a spec stored in the file `my-spec.json`, you would run:
  32. ```shell script
  33. jvc my-spec.jvc
  34. ```
  35. or use stdin:
  36. ```shell script
  37. cat my-spec.jvc | jvc
  38. ```
  39. ## Command Line Options
  40. #### Scratch Directory
  41. Output assets will be placed in the scratch directory, unless otherwise specified
  42. in the spec file. By default, JVC will create a new temporary directory to use as the scratch
  43. directory. You can set the scratch directory explicitly using the `-t` or `--temp-dir` option:
  44. ```shell script
  45. jvc -t /some/tempdir my-spec.json
  46. ```
  47. When using the other tools in `bin`, you can set the scratch directory via the
  48. `JVC_SCRATCH_DIR` environment variable. If the `JVC_SCRATCH_DIR` references a
  49. directory that does not exist, it will be created.
  50. #### Dry Run
  51. Use the `-n` or `--no-exec` option to print out the commands that would have been run,
  52. but do not actually run anything.
  53. ```shell script
  54. jvc -n my-spec.json # will not run any ffmpeg commands
  55. ```
  56. Note that this breaks JVC operations that require information from any assets created by
  57. previous operations: since the command did not actually run, the intermediate asset was
  58. never created.
  59. When using the other tools in `bin`, you can set the "no exec" flag via the
  60. `JVC_NO_EXEC` environment variable. If the `JVC_NO_EXEC` is non-empty, then
  61. the script will pass the `-n` flag when it calls `jvc` and commands will
  62. be printed out instead of actually being run.
  63. #### Help
  64. To view a list of all `jvc` command-line options, run `jvc -h` or `jvc --help`
  65. # What's Next?
  66. Learn about [Assets and Operations](concepts.md), the core concepts of JVC.