Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

特定格式视频缩略图无法通过ffmpeg生成 #1756

Closed
qdljerry opened this issue Jul 2, 2023 · 0 comments
Closed

特定格式视频缩略图无法通过ffmpeg生成 #1756

qdljerry opened this issue Jul 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@qdljerry
Copy link

qdljerry commented Jul 2, 2023

Describe the bug
在配置好ffmpeg环境中加载mkv格式的视频缩略图时出现错误

To Reproduce

  1. 生成mkv格式视频缩略图

Log

[0.51ms]  UPDATE "files" SET "metadata" = '{"thumb_status":"not_available"}'  WHERE "files"."deleted_at" IS NULL AND "files"."id" = 425
[1 rows affected or returned ]
enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58. 13.101 / 58. 13.101
  libavcodec     60. 21.100 / 60. 21.100
  libavformat    60.  9.100 / 60.  9.100
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  8.102 /  9.  8.102
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[in#0 @ 00000283e95ba140] Unknown input format: 'mkv'

[Warning] 2023-07-02 16:42:01 Failed to invoke ffmpeg: ffmpeg version 2023-06-27-git-9b6d191a66-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers

Desktop (please complete the following information):

  • OS: Windows11
  • Browser: Edge

Additional context
In pkg/thumb/ffmpeg.go line 71

	cmd := exec.CommandContext(ctx,
		ffmpegOpts["thumb_ffmpeg_path"], "-ss", ffmpegOpts["thumb_ffmpeg_seek"], "-f", inputFormat, "-i", tempInputPath,
		"-vf", scaleOpt, "-vframes", "1", tempOutputPath)

We can see that a -f option is added to ffmpeg which caused this error, however, this option is not necessary.
Is it possible to remove the the -f option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants