NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

dsm1212's avatar
dsm1212
Apprentice
Nov 25, 2014

subsonic problem: ffmpeg in 6.2.0 distribution

The updated ffmpeg in the 6.2.0 distribution is:
Version: 7:2.3.5-netgear1

It's super that this got updated, but unless I'm misunderstanding something it was built poorly. Subsonic is not transcoding for me on the fly. See how it says the configuration is "--disable-protocols" and the only output protocol is file. This means it cannot output to "-" (aka known as pipe in ffmpeg). Subsonic needs the stream to emit to stdout and this is the only way to get that from ffmpeg. I think the default build for ffmpeg includes all protocols so someone did this on purpose. I'm not sure why.

steve

# ffmpeg -protocols
ffmpeg version 2.3.5 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 3 2014 10:31:36 with gcc 4.9 (Debian 4.9.0-7)
configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc=cc --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-stripping --enable-small --disable-amd3dnow --disable-bsfs --disable-ffserver --disable-devices --disable-protocols --enable-protocol=file --enable-avresample --disable-parsers --enable-parser=aac --enable-parser=ac3 --enable-parser=dvbsub --enable-parser=dvdsub --enable-parser=flac --enable-parser=h261 --enable-parser=h263 --enable-parser=h264 --enable-parser=mjpeg --enable-parser=mlp --enable-parser=mpeg4video --enable-parser=mpegaudio --enable-parser=mpegvideo --enable-parser=vc1 --enable-parser=vorbis --enable-parser=vp3 --enable-parser=vp8 --disable-demuxers --enable-demuxer=aac --enable-demuxer=ac3 --enable-demuxer=asf --enable-demuxer=avi --enable-demuxer=dts --enable-demuxer=dv --enable-demuxer=eac3 --enable-demuxer=flac --enable-demuxer=flv --enable-demuxer=h261 --enable-demuxer=h263 --enable-demuxer=h264 --enable-demuxer=matroska --enable-demuxer=mjpeg --enable-demuxer=mov --enable-demuxer=m4v --enable-demuxer=mp3 --enable-demuxer=mpegps --enable-demuxer=mpegts --enable-demuxer=mpegtsraw --enable-demuxer=mpegvideo --enable-demuxer=ogg --enable-demuxer=vc1 --enable-demuxer=wav --disable-decoders --enable-decoder=aac --enable-decoder=alac --enable-decoder=eac3 --enable-decoder=flac --enable-decoder=flv --enable-decoder=h264 --enable-decoder=mp3 --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=vorbis --enable-decoder=wmalossless --enable-decoder=wmapro --enable-decoder=wmav1 --enable-decoder=wmav2 --disable-muxers --enable-muxer=mp3 --disable-encoders --enable-libmp3lame --enable-encoder=libmp3lame --disable-filters --enable-filter=aresample
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.100 / 55. 48.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.100 / 4. 11.100
libavresample 1. 3. 0 / 1. 3. 0
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
Supported file protocols:
Input:
file
Output:
file

5 Replies

Replies have been turned off for this discussion
  • It seems that ffmpeg is actually being deprecated in debian 7. We should be switching to use avconv. But there is a convoluted set of dependencies in the current netgear distribution that prevents me from installing libav-tools which contains avconv. Doing so would uninstall a pile of important stuff and I'm wary of doing so. But quick solution:

    Download 64-bit static build of ffmpeg from here: http://johnvansickle.com/ffmpeg/
    Remove whatever you have in /apps/subsonic/transcode
    Unpack the static tar into /apps/subsonic/transcode
    (If it creates a subdirectory move the files up a level so that ffmpeg is in the transcode directory.)

    steve
  • Skywalker's avatar
    Skywalker
    NETGEAR Expert
    It's not configured poorly. It's configure appropriately for ReadyNASOS. Transcoding apps in general should be including their own libraries, for a variety of reasons. BTW, you can just tell ffmpeg to write to /proc/self/fd/1 if you want the output to go to stdout, using the file protocol driver. That said, it's a trivial change to add pipe output support, so if the rest of the ffmpeg configuration is good enough for subsonic to use, then we might as well enable the pipe protocol driver to make things easier.

    Debian switched to libav several years ago. ReadyNASOS uses ffmpeg, which seems to be better-maintained these days. You shouldn't try to downgrade to the Debian 7 libav packages.
  • I understand you could argue this is an addon issue, but it did work in 6.1.9. Hard for me to see how that traded off for a small amount of space and memory of removing pipe support is a "good" decision. Especially when it took effort to do instead of using the defaults. I think what you are saying is Netgear has optimized the stock ffmpeg for readydlna, but changing a semi-standard component is not a good thing to do for an extensible system. I mean I don't want twenty ffmpegs installed. Otherwise installations will take forever as they have to check every single build option of every command and shared library. Or all addons would need to be statically linked or include their libraries which would be way way more impactful than a few more bits to support pipe in ffmpeg :-). Much better to provide the default build as netgear did in 6.1.9.

    I tried /proc/self/fd/1 from the command line with the stock executable and it prompted me whether to overwrite /self/fd/1 or not. I was afraid to say yes so I can't tell you if that works or not.

    steve
  • Skywalker's avatar
    Skywalker
    NETGEAR Expert
    dsm1212 wrote:
    I understand you could argue this is an addon issue, but it did work in 6.1.9.

    I don't know how. The ffmpeg package has been configured this way all the way back to 6.0.0.
    dsm1212 wrote:
    I think what you are saying is Netgear has optimized the stock ffmpeg for readydlna, but changing a semi-standard component is not a good thing to do for an extensible system. I mean I don't want twenty ffmpegs installed.

    I'm saying it's configured appropriately for the services that come with the firmware. There are also legal considerations that we have to account for. So applications like Plex must include their own ffmpeg anyway, because they use a custom configuration, and they require some functionality that we are not legally able to distribute.
    dsm1212 wrote:
    Otherwise installations will take forever as they have to check every single build option of every command and shared library.

    I'm not sure what this means.
    dsm1212 wrote:
    Or all addons would need to be statically linked or include their libraries which would be way way more impactful than a few more bits to support pipe in ffmpeg :-)

    If it's reasonable and legal to make a config change to ffmpeg to support more apps, we're open to doing that.
    dsm1212 wrote:
    Much better to provide the default build as netgear did in 6.1.9.

    Again, we never did enable the pipe driver, even in 6.1.9.
    dsm1212 wrote:
    I tried /proc/self/fd/1 from the command line with the stock executable and it prompted me whether to overwrite /self/fd/1 or not. I was afraid to say yes so I can't tell you if that works or not.

    Yes, it's safe. Use the -y option to get rid of the prompt.
  • Very strange, subsonic was definitely working on 6.1.9. I think I see what happened, but I don't know why. It was an older version of ffmpeg that was present on 6.1.9 because I had to change the arguments to ffmpeg in the subsonic configuration and after that it worked. When I "apt-cache show ffmpeg" on 6.2 I see both the old and new versions, but it's the new one installed on my system now. Is it possible some addon triggered the install of the new one after I went to 6.2? I mean that must be what happened, because the one on there now accepts the new ffmpeg arguments unlike the one I had been running on 6.1.9 but it doesn't have pipe support.

    steve

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More