Skip to content

Commit

Permalink
🌐 [Ci]: default 썸네일 이미지 디렉토리 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
g00hyun committed Dec 3, 2024
1 parent f742b79 commit 11b3320
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/media-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
branches:
- develop
- Fix/326
# paths:
# - 'apps/media/**'
paths:
- 'apps/media/**'

jobs:
build-and-push:
Expand Down
1 change: 1 addition & 0 deletions apps/media/src/sfu/sfu.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class SfuService {
async createRoom(clientId: string, user: User) {
const room = await this.roomService.createRoom();

console.log(`${room.id}'s default Thumbnail Setting....`);
await this.recordClient.post('/thumbnail', { roomId: room.id });

const thumbnail = `${this.configService.get('PUBLIC_RECORD_SERVER_URL')}/statics/thumbnails/${room.id}.jpg`;
Expand Down
4 changes: 2 additions & 2 deletions apps/record/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ WORKDIR /app

RUN mkdir -p /app/assets/records /app/assets/thumbnails && chmod -R 777 /app/assets

COPY ./apps/record/public/default-thumbnail.jpg /app/assets/default-thumbnail.jpg
RUN chmod 644 /app/assets/default-thumbnail.jpg
COPY ./apps/record/public/default-thumbnail.jpg /app/apps/record/assets/default-thumbnail.jpg
RUN chmod 644 /app/apps/record/assets/default-thumbnail.jpg

# Environment variables
ARG RECORD_PORT
Expand Down
5 changes: 4 additions & 1 deletion apps/record/src/ffmpeg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ const thumbnailArgs = (dirPath: string, roomId: string) => {
'pipe:0', // SDP를 파이프로 전달
'-vf',
'fps=1/10,scale=1280:720', // 10초마다 한 프레임을 캡처하고 해상도 조정
'-f',
'image2', // 이미지 출력 포맷 명시
'-update',
'1', // 같은 파일에 덮어쓰기 활성화
'1',
'-y', // 강제 덮어쓰기
`${dirPath}/thumbnails/${roomId}.jpg`, // 덮어쓸 출력 파일 이름
];
return commandArgs;
Expand Down

0 comments on commit 11b3320

Please sign in to comment.