fix: issues
This commit is contained in:
BIN
backend/backend
BIN
backend/backend
Binary file not shown.
@@ -97,6 +97,12 @@ func (d *DiscoverMedias) processVideo(video string, to string) (media_store.Vide
|
|||||||
return info, errors.Wrapf(err, "ensure directory: %s", to)
|
return info, errors.Wrapf(err, "ensure directory: %s", to)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// extract poster
|
||||||
|
posterFile := filepath.Join(to, "poster.jpg")
|
||||||
|
if err := d.ffmpegVideoToPoster(video, posterFile); err != nil {
|
||||||
|
return info, errors.Wrapf(err, "ffmpeg video to poster: %s", video)
|
||||||
|
}
|
||||||
|
|
||||||
// extract audio from video
|
// extract audio from video
|
||||||
audioFile := filepath.Join(to, "audio.mp3")
|
audioFile := filepath.Join(to, "audio.mp3")
|
||||||
if err := d.extractAudio(video, audioFile); err != nil {
|
if err := d.extractAudio(video, audioFile); err != nil {
|
||||||
@@ -114,12 +120,6 @@ func (d *DiscoverMedias) processVideo(video string, to string) (media_store.Vide
|
|||||||
return info, errors.Wrapf(err, "ffmpeg audio to m3u8: %s", audioFile)
|
return info, errors.Wrapf(err, "ffmpeg audio to m3u8: %s", audioFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// extract poster
|
|
||||||
posterFile := filepath.Join(to, "poster.jpg")
|
|
||||||
if err := d.ffmpegVideoToPoster(video, posterFile); err != nil {
|
|
||||||
return info, errors.Wrapf(err, "ffmpeg video to poster: %s", video)
|
|
||||||
}
|
|
||||||
|
|
||||||
// get media duration
|
// get media duration
|
||||||
duration, err := d.getMediaDuration(video)
|
duration, err := d.getMediaDuration(video)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user