shiveshnavin commited on
Commit
5f248ee
·
1 Parent(s): 403f72c

Add Effects

Add Transitions

Update modules

Add binary effects

.gitattributes CHANGED
@@ -1 +1,2 @@
1
  *.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
1
  *.mp4 filter=lfs diff=lfs merge=lfs -text
2
+ *.webm filter=lfs diff=lfs merge=lfs -text
common-creds CHANGED
@@ -1 +1 @@
1
- Subproject commit 2f7eff48f46b0e2f0904b8df6c24bb3a79e96192
 
1
+ Subproject commit 5d7a3030c167c25abdab978394d5ebfed260eb10
common-utils CHANGED
@@ -1 +1 @@
1
- Subproject commit f4abf22de6b3c3f7f855ca38b25d1f57c8c83dcd
 
1
+ Subproject commit be1b982a86932c9d8507754a647cf22594be880e
package-lock.json CHANGED
@@ -15,6 +15,7 @@
15
  "@remotion/cli": "4.0.19",
16
  "@remotion/eslint-config": "4.0.19",
17
  "@remotion/google-fonts": "4.0.19",
 
18
  "@remotion/noise": "4.0.19",
19
  "@remotion/preload": "4.0.19",
20
  "@remotion/tailwind": "4.0.19",
@@ -31,6 +32,7 @@
31
  "fs-extra": "^11.1.1",
32
  "i": "^0.3.7",
33
  "lodash": "^4.17.21",
 
34
  "multi-db-orm": "^1.3.0",
35
  "npm": "^9.8.1",
36
  "path": "^0.12.7",
@@ -4399,6 +4401,19 @@
4399
  "remotion": "4.0.19"
4400
  }
4401
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
4402
  "node_modules/@remotion/media-utils": {
4403
  "version": "4.0.19",
4404
  "resolved": "https://registry.npmjs.org/@remotion/media-utils/-/media-utils-4.0.19.tgz",
@@ -10388,6 +10403,11 @@
10388
  "loose-envify": "cli.js"
10389
  }
10390
  },
 
 
 
 
 
10391
  "node_modules/lru-cache": {
10392
  "version": "6.0.0",
10393
  "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -22084,6 +22104,14 @@
22084
  "remotion": "4.0.19"
22085
  }
22086
  },
 
 
 
 
 
 
 
 
22087
  "@remotion/media-utils": {
22088
  "version": "4.0.19",
22089
  "resolved": "https://registry.npmjs.org/@remotion/media-utils/-/media-utils-4.0.19.tgz",
@@ -26614,6 +26642,11 @@
26614
  "js-tokens": "^3.0.0 || ^4.0.0"
26615
  }
26616
  },
 
 
 
 
 
26617
  "lru-cache": {
26618
  "version": "6.0.0",
26619
  "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
 
15
  "@remotion/cli": "4.0.19",
16
  "@remotion/eslint-config": "4.0.19",
17
  "@remotion/google-fonts": "4.0.19",
18
+ "@remotion/lottie": "^4.0.19",
19
  "@remotion/noise": "4.0.19",
20
  "@remotion/preload": "4.0.19",
21
  "@remotion/tailwind": "4.0.19",
 
32
  "fs-extra": "^11.1.1",
33
  "i": "^0.3.7",
34
  "lodash": "^4.17.21",
35
+ "lottie-web": "^5.12.2",
36
  "multi-db-orm": "^1.3.0",
37
  "npm": "^9.8.1",
38
  "path": "^0.12.7",
 
4401
  "remotion": "4.0.19"
4402
  }
4403
  },
