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.

34 lines
1.3 KiB

  1. {
  2. "assets": [
  3. // these are US government videos not covered by copyright. resolution is 320x240
  4. {
  5. "name": "vid1",
  6. "path": "https://archive.org/download/gov.archives.arc.1257628/gov.archives.arc.1257628_512kb.mp4",
  7. "dest": "src/test/resources/sources/"
  8. }
  9. ],
  10. "operations": [
  11. {
  12. "operation": "split", // name of the operation
  13. "creates": {
  14. "name": "vid1_splits", // output assets will have this prefix
  15. "dest": "src/test/resources/outputs/" // and be written to this directory
  16. },
  17. "source": "vid1", // split this source asset
  18. "interval": "10", // split every ten seconds
  19. "start": "65", // start one minute and five seconds into the video
  20. "end": "100", // end 100 seconds into the video
  21. "validate": [{
  22. "comment": "expect output contain 4 assets",
  23. "test": "output.assets.length === 4"
  24. }, {
  25. "comment": "expect first asset to be about 10 seconds long",
  26. "test": "is_within(output.assets[0].duration, 10, 0.1)"
  27. }, {
  28. "comment": "expect last asset to be about 10 seconds long",
  29. "test": "is_within(output.assets[output.assets.length-1].duration, 10, 0.1)"
  30. }]
  31. }
  32. ]
  33. }