mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Merge branch 'master' of https://github.com/crunchy-labs/crunchy-cli
This commit is contained in:
commit
8111f14da3
1 changed files with 10 additions and 2 deletions
|
|
@ -700,7 +700,7 @@ func archiveFFmpeg(ctx context.Context, dst io.Writer, videoFiles, audioFiles, s
|
||||||
// this might get triggered when not needed but there is currently no easy way to
|
// this might get triggered when not needed but there is currently no easy way to
|
||||||
// bypass this unwanted triggering
|
// bypass this unwanted triggering
|
||||||
if reencode {
|
if reencode {
|
||||||
utils.Log.Debug("Reencode to short video length")
|
utils.Log.Debug("Re-encode to short video length")
|
||||||
|
|
||||||
file.Close()
|
file.Close()
|
||||||
|
|
||||||
|
|
@ -708,7 +708,15 @@ func archiveFFmpeg(ctx context.Context, dst io.Writer, videoFiles, audioFiles, s
|
||||||
tmpFile.Close()
|
tmpFile.Close()
|
||||||
|
|
||||||
errBuf.Reset()
|
errBuf.Reset()
|
||||||
cmd = exec.CommandContext(ctx, "ffmpeg", "-y", "-i", file.Name(), "-c", "copy", "-t", fmt.Sprintf("%02d:%02d:%02d.%d", videoLength[0], videoLength[1], videoLength[2], videoLength[3]), "-f", "matroska", tmpFile.Name())
|
cmd = exec.CommandContext(ctx, "ffmpeg",
|
||||||
|
"-y",
|
||||||
|
"-i", file.Name(),
|
||||||
|
"-map", "0",
|
||||||
|
"-c", "copy",
|
||||||
|
"-disposition:s:0", "0",
|
||||||
|
"-t", fmt.Sprintf("%02d:%02d:%02d.%d", videoLength[0], videoLength[1], videoLength[2], videoLength[3]),
|
||||||
|
"-f", "matroska",
|
||||||
|
tmpFile.Name())
|
||||||
cmd.Stderr = &errBuf
|
cmd.Stderr = &errBuf
|
||||||
if err = cmd.Run(); err != nil {
|
if err = cmd.Run(); err != nil {
|
||||||
return fmt.Errorf(errBuf.String())
|
return fmt.Errorf(errBuf.String())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue