diff --git a/AI/roop/d_id/did_reqeust.py b/AI/roop/d_id/did_reqeust.py index 614ac37b..74c8132f 100644 --- a/AI/roop/d_id/did_reqeust.py +++ b/AI/roop/d_id/did_reqeust.py @@ -49,7 +49,8 @@ def upload_scene(self, s3_image_url, text, voice_id): }, "config": { "fluent": "false", - "pad_audio": "0.0" + "pad_audio": "0.0", + "stitch": True }, "source_url": s3_image_url # 소스 이미지 } diff --git a/AI/roop/shotstack/shot_stack.py b/AI/roop/shotstack/shot_stack.py index a5737d86..70e4d465 100644 --- a/AI/roop/shotstack/shot_stack.py +++ b/AI/roop/shotstack/shot_stack.py @@ -31,7 +31,8 @@ def send_timeline_data(self, timeline_data): # timeline에 영상을 붙임 def add_track(self, clips, asset_type, asset_src, start, length): # 새로운 track을 생성하고 clips를 추가 - new_track = {"clips": [{"asset": {"type": asset_type, "src": asset_src}, "start": start, "length": length}]} + new_track = {"clips": [ + {"asset": {"type": asset_type, "src": asset_src}, "start": start, "length": length, "fit": "contain"}]} clips.append(new_track) # 결과 불러오기 diff --git a/AI/roop/target_image/1.jpg b/AI/roop/target_image/1.jpg index 074c49f7..23b40c96 100644 Binary files a/AI/roop/target_image/1.jpg and b/AI/roop/target_image/1.jpg differ diff --git a/AI/roop/target_image/2.jpg b/AI/roop/target_image/2.jpg index 85e606c4..879ef704 100644 Binary files a/AI/roop/target_image/2.jpg and b/AI/roop/target_image/2.jpg differ diff --git a/AI/roop/target_image/3.jpg b/AI/roop/target_image/3.jpg new file mode 100644 index 00000000..0ed462ae Binary files /dev/null and b/AI/roop/target_image/3.jpg differ diff --git a/AI/roop/target_image/4.jpg b/AI/roop/target_image/4.jpg new file mode 100644 index 00000000..3dcc48ff Binary files /dev/null and b/AI/roop/target_image/4.jpg differ diff --git a/AI/roop/target_image/5.jpg b/AI/roop/target_image/5.jpg new file mode 100644 index 00000000..46a1bcbb Binary files /dev/null and b/AI/roop/target_image/5.jpg differ diff --git a/AI/roop/target_image/6.jpg b/AI/roop/target_image/6.jpg new file mode 100644 index 00000000..38169ca4 Binary files /dev/null and b/AI/roop/target_image/6.jpg differ diff --git a/AI/roop/target_image/7.jpg b/AI/roop/target_image/7.jpg new file mode 100644 index 00000000..be1229ef Binary files /dev/null and b/AI/roop/target_image/7.jpg differ diff --git a/AI/roop/target_image/8.jpg b/AI/roop/target_image/8.jpg new file mode 100644 index 00000000..cd7873b5 Binary files /dev/null and b/AI/roop/target_image/8.jpg differ diff --git a/AI/roop/target_image/9.jpg b/AI/roop/target_image/9.jpg new file mode 100644 index 00000000..bb41ffff Binary files /dev/null and b/AI/roop/target_image/9.jpg differ diff --git a/AI/roop/tasks.py b/AI/roop/tasks.py index fc2a7475..4d8a8472 100644 --- a/AI/roop/tasks.py +++ b/AI/roop/tasks.py @@ -1,4 +1,5 @@ import hashlib +import math import subprocess import time from urllib.parse import urlparse @@ -67,14 +68,15 @@ def generate_meme(data): }, "output": { "format": "mp4", - "resolution": "sd" + "resolution": "hd", + "aspectRatio": "9:16" }, "callback": CALLBACK_URL + member_id } start_time = 0 while result_url_queue: item = result_url_queue.pop(0) - duration = int(item[1]) + duration = int(math.ceil(item[1])) print("duration : " + str(duration)) shotstack.add_track(timeline_data["timeline"]["tracks"], "video", item[0], start_time, duration) start_time = start_time + duration diff --git a/backend/memetory/src/main/java/com/example/memetory/domain/meme/controller/MemeApi.java b/backend/memetory/src/main/java/com/example/memetory/domain/meme/controller/MemeApi.java index bc63aaa1..ea3fac44 100644 --- a/backend/memetory/src/main/java/com/example/memetory/domain/meme/controller/MemeApi.java +++ b/backend/memetory/src/main/java/com/example/memetory/domain/meme/controller/MemeApi.java @@ -1,10 +1,10 @@ package com.example.memetory.domain.meme.controller; import org.springframework.data.domain.Pageable; -import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import com.example.memetory.domain.meme.dto.GenerateMemeListRequest; +import com.example.memetory.domain.meme.dto.MemeResponse; import com.example.memetory.domain.meme.dto.ShotStackCallBackRequest; import com.example.memetory.global.response.ResultResponse; @@ -29,7 +29,7 @@ public interface MemeApi { description = "콜백 성공!" ) }) - ResponseEntity callBackMeme( + ResponseEntity callBackMeme( @Parameter(in = ParameterIn.PATH, description = "멤버 아이디", required = true) Long memberId, ShotStackCallBackRequest shotStackCallBackRequest ); diff --git a/backend/memetory/src/main/java/com/example/memetory/domain/meme/controller/MemeController.java b/backend/memetory/src/main/java/com/example/memetory/domain/meme/controller/MemeController.java index 9aed32b6..e2290dfd 100644 --- a/backend/memetory/src/main/java/com/example/memetory/domain/meme/controller/MemeController.java +++ b/backend/memetory/src/main/java/com/example/memetory/domain/meme/controller/MemeController.java @@ -31,13 +31,13 @@ public class MemeController implements MemeApi { @PostMapping("/create/{memberId}") @Override - public ResponseEntity callBackMeme(@PathVariable Long memberId, + public ResponseEntity callBackMeme(@PathVariable Long memberId, @RequestBody ShotStackCallBackRequest shotStackCallBackRequest) { MemeServiceDto memeServiceDto = shotStackCallBackRequest.toServiceDtoFromMemberId(memberId); - memeService.registerMeme(memeServiceDto); + MemeResponse response = memeService.registerMeme(memeServiceDto); - return ResponseEntity.status(HttpStatus.OK).build(); + return ResponseEntity.status(HttpStatus.OK).body(response); } @PostMapping diff --git a/backend/memetory/src/main/java/com/example/memetory/domain/memes/controller/comment/MemesCommentApi.java b/backend/memetory/src/main/java/com/example/memetory/domain/memes/controller/comment/MemesCommentApi.java index b926a880..ef48296e 100644 --- a/backend/memetory/src/main/java/com/example/memetory/domain/memes/controller/comment/MemesCommentApi.java +++ b/backend/memetory/src/main/java/com/example/memetory/domain/memes/controller/comment/MemesCommentApi.java @@ -1,6 +1,8 @@ package com.example.memetory.domain.memes.controller.comment; +import org.springframework.data.domain.Pageable; import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; import com.example.memetory.domain.comment.dto.request.CommentRequest; import com.example.memetory.global.response.ResultResponse; @@ -48,4 +50,14 @@ ResponseEntity deleteComment( @Parameter(hidden = true) String email, @Parameter(in = ParameterIn.PATH, description = "댓글 아이디", required = true) Long commentId ); + + @Operation( + summary = "전체 밈스 댓글 조회", + description = "전체 밈스 댓글을 조회한다.", + security = {@SecurityRequirement(name = "access_token")} + ) + @GetMapping() + ResponseEntity findCommentInfoSlice( + @Parameter(in = ParameterIn.PATH, description = "댓글 아이디", required = true) Long memesId, + Pageable pageable); } \ No newline at end of file diff --git a/backend/memetory/src/main/java/com/example/memetory/domain/memes/controller/comment/MemesCommentController.java b/backend/memetory/src/main/java/com/example/memetory/domain/memes/controller/comment/MemesCommentController.java index c688e75d..7245053e 100644 --- a/backend/memetory/src/main/java/com/example/memetory/domain/memes/controller/comment/MemesCommentController.java +++ b/backend/memetory/src/main/java/com/example/memetory/domain/memes/controller/comment/MemesCommentController.java @@ -50,6 +50,7 @@ public ResponseEntity deleteComment(@LoginMemberEmail String ema } @GetMapping() + @Override public ResponseEntity findCommentInfoSlice(@PathVariable Long memesId, Pageable pageable) { CommentInfoSlice response = commentService.findCommentFromMemesId(memesId, pageable);