khenriks / mp3fs

FUSE-based transcoding filesystem from FLAC to MP3
http://khenriks.github.io/mp3fs/
GNU General Public License v3.0
382 stars 46 forks source link

Last seconds of files contain different song #55

Closed viertelb closed 4 years ago

viertelb commented 7 years ago

My library is about 150GB of FLAC and it is stored on a openmediavault NAS with a Celeron CPU and 4GB RAM. On the NAS I mount mp3fs via fstab. and then I use samba from Windows 10 or from Linux (Lubuntu 16.04) to connect to the NAS.

I recognised that the mp3 that have been converted from FLAC are some seconds larger than the original FLAC files. This discrepancy seems to grow larger with larger files. FLAC files of about 2 minutes have about 2 seconds more playtime displayed in VLC and other players when converted to mp3.

This results in the mp3 files beeing played until their FLAC time ends, actually skipping the displayed last seconds of the file, which is not a problem.

However, sometimes - I suspect when I copied a large portion of files at once - the empty space at the end is not just skipped away but actually filled with fragments of other songs (mostly of the same album).

Can someone confirm this?

khenriks commented 5 years ago

This sounds like the result of memory corruption, and since it only affects Samba, I'm inclined to say this is the same issue as #57.

Can you try cloning the git repository and see if the latest commit resolves the issue?

viertelb commented 5 years ago

Yes, I am the same guy as in #57. Funny that I was the first one to experience it. I installed mp3fs via package manager on the server. Is it safe to update it with git there?

khenriks commented 5 years ago

I would first uninstall the package using the package manager, before installing the git version. Make sure you also have all the dependencies needed; the README has more details about what libraries you need to install.

viertelb commented 5 years ago

Sorry to bother you again. I was wrong - last time I installed from release but not as package. So now I have to install from the git master, right? I never did this. But I will. Probably best with pip, right? I have all the dependencies. How can I remove version 0.91? Is it necessary to remove it?

jdannenberg commented 5 years ago

In my opinion it can not be better explained than here (no offense, just trying to help).

Pip has nothing to with it as far as I see, this is no python package.

khenriks commented 5 years ago

Thanks for answering for me! The INSTALL.md file indeed has the best instructions for installing.

You shouldn't need to install the old version; if you install the new version on top, it should just work.

viertelb commented 5 years ago

Thanks! The installation instruction misses the fact that I have to clone the repository. But this is probably so general that it was just my problem because I did not do it before.

However, I received some errors and posted my terminal output from "git clone" to "make". I did not try "make install" yet.

The ERROR is in line 7 counting from bottom.

root@OMV:/home# mkdir mp3fs
root@OMV:/home# git clone https://github.com/khenriks/mp3fs
Klone nach 'mp3fs' ...
remote: Enumerating objects: 24, done.
remote: Counting objects: 100% (24/24), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 1695 (delta 14), reused 21 (delta 13), pack-reused 1671
Empfange Objekte: 100% (1695/1695), 1.20 MiB | 1.31 MiB/s, Fertig.
Löse Unterschiede auf: 100% (1066/1066), Fertig.
root@OMV:/home# ls
mp3fs  mp3fs-0.91  mp3fs-0.91.tar.gz
root@OMV:/home# cd mp3fs
root@OMV:/home/mp3fs# ls
autogen.sh  configure.ac  COPYING  COPYING.DOC  INSTALL.md  Makefile.am  mp3fs.1.txt  NEWS  README.md  src  test
root@OMV:/home/mp3fs# ./autogen.sh
Running autoreconf --install
configure.ac:11: installing 'config/compile'
configure.ac:7: installing 'config/install-sh'
configure.ac:7: installing 'config/missing'
src/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
src/Makefile.am: installing 'config/depcomp'
src/codecs/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
parallel-tests: installing 'config/test-driver'
root@OMV:/home/mp3fs# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of int... 4
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for flac... yes
checking for vorbis... yes
checking for id3tag... yes
checking for lame_init in -lmp3lame... yes
checking lame/lame.h usability... yes
checking lame/lame.h presence... yes
checking for lame/lame.h... yes
checking for fuse... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/codecs/Makefile
config.status: creating src/lib/Makefile
config.status: creating test/Makefile
config.status: executing depfiles commands
root@OMV:/home/mp3fs# make
Making all in src
make[1]: Verzeichnis „/home/mp3fs/src“ wird betreten
Making all in codecs
make[2]: Verzeichnis „/home/mp3fs/src/codecs“ wird betreten
  CXX      coders.o
  CXX      flac_decoder.o
  CXX      vorbis_decoder.o
  CXX      picture.o
  CXX      mp3_encoder.o
  AR       libcodecs.a
ar: `u' modifier ignored since `D' is the default (see `U')
make[2]: Verzeichnis „/home/mp3fs/src/codecs“ wird verlassen
Making all in lib
make[2]: Verzeichnis „/home/mp3fs/src/lib“ wird betreten
  CC       base64.o
base64.c: In function ‘decode_4’:
base64.c:413:16: warning: conversion to ‘char’ from ‘int’ may alter its value [-Wconversion]
       *out++ = (((b64[to_uchar (in[0])] << 2) & 0xff)
                ^
base64.c:436:20: warning: conversion to ‘char’ from ‘int’ may alter its value [-Wconversion]
           *out++ = (((b64[to_uchar (in[1])] << 4) & 0xf0)
                    ^
base64.c:456:24: warning: conversion to ‘char’ from ‘int’ may alter its value [-Wconversion]
               *out++ = (((b64[to_uchar (in[2])] << 6) & 0xc0)
                        ^
  AR       libbase64.a
ar: `u' modifier ignored since `D' is the default (see `U')
make[2]: Verzeichnis „/home/mp3fs/src/lib“ wird verlassen
make[2]: Verzeichnis „/home/mp3fs/src“ wird betreten
  CC       mp3fs.o
  CC       fuseops.o
  CXX      transcode.o
  CXX      buffer.o
  CXX      stats_cache.o
  CXX      logging.o
  CXXLD    mp3fs
make[2]: Verzeichnis „/home/mp3fs/src“ wird verlassen
make[1]: Verzeichnis „/home/mp3fs/src“ wird verlassen
Making all in test
make[1]: Verzeichnis „/home/mp3fs/test“ wird betreten
make[1]: Für das Ziel „all“ ist nichts zu tun.
make[1]: Verzeichnis „/home/mp3fs/test“ wird verlassen
make[1]: Verzeichnis „/home/mp3fs“ wird betreten
  GEN      mp3fs.1
a2x: ERROR: "xmllint" --nonet --noout --valid "/home/mp3fs/mp3fs.1.xml" returned non-zero exit status 4
Makefile:855: die Regel für Ziel „mp3fs.1“ scheiterte
make[1]: *** [mp3fs.1] Fehler 1
make[1]: Verzeichnis „/home/mp3fs“ wird verlassen
Makefile:428: die Regel für Ziel „all-recursive“ scheiterte
make: *** [all-recursive] Fehler 1
root@OMV:/home/mp3fs# 
jdannenberg commented 5 years ago

My wild guess is that you are just missing the xmllint dependency. See the required dependencies, including the additional ones required if installing from git.

viertelb commented 5 years ago

I was installing on a debian-based server (openmediavault). So since I did not use "brew" I did not install "xmllint".

Trying "apt-get install xmllint" now installed this package. Running "make" and "make install" again gave no error.

Please update the installation guide to include "xmllint" for Ubuntu and Debian. Also, please add that after upgrading the server has to be restarted (or, probably, re-mounting to mount point will suffice).

Thanks for this great program!

(Copying via terminal works fine. With file manager PCmanFM i have issues that are probably related to the file manager.)

khenriks commented 5 years ago

Okay, I've updated the instructions to correct for the missing xmlto package required on Debian and Ubuntu.

I've also updated the version in git so that when you build from git, mp3fs --version will give more detailed version info.