Skip to content

Commit 72d0504

Browse files
authored
fix: use all gc capabilities (#165)
2 parents e8541a2 + abe6bd2 commit 72d0504

4 files changed

Lines changed: 42 additions & 12 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy Pre-release Image
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
inputs:
7+
tag:
8+
description: "Tag to use for the image"
9+
required: true
10+
11+
jobs:
12+
build_web:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@master
16+
with:
17+
ref: ${{ github.head_ref }}
18+
fetch-depth: 0
19+
- run: |
20+
echo "${{ secrets.ENVFILE }}" > .env
21+
- name: Kaniko build
22+
uses: aevea/action-kaniko@master
23+
with:
24+
image: destcom/stroygetter
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
27+
tag: ${{ github.event.inputs.tag || 'alpha' }}
28+
tag_with_latest: false
29+
path: .
30+
build_file: Dockerfile

app/api/video-converter/route.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,20 @@ const mergeAudioVideo = (
117117
const ffmpegCommand = ffmpeg().input(video_path).input(audio_path);
118118

119119
if (hasNvidiaGpu) {
120-
ffmpegCommand.outputOptions([
121-
"-c:v h264_nvenc",
122-
"-preset fast",
123-
"-cq 23",
124-
"-c:a aac",
125-
"-b:a 128k",
126-
]);
120+
ffmpegCommand
121+
.inputOptions(["-hwaccel cuda", "-hwaccel_device 0", "-c:v h264_cuvid"])
122+
.outputOptions([
123+
"-c:v h264_nvenc",
124+
"-preset fast",
125+
"-cq 23",
126+
"-c:a copy",
127+
]);
127128
} else {
128129
ffmpegCommand.outputOptions([
129130
"-c:v libx264",
130131
"-preset ultrafast",
131132
"-crf 23",
132-
"-c:a aac",
133-
"-b:a 128k",
133+
"-c:a copy",
134134
]);
135135
}
136136

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stroygetter",
3-
"version": "3.2.0",
3+
"version": "3.3.0",
44
"private": true,
55
"scripts": {
66
"dev": "next dev && node copy-binaries.js",

0 commit comments

Comments
 (0)