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
196 stars 14 forks source link

INTERNAL ERROR: ffmpegfs_readdir()! newvirtualfile is NULL. #139

Closed dangowrt closed 1 year ago

dangowrt commented 1 year ago

What's going on there?

https://github.com/nschlia/ffmpegfs/blob/fe9ad9d444f94cb7d8ae773c5f829a50fca7506b/src/fuseops.cc#L413

[daniel@mixxxtop ~]$ ffmpegfs -f --log_stderr --log_maxlevel=INFO --cachepath=/home/daniel/cache --min_diskspace=5G /home/daniel/Music/MDS_feat_Ed_Cox_-_Zeg_Borg--Eris006--FLAC/ /home/daniel/waves -o allow_other,desttype=WAV,extensions=flac
2022-10-02 01:53:57 INFO   : FFMPEGFS V2.13 initialising.
2022-10-02 01:53:57 INFO   : Mapping '/home/daniel/Music/MDS_feat_Ed_Cox_-_Zeg_Borg--Eris006--FLAC/' to '/home/daniel/waves/'.
2022-10-02 01:53:57 INFO   : The process with PID 233158 is now master.
2022-10-02 01:53:57 INFO   : The thread pool is being initialised with a maximum of 64 threads.
2022-10-02 01:53:57 ERROR  : INPUT   [01. MDS - Digital Clementine.flac] INTERNAL ERROR: ffmpegfs_readdir()! newvirtualfile is NULL.
[daniel@mixxxtop ~]$ cd waves/
[daniel@mixxxtop waves]$ ls -l
ls: reading directory '.': Invalid argument
total 0
nschlia commented 1 year ago

What's going on there?

As the comment says, should never happen... I'll check how this is possible anyway.

nschlia commented 1 year ago

I found out that it is caused by the extensions=flac parameter. Actually, extensions=flac is redundant, because flac is already an known extension. The parameter can be used to define additional extensions, e.g., if for some reason you want .xyz files to be transcoded.

So please remove extensions=flac from the command line and everything should work.

Yet, this is still a bug, because specifying it anyway should simply have no effect. I'll fix that one, thanks for reporting it!

dangowrt commented 1 year ago

I was hoping to limit transcoding to FLAC files only. All I need is FLAC files to transparently appear as WAV files, all other media files (including mp3, existing wav, ...) should not be touched. (I'm trying to use ffmpegfs with Pioneer's rekordbox to export music for Pioneer XDJ players which don't support FLAC)

nschlia commented 1 year ago

The parameter was to add extra files. But this is no longer required, formerly the decision if a file was to be transcoded was taken by its extension. Files with unknown extensions would be ignored. Now FFmpegfs scans all input files and detects transcodable files by the format, so the extension does not matter anymore.

The --extensions parameter is a relict of the past and will be removed without substitution. That escaped me completely.

I was hoping to limit transcoding to FLAC files only. All I need is FLAC files to transparently appear as WAV files, all other media files (including mp3, existing wav, ...) should not be touched.

This is currently not possible. That would require a new parameter, e,g., -include_extensions=flac,mp3. Feel free to create an issue, sounds like a good idea to have this option.

dangowrt commented 1 year ago

Thank you for explaining. Opened https://github.com/nschlia/ffmpegfs/issues/140 for new feature request.