Include libshine support

Issue #623 resolved
Former user created an issue

It would be sweet if Serviio could support libshine as FPU-less systems struggle on floating point LAME. -Dserviio.fixedPointEncoders drastically improves e.g ac3 encoding.

http://forum.serviio.org/viewtopic.php?f=7&t=6458

Comments (15)

  1. Petr Nejedly repo owner

    could do. Although will not bundle libshine to the Windows/MacOS FFmpeg binaries for now, so it's be up to NAS packagers or users to build those.

    Would check if --enable-libshine is present and if yes + serviio.fixedPointEncoders = true it'd use that instead on libmp3lame

  2. Former user Account Deleted

    That would be ideal. Note however that libshine apparently needs at least 320kbps to get rid of any artifacts. But it still kicks ass compared to libmp3lame.

  3. normsland

    It seems to detect that libshine is present but is not using libshine in my environment:

    root     29526 63.6  1.9  26008  9788 ?        R    18:34   0:13 /ffp/opt/serviio/bin/ffmpeg -threads 1 -i /i-data/md0/music/Adele/21/01-adele-rolling_in_the_deep.flac -y -threads 1 -b:a 192k -id3v2_version 3 -ac 2 -c:v copy -f mp3 /i-data/md0/wip/serviio/tmp/Serviio/transcoding-temp-235-flv_player-ORIGINAL.stf
    

    My serviio.sh JAVA_OPTS are as follows:

    JAVA_OPTS="-Dplugins.check=false -Djava.util.prefs.syncInterval=86400 -Dffmpeg.location=$SERVIIO_HOME/bin/ffmpeg -Dserviio.fixedPointEncoders=true -Dserviio.defaultTranscodeFolder=/i-data/md0/wip/serviio/tmp -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Ddcraw.location=dcraw"
    

    With the wrapper from the above issue description ffmpeg is being called correctly with -codec:a libshine.

    root     30443 85.5  1.8  25992  9652 ?        R    18:42   0:14 /ffp/opt/serviio/bin/ffmpeg -threads 1 -i /i-data/md0/music/Adele/21/01-adele-rolling_in_the_deep.flac -y -threads 1 -codec:a libshine -b:a 320k -id3v2_version 3 -ac 2 -c:v copy -f mp3 /i-data/md0/wip/serviio/tmp/Serviio/transcoding-temp-235-flv_player-ORIGINAL.stf
    

    Thanks

  4. Petr Nejedly repo owner

    You're right, it's currently implemented only for video transcoding. I'll re-open this ticket to add audio files support too.

  5. patters

    I'll leave this modification out of the Synology package until 1.7 since it's not yet working for audio files. I'll continue to use my own wrapper script until then.

  6. Petr Nejedly repo owner

    Looks like the problem might be due to

    Stream #0:1: Audio: mp3, 0 channels, 128 kb/s

    zero channels. Not sure if the file is dodgy or FFmpeg cannot detect the channels correctly. Will close this for now and reopen if necessary.

  7. Log in to comment