scenejs-render icon indicating copy to clipboard operation
scenejs-render copied to clipboard

startTime option is not working properly

Open ironyee opened this issue 2 years ago • 3 comments

cd examples

render -S 0 -d 1 -f 25
# Processing finished !
render -S 1 -d 1 -f 25
# An error occurred: ffmpeg exited with code 1: ./.scene_cache/frame%d.png: No such file or directory
render -S 1 -d 1 -f 1
# Processing finished !
render -S 10 -d 1 -f 1
# An error occurred: ffmpeg exited with code 1: ./.scene_cache/frame%d.png: No such file or directory

Also, the startTime option doesn't affect medias' timeline.

ironyee avatar Apr 14 '22 10:04 ironyee

@ironyee

@scenejs/render 0.11.2 is released. A startTime bug was fixed. Thank you :)

daybrush avatar Apr 14 '22 17:04 daybrush

@daybrush

$ render -S 0 -d 1 -f 25 -o 0.mp4

frames: [0...25] total frame: 26 not 25 duration: 1.04 not 1

$ render -S 1 -d 1 -f 25 -o 1.mp4 frames: [25...50]

If I merge 0.mp4 and 1.mp4, it contains two 25th frames.

It should be [0...24] [25...49]

ironyee avatar Jul 26 '22 03:07 ironyee

@ironyee

but i have to check

The first frame must be between 0 and 25. The total frame is 26, but the duration must be 1.

This is because the 0 second frame was also calculated.

Scripts from npm run test rollup -c && node ./index.js --ffmpegPath ./ffmpeg -i ./test.html -S 0 -d 1 -f 25 -o The result of 1 second is correct.

It should be [0...25] [26...50]

Am I doing the test wrong? Please tell me how to run the script which causes the problem.

daybrush avatar Aug 13 '22 00:08 daybrush