Fix a few cases where ffmpeg produces no output (#3161)

* Treat no output from ffmpeg as an error condition
* Distinguish file vs. video duration, and use later where appropriate
* Check for empty file in generateFile

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
alexandra-3
2022-11-21 16:21:27 +10:00
committed by GitHub
parent 045ba55def
commit abc9ec648a
6 changed files with 44 additions and 20 deletions

View File

@@ -49,7 +49,7 @@ func (d *Decorator) Decorate(ctx context.Context, fs file.FS, f file.File) (file
AudioCodec: videoFile.AudioCodec,
Width: videoFile.Width,
Height: videoFile.Height,
Duration: videoFile.Duration,
Duration: videoFile.FileDuration,
FrameRate: videoFile.FrameRate,
BitRate: videoFile.Bitrate,
Interactive: interactive,