feat(spots): try to trim without 'copy' video codec option

This commit is contained in:
Alexander 2024-09-10 15:10:49 +02:00
parent a89eeca148
commit 81c6f960cf

View file

@ -218,7 +218,9 @@ func (t *transcoderImpl) cropSpotVideo(spotID uint64, crop []int, path string) e
cmd := exec.Command("ffmpeg", "-i", path+"origin.webm",
"-ss", fmt.Sprintf("%.2f", float64(crop[0])/1000.0),
"-to", fmt.Sprintf("%.2f", float64(crop[1])/1000.0),
"-c", "copy", path+"cropped.mp4")
//"-c", "copy",
"-c:v", "libx264", "-c:a", "aac",
path+"cropped.mp4")
var stdout, stderr bytes.Buffer
cmd.Stdout = &stdout
cmd.Stderr = &stderr