4404
+ "node_modules/@remotion/lottie": {
4405
+ "version": "4.0.19",
4406
+ "resolved": "https://registry.npmjs.org/@remotion/lottie/-/lottie-4.0.19.tgz",
4407
+ "integrity": "sha512-BGRxafOW8FlZsBfqV3+Dfdi4Dh+bQry5CcgBXF5JaZpRrhARJyjpNL5GHnTzKvTMeFYITZwphpJH10Z/xC7gKw==",
4408
+ "dependencies": {
4409
+ "remotion": "4.0.19"
4410
+ },
4411
+ "peerDependencies": {
4412
+ "lottie-web": "^5",
4413
+ "react": ">=16.8.0",
4414
+ "react-dom": ">=16.8.0"
4415
+ }
4416
+ },
4417
  "node_modules/@remotion/media-utils": {
4418
  "version": "4.0.19",
4419
  "resolved": "https://registry.npmjs.org/@remotion/media-utils/-/media-utils-4.0.19.tgz",
 
10403
  "loose-envify": "cli.js"
10404
  }
10405
  },
10406
+ "node_modules/lottie-web": {
10407
+ "version": "5.12.2",
10408
+ "resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.12.2.tgz",
10409
+ "integrity": "sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg=="
10410
+ },
10411
  "node_modules/lru-cache": {
10412
  "version": "6.0.0",
10413
  "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
 
22104
  "remotion": "4.0.19"
22105
  }
22106
  },
22107
+ "@remotion/lottie": {
22108
+ "version": "4.0.19",
22109
+ "resolved": "https://registry.npmjs.org/@remotion/lottie/-/lottie-4.0.19.tgz",
22110
+ "integrity": "sha512-BGRxafOW8FlZsBfqV3+Dfdi4Dh+bQry5CcgBXF5JaZpRrhARJyjpNL5GHnTzKvTMeFYITZwphpJH10Z/xC7gKw==",
22111
+ "requires": {
22112
+ "remotion": "4.0.19"
22113
+ }
22114
+ },
22115
  "@remotion/media-utils": {
22116
  "version": "4.0.19",
22117
  "resolved": "https://registry.npmjs.org/@remotion/media-utils/-/media-utils-4.0.19.tgz",
 
26642
  "js-tokens": "^3.0.0 || ^4.0.0"
26643
  }
26644
  },
26645
+ "lottie-web": {
26646
+ "version": "5.12.2",
26647
+ "resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.12.2.tgz",
26648
+ "integrity": "sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg=="
26649
+ },
26650
  "lru-cache": {
26651
  "version": "6.0.0",
26652
  "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
package.json CHANGED
@@ -11,7 +11,7 @@
11
  "extract32": "set MODIFY_FILES=1 && node app.js",
12
  "extract": "MODIFY_FILES=1 && node app.js",
13
  "preview": "remotion studio",
14
- "render-build:igreels": "remotion render --image-format=jpeg --enable-multi-process-on-linux --quality=70 --gl=angle IGReelComposition",
15
  "render-build": "remotion render --image-format=jpeg --quality=70 --gl=angle ",
16
  "render-still": "remotion still --image-format=jpeg SemibitCompositionPoster ",
17
  "upgrade": "remotion upgrade",
@@ -40,6 +40,7 @@
40
  "@remotion/cli": "4.0.19",
41
  "@remotion/eslint-config": "4.0.19",
42
  "@remotion/google-fonts": "4.0.19",
 
43
  "@remotion/noise": "4.0.19",
44
  "@remotion/preload": "4.0.19",
45
  "@remotion/tailwind": "4.0.19",
@@ -56,6 +57,7 @@
56
  "fs-extra": "^11.1.1",
57
  "i": "^0.3.7",
58
  "lodash": "^4.17.21",
 
59
  "multi-db-orm": "^1.3.0",
60
  "npm": "^9.8.1",
61
  "path": "^0.12.7",
@@ -79,4 +81,4 @@
79
  "devDependencies": {
80
  "@types/lodash": "^4.14.199"
81
  }
82
- }
 
11
  "extract32": "set MODIFY_FILES=1 && node app.js",
12
  "extract": "MODIFY_FILES=1 && node app.js",
13
  "preview": "remotion studio",
14
+ "render-build:igreels": "remotion render --image-format=jpeg --enable-multi-process-on-linux --quality=70 --concurrency 4 --gl=angle IGReelComposition",
15
  "render-build": "remotion render --image-format=jpeg --quality=70 --gl=angle ",
16
  "render-still": "remotion still --image-format=jpeg SemibitCompositionPoster ",
17
  "upgrade": "remotion upgrade",
 
40
  "@remotion/cli": "4.0.19",
41
  "@remotion/eslint-config": "4.0.19",
42
  "@remotion/google-fonts": "4.0.19",
43
+ "@remotion/lottie": "^4.0.19",
44
  "@remotion/noise": "4.0.19",
45
  "@remotion/preload": "4.0.19",
46
  "@remotion/tailwind": "4.0.19",
 
57
  "fs-extra": "^11.1.1",
58
  "i": "^0.3.7",
59
  "lodash": "^4.17.21",
60
+ "lottie-web": "^5.12.2",
61
  "multi-db-orm": "^1.3.0",
62
  "npm": "^9.8.1",
63
  "path": "^0.12.7",
 
81
  "devDependencies": {
82
  "@types/lodash": "^4.14.199"
83
  }
84
+ }
public/assets/transitions.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "file": "assets/transition.mp4",
4
+ "durationSec": 5
5
+ },
6
+ {
7
+ "mood": "excited,happy",
8
+ "file": "assets/effects/effect_slice_transition.webm",
9
+ "durationSec": 2.07
10
+ },
11
+ {
12
+ "mood": "excited,happy",
13
+ "file": "assets/effects/effect_water_splash.webm",
14
+ "durationSec": 2.07
15
+ },
16
+ {
17
+ "mood": "excited,happy",
18
+ "file": "assets/effects/effect_circle.webm",
19
+ "durationSec": 2.07
20
+ },
21
+ {
22
+ "mood": "excited,happy",
23
+ "file": "assets/effects/effect_fire_2.webm",
24
+ "durationSec": 0.93
25
+ },
26
+ {
27
+ "mood": "excited",
28
+ "file": "assets/effects/effect_hexagon.webm",
29
+ "durationSec": 2.07
30
+ },
31
+ {
32
+ "mood": "excited,happy",
33
+ "file": "assets/effects/effect_white_boom.webm",
34
+ "durationSec": 1
35
+ },
36
+ {
37
+ "mood": "excited,happy",
38
+ "file": "assets/effects/effect_sky.webm",
39
+ "durationSec": 2.07
40
+ },
41
+ {
42
+ "mood": "motivational",
43
+ "file": "assets/effects/effect_words.webm",
44
+ "durationSec": 2.07
45
+ }
46
+ ]
scripts/transparent.sh CHANGED
@@ -1,3 +1,10 @@
1
- ffmpeg -i ig-reels-next.mp4 -vf chromakey=black overlay.webm
2
- ffmpeg -i ig-reels-next.mp4 -c:v libvpx -vf "colorkey=0x000000:0.1:0.1,format=yuva420p,scale=1280:720" -auto-alt-ref 0 -y overlay.webm
 
 
 
 
 
 
 
3
  # ffmpeg -loop 1 -i green.jpg -c:v libx264 -t 15 -pix_fmt yuv420p -vf scale=1080:1920 green.mp4
 
1
+ # ffmpeg -i ig-reels-next.mp4 -vf chromakey=black overlay.webm
2
+ # ffmpeg -i ig-reels-next.mp4 -c:v libvpx -vf "colorkey=0x0bb563:0.01:0.1,format=yuva420p,scale=iw:ih" -auto-alt-ref 0 -y overlay.webm
3
+
4
+
5
+ # ffmpeg -i ig-reels-next.mp4 -c:v prores_ks ig-reels-next.mov
6
+
7
+
8
+ ffmpeg -i ig-reels-next.webm -vf "chromakey=black:0.1:0.1" -c:v libvpx-vp9 -crf 30 -b:v 0 -b:a 128k -c:a libopus -y overlay.webm && del ig-reels-next.webm
9
+
10
  # ffmpeg -loop 1 -i green.jpg -c:v libx264 -t 15 -pix_fmt yuv420p -vf scale=1080:1920 green.mp4
src/Compositions.tsx CHANGED
@@ -9,6 +9,7 @@ import './style.css';
9
  import Transitions from '../public/assets/transitions.json'
10
  import { IGReelComposition } from './ig-reel/IGReelComposition';
11
  import { RenderUtils } from './RenderUtils';
 
12
 
13
 
14
 
@@ -47,7 +48,7 @@ export const Compositions: React.FC = () => {
47
  let contents: SequentialSceneData[] =
48
  Script.transcript
49
  .filter(item => item.subtitle_file != undefined)
50
- // .slice(0, 1)
51
  .map((section) => {
52
  var { text, duration, offset, imageAbsPaths, audioFullPath, title, pointers } = section
53
  if (!duration)
@@ -164,6 +165,22 @@ export const Compositions: React.FC = () => {
164
  })}
165
  />
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  <Still
168
  id="SemibitCompositionPoster"
169
  component={PosterSingleTextWithBG}
 
9
  import Transitions from '../public/assets/transitions.json'
10
  import { IGReelComposition } from './ig-reel/IGReelComposition';
11
  import { RenderUtils } from './RenderUtils';
12
+ import { VideoSplash, VideoSplashSchema } from './anims/VideoSplash';
13
 
14
 
15
 
 
48
  let contents: SequentialSceneData[] =
49
  Script.transcript
50
  .filter(item => item.subtitle_file != undefined)
51
+ .slice(0, 2)
52
  .map((section) => {
53
  var { text, duration, offset, imageAbsPaths, audioFullPath, title, pointers } = section
54
  if (!duration)
 
165
  })}
166
  />
167
 
168
+ <Composition
169
+ defaultProps={{
170
+ direction: 'left',
171
+ progress: 1,
172
+ file: 'effect_hexagon.webm',
173
+ durationInFrames: 200,
174
+ }}
175
+ schema={VideoSplashSchema}
176
+ id='VideoSplash'
177
+ component={VideoSplash}
178
+ durationInFrames={100}
179
+ fps={fps}
180
+ width={Script.meta?.resolution?.width || 1920}
181
+ height={Script.meta?.resolution?.height || 1080}
182
+ />
183
+
184
  <Still
185
  id="SemibitCompositionPoster"
186
  component={PosterSingleTextWithBG}
src/anims/Dissolve.tsx CHANGED
@@ -15,6 +15,7 @@ export const Dissolve: TransitionImplementation = ({
15
  top: 0,
16
  right: 0,
17
  bottom: 0,
 
18
  }}
19
  >
20
  {exitingElement}
 
15
  top: 0,
16
  right: 0,
17
  bottom: 0,
18
+ opacity: 1 - progress,
19
  }}
20
  >
21
  {exitingElement}
src/anims/VideoSplash.tsx ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import { TransitionImplementationProps } from 'remotion-transition-series/lib/components/Transition';
3
+ import { OffthreadVideo, Video, staticFile } from 'remotion'
4
+ import { z } from "zod";
5
+
6
+ export const VideoSplash:
7
+ React.FC<z.infer<typeof VideoSplashSchema>> = (props) => {
8
+
9
+ let {
10
+ file,
11
+ durationInFrames,
12
+ } = props
13
+ return (
14
+ <div
15
+ style={{
16
+ width: '100%',
17
+ height: '100%',
18
+ position: 'absolute',
19
+ left: 0,
20
+ top: 0,
21
+ right: 0,
22
+ bottom: 0,
23
+ }}
24
+ >
25
+
26
+ <Video {...props} playbackRate={1}
27
+ volume={0} style={{
28
+ position: 'absolute',
29
+ height: '100%', width: '100%',
30
+ }} src={staticFile((file || 'assets/effects/effect_zipper.webm'))} />
31
+
32
+ </div>
33
+ );
34
+ };
35
+
36
+
37
+
38
+ export const VideoSplashSchema = z.object({
39
+ file: z.string(),
40
+ durationInFrames: z.number()
41
+ });
src/ig-reel/IGMediaRender.tsx CHANGED
@@ -1,30 +1,57 @@
1
  //@ts-nocheck
2
- import { Img, Video, staticFile } from "remotion";
 
 
 
3
  import { DisplayMedia } from "./IGSimpleScene";
 
 
4
 
5
 
6
  export function IGMediaRender(props) {
7
  let displayMedia: DisplayMedia = props.displayMedia
8
  let bgMediaPath = staticFile(displayMedia?.path || '')
9
  let curZoom = props.curZoom
 
 
 
10
 
11
  return (
12
- displayMedia.type == 'video' ? (
13
- <div style={{
14
- position: 'relative',
15
- height: '100%', width: '100%'
16
- }}>
17
- <Video playbackRate={0.5} volume={0} style={{
18
- background: '#fff',
19
- position: 'absolute',
20
- height: '100%', width: '100%'
21
- }} src={bgMediaPath} />
22
- </div>
23
- ) : (
24
- <Img className='absolute inset-0 w-full h-full object-cover' style={{
25
- transform: `scale(${(curZoom)}) translateX(${10 * curZoom}px)`,
26
- height: '100%', width: '100%'
27
- }} src={bgMediaPath} />
28
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  )
30
  }
 
1
  //@ts-nocheck
2
+ import { Img, Video, OffthreadVideo, staticFile } from "remotion";
3
+ import TransitionSeries from "remotion-transition-series/lib/TransitionSeries";
4
+ import { VideoSplash } from "../anims/VideoSplash";
5
+ import { SequentialScene } from "../youtube/SequentialScene";
6
  import { DisplayMedia } from "./IGSimpleScene";
7
+ import Transitions from '../../public/assets/transitions.json'
8
+ import { RenderUtils } from "../RenderUtils";
9
 
10
 
11
  export function IGMediaRender(props) {
12
  let displayMedia: DisplayMedia = props.displayMedia
13
  let bgMediaPath = staticFile(displayMedia?.path || '')
14
  let curZoom = props.curZoom
15
+ let transitionsByMood = Transitions.filter(t => t.mood?.indexOf("happy") > -1)
16
+ let transition = RenderUtils.randomElement(transitionsByMood, `x-${displayMedia.idx * displayMedia.durationFrames}`)
17
+ // transition.file = 'assets/effects/effect_sky.webm'
18
 
19
  return (
20
+ <div style={{
21
+ position: 'relative',
22
+ height: '100%', width: '100%'
23
+ }}>
24
+
25
+ {
26
+ displayMedia.type == 'video' ? (
27
+ <div style={{
28
+ position: 'relative',
29
+ height: '100%', width: '100%'
30
+ }}>
31
+ <Video playbackRate={0.5} volume={0} style={{
32
+ background: '#fff',
33
+ position: 'absolute',
34
+ height: '100%', width: '100%'
35
+ }} src={bgMediaPath} />
36
+ </div>
37
+ ) : (
38
+ <Img className='absolute inset-0 w-full h-full object-cover' style={{
39
+ transform: `scale(${(curZoom)}) translateX(${10 * curZoom}px)`,
40
+ height: '100%', width: '100%'
41
+ }} src={bgMediaPath} />
42
+ )
43
+ }
44
+ {/* {
45
+ displayMedia?.idx > -1 && (
46
+ <TransitionSeries.Sequence from={displayMedia.durationFrames - 60}>
47
+ <VideoSplash file={transition.file} style={{
48
+ position: 'relative',
49
+ height: '100%', width: '100%'
50
+ }} />
51
+ </TransitionSeries.Sequence>
52
+ )
53
+ } */}
54
+
55
+ </div>
56
  )
57
  }
src/ig-reel/IGSimpleScene.tsx CHANGED
@@ -1,8 +1,8 @@
1
  //@ts-nocheck
2
- import { AbsoluteFill, interpolate, staticFile, Audio, useCurrentFrame, Easing } from 'remotion';
3
  import React, { useEffect, useState } from 'react'
4
  import { RenderUtils } from '../RenderUtils';
5
- import { Transcript, SectionMedia } from '../models/OriginalManuscriptModel'
6
  import axios from 'axios';
7
  import ExcitedSubtitles from '../subtitles/excited_Subtitles';
8
  import _ from 'lodash';
@@ -16,12 +16,14 @@ import { Dissolve } from '../anims/Dissolve';
16
  import { SlidingDoors } from '../anims/SlidingDoors';
17
  import { IGMediaRender } from './IGMediaRender';
18
  import { Group } from '../models/Types';
 
 
19
 
20
  export type DisplayMedia = SectionMedia &
21
  { idx: number, durationFrames: number, startFrame: number, endFrame: number, }
22
 
23
  export const IGScene: React.FC<any> = (props: {
24
- script: any,
25
  item: Transcript
26
  }) => {
27
  const [subtitles, setSubtitles] = useState(undefined)
@@ -106,7 +108,7 @@ export const IGScene: React.FC<any> = (props: {
106
  const foregroundOpacity = interpolate(
107
  frame,
108
  [0, 10, itemDurationInFrames - 10, itemDurationInFrames],
109
- [1, 0, 0, 1]
110
  );
111
 
112
 
@@ -151,26 +153,29 @@ export const IGScene: React.FC<any> = (props: {
151
  ))
152
  if (i < item?.imageAbsPaths.length - 1 || true) {
153
  let anims = [CircularWipe, Slide, SlidingDoors, Pan, LinearWipe, Dissolve, CircularWipe, Slide, SlidingDoors, Pan, LinearWipe, Dissolve]
154
- // .fill(CircularWipe)
155
  let Anim = anims[frame % 9]
156
  let seed = i * displayMedia.idx
157
  Anim = RenderUtils.randomElement(anims, `x-${seed}`)
158
  const easeInOutExp = Easing.inOut(Easing.bezier(0.8, 0.22, 0.96, 0.65));
159
- chunk.push((
160
- <TransitionSeries.Transition
161
- durationInFrames={30}
162
- transitionComponent={({ progress, ...props }) => {
163
- return (
164
- <Anim {...props} progress={easeInOutExp(progress)} />
165
- )
166
- }}
167
- />
168
- ))
 
 
169
  }
170
  return chunk
171
  }))
172
 
173
 
 
174
  return (
175
  <AbsoluteFill style={{
176
  width: '100%',
@@ -184,6 +189,26 @@ export const IGScene: React.FC<any> = (props: {
184
 
185
  </TransitionSeries>
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  <div style={{
188
  opacity: foregroundOpacity,
189
  zIndex: 10,
 
1
  //@ts-nocheck
2
+ import { AbsoluteFill, Sequence, interpolate, staticFile, Audio, useCurrentFrame, Easing } from 'remotion';
3
  import React, { useEffect, useState } from 'react'
4
  import { RenderUtils } from '../RenderUtils';
5
+ import { Transcript, SectionMedia, OriginalManuscript } from '../models/OriginalManuscriptModel'
6
  import axios from 'axios';
7
  import ExcitedSubtitles from '../subtitles/excited_Subtitles';
8
  import _ from 'lodash';
 
16
  import { SlidingDoors } from '../anims/SlidingDoors';
17
  import { IGMediaRender } from './IGMediaRender';
18
  import { Group } from '../models/Types';
19
+ import { VideoSplash } from '../anims/VideoSplash';
20
+ import Transitions from '../../public/assets/transitions.json'
21
 
22
  export type DisplayMedia = SectionMedia &
23
  { idx: number, durationFrames: number, startFrame: number, endFrame: number, }
24
 
25
  export const IGScene: React.FC<any> = (props: {
26
+ script: OriginalManuscript,
27
  item: Transcript
28
  }) => {
29
  const [subtitles, setSubtitles] = useState(undefined)
 
108
  const foregroundOpacity = interpolate(
109
  frame,
110
  [0, 10, itemDurationInFrames - 10, itemDurationInFrames],
111
+ [1, 0, 0, item.index >= props?.script?.transcript?.length - 1 ? 0 : 1]
112
  );
113
 
114
 
 
153
  ))
154
  if (i < item?.imageAbsPaths.length - 1 || true) {
155
  let anims = [CircularWipe, Slide, SlidingDoors, Pan, LinearWipe, Dissolve, CircularWipe, Slide, SlidingDoors, Pan, LinearWipe, Dissolve]
156
+ // .fill(SlidingDoors)
157
  let Anim = anims[frame % 9]
158
  let seed = i * displayMedia.idx
159
  Anim = RenderUtils.randomElement(anims, `x-${seed}`)
160
  const easeInOutExp = Easing.inOut(Easing.bezier(0.8, 0.22, 0.96, 0.65));
161
+ if (item.transition_type == 'geometrial' || item.transition_type == undefined) {
162
+ chunk.push((
163
+ <TransitionSeries.Transition
164
+ durationInFrames={60}
165
+ transitionComponent={({ progress, ...props }) => {
166
+ return (
167
+ <Anim {...props} progress={easeInOutExp(progress)} />
168
+ )
169
+ }}
170
+ />
171
+ ))
172
+ }
173
  }
174
  return chunk
175
  }))
176
 
177
 
178
+ console.log('currentDisplayMedia?.endFrame', frame, currentDisplayMedia?.endFrame)
179
  return (
180
  <AbsoluteFill style={{
181
  width: '100%',
 
189
 
190
  </TransitionSeries>
191
 
192
+ {
193
+ (item.transition_type == 'graphical') &&
194
+ currentDisplayMedia?.idx > -1 && (
195
+ item?.imageAbsPaths?.map((displayMedia: DisplayMedia, i) => {
196
+ let transitionsByMood = Transitions.filter(t => t.mood?.indexOf("happy") > -1)
197
+ let transition = RenderUtils.randomElement(transitionsByMood, `x-${displayMedia.idx * displayMedia.durationFrames}`)
198
+ // transition = transitionsByMood[5]
199
+
200
+ return (
201
+ <Sequence from={displayMedia?.endFrame - transition.durationSec * fps / 2} durationInFrames={transition.durationSec * fps}>
202
+ <VideoSplash file={transition.file} style={{
203
+ position: 'relative',
204
+ height: '100%', width: '100%'
205
+ }} />
206
+ </Sequence>
207
+ )
208
+ })
209
+ )
210
+ }
211
+
212
  <div style={{
213
  opacity: foregroundOpacity,
214
  zIndex: 10,
src/models/OriginalManuscriptModel.ts CHANGED
@@ -26,6 +26,7 @@ export interface Transcript {
26
  dialog: string[]
27
  imageAbsPathsOriginal: SectionMedia[]
28
  index: number
 
29
  transition_file: string
30
  transition_duration_sec: number
31
  status: boolean
 
26
  dialog: string[]
27
  imageAbsPathsOriginal: SectionMedia[]
28
  index: number
29
+ transition_type: 'graphical' | 'geometrial'
30
  transition_file: string
31
  transition_duration_sec: number
32
  status: boolean