mirror of https://github.com/Chocobozzz/PeerTube
Fix storyboard generation with some videos
Where `t` variable is never an integer due to our setpts formulapull/6266/head
parent
23aafafd1e
commit
888b142e2e
|
@ -119,8 +119,10 @@ export class FFmpegImage {
|
||||||
const command = this.commandWrapper.buildCommand(path)
|
const command = this.commandWrapper.buildCommand(path)
|
||||||
|
|
||||||
const filter = [
|
const filter = [
|
||||||
|
// Fix "t" variable with some videos
|
||||||
`setpts=N/round(FRAME_RATE)/TB`,
|
`setpts=N/round(FRAME_RATE)/TB`,
|
||||||
`select='not(mod(t,${options.sprites.duration}))'`,
|
// First frame or the time difference between the last and the current frame is enough for our sprite interval
|
||||||
|
`select='isnan(prev_selected_t)+gte(t-prev_selected_t,${options.sprites.duration})'`,
|
||||||
`scale=${sprites.size.width}:${sprites.size.height}`,
|
`scale=${sprites.size.width}:${sprites.size.height}`,
|
||||||
`tile=layout=${sprites.count.width}x${sprites.count.height}`
|
`tile=layout=${sprites.count.width}x${sprites.count.height}`
|
||||||
].join(',')
|
].join(',')
|
||||||
|
|
Loading…
Reference in New Issue