nschlia / ffmpegfs

FUSE-based transcoding filesystem with video support from many formats to FLAC, MP4, TS, WebM, OGG, MP3, HLS, and others.
https://nschlia.github.io/ffmpegfs/
GNU General Public License v3.0
206 stars 14 forks source link

Image files are converted when the destination type is a video format #28

Closed FinalStaticFox closed 5 years ago

FinalStaticFox commented 5 years ago

There seems to be a regression from #11 : if the --desttype option is not an audio only format (ie: Opus, MP3, WAV, AIFF), all image files are converted.

It happens on the latest release (1.7) and the latest master, both built on Fedora 29.

nschlia commented 5 years ago

I will check that. Thanks for notifying me.

nschlia commented 5 years ago

Seems that the FFmpeg API function I was using tagged BMP or JPG as MJPEG video, I have refined the detection. Works for the images I tried it on.

nschlia commented 5 years ago

Fix works with official FFmpeg releases. With somewhat recent daily builds it fails, because av_guess_codec/av_guess_format actually seem to report the real codecs for that file. The offical version checks the file extension only - e.g flac returns AV_CODEC_ID_NONE. Latest build versions return PNG or JPG if the audio file has a album art embedded in it. Nice, but breaks this fix.

Reopened, will implemenet a solution for any API version.

nschlia commented 5 years ago

OK, changed the code to use a fixed list instead of FFmpeg API functions subject to change in the future.