Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
begenieus-jobs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramdayal Munda
begenieus-jobs
Commits
ceb45dac
Commit
ceb45dac
authored
Mar 08, 2024
by
ramdayalmunda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg video filter added sothat videos could run on firefox
parent
8107f789
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
tutor-shot.js
controller/tutor-shot.js
+2
-2
ffmpeg-helper.js
helper/ffmpeg-helper.js
+1
-0
No files found.
controller/tutor-shot.js
View file @
ceb45dac
...
@@ -44,8 +44,8 @@ module.exports.generateVideo = async function (req, res) {
...
@@ -44,8 +44,8 @@ module.exports.generateVideo = async function (req, res) {
videoPath
=
path
.
join
(
TEMP_VIDEO_DIR
,
`
${
tutorShotData
.
_id
}
.mp4`
)
videoPath
=
path
.
join
(
TEMP_VIDEO_DIR
,
`
${
tutorShotData
.
_id
}
.mp4`
)
thumbnailPath
=
path
.
join
(
TEMP_IMAGE_DIR
,
`
${
tutorShotData
.
_id
}
_thumbnail`
)
thumbnailPath
=
path
.
join
(
TEMP_IMAGE_DIR
,
`
${
tutorShotData
.
_id
}
_thumbnail`
)
fileName
=
tutorShotData
.
_id
fileName
=
`
${
tutorShotData
.
_id
}
.mp4`
thumbnailName
=
`
${
tutorShotData
.
_id
}
_thumbnail`
thumbnailName
=
`
${
tutorShotData
.
_id
}
_thumbnail
.png
`
// // this is to generate each individual images and get their buffers
// // this is to generate each individual images and get their buffers
let
frameNumber
=
1
;
let
frameNumber
=
1
;
...
...
helper/ffmpeg-helper.js
View file @
ceb45dac
...
@@ -78,6 +78,7 @@ module.exports.createVideoFromImages = async function (imageArr, options) {
...
@@ -78,6 +78,7 @@ module.exports.createVideoFromImages = async function (imageArr, options) {
console
.
error
(
'Error creating video:'
,
err
);
console
.
error
(
'Error creating video:'
,
err
);
rej
(
undefined
,
err
)
rej
(
undefined
,
err
)
})
})
.
videoFilters
(
'format=yuv420p'
)
.
input
(
imagePathString
)
.
input
(
imagePathString
)
.
output
(
outputFilePath
)
.
output
(
outputFilePath
)
.
outputFPS
(
frameRate
)
// Set frames per second as needed
.
outputFPS
(
frameRate
)
// Set frames per second as needed
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment