Subsonic Web-Player - possible Audio codec?

General discussions.

Moderator: moderators

Subsonic Web-Player - possible Audio codec?

Postby qupfer » Fri Jul 12, 2013 9:07 am

Hi,

is it possible to stream with other audio-codec then mp3 with the build-in audioplayer in the webinterface?
I tried, ogg/vorbis, opus and (HE)-AAC with Chrome 28 and Firefox 22. But nothing works :(

AAC in iSub works great...so i think the ffmpeg-line is not completly wrong ;)

Convert to & ffmpeg-line:
m4a & ffmpeg -i %s -ab 32k -v 0 -f mp4 -acodec libfdk_aac -profile:a aac_he_v2 -
ogg & ffmpeg -i %s -ac 2 -ab 64k -v 0 -vn -acodec libvorbis -
opus & ffmpeg -i %s -ac 2 -ab 32k -v 0 -vn -acodec libopus -
qupfer
 
Posts: 8
Joined: Tue Feb 19, 2013 2:37 pm

Re: Subsonic Web-Player - possible Audio codec?

Postby Foyaxe » Mon Oct 14, 2013 7:51 pm

Hi - aac does work, you just need to pack into a flv container.
I use he-aac for the webplayer because it has the best compression ratio.
Other formats are not supported by the jwplayer. I would personally prefer opus :) (even better compression and free license)

Name:
aacplus

Convert from:
mp3 ogg oga aac m4a flac wav wma aif aiff ape mpc shn

Convert to:
aac

Step 1:
ffmpeg -i %s -v error -c libaacplus -ab 48k -ac 2 -ar 44100 -f flv -

I had problems with some particular files where ffmpeg complained about channel/samplerate constellations…
therefore it is helpful to set -v verbose.

For android clients I use ogg/vorbis.
Keep me informed if somebody gets opus streaming working.

PS: he-aac has in jwplayer the disadvantage that you can not jump within the track before it is completely loaded - on mp3 that works - but on he-aac you only neet about 1/3 of the filesize so it doesnt take long to stream the file

Foyaxe
Foyaxe
 
Posts: 8
Joined: Tue May 15, 2012 7:08 pm

Re: Subsonic Web-Player - possible Audio codec?

Postby ripdog » Thu Dec 12, 2013 12:25 pm

Keep me informed if somebody gets opus streaming working.


Opus streaming works fine, and it's easy to set up. Unfortunately, client support is a *little* lacking.

Namely, not one client I tried worked. Not even jamstash! I can play it by taking the stream URLs (easily accessible in subsonic by selecting "External player" in player settings) and feeding them to firefox. Chrome needs a command line switch to enable opus, I think.

Foobar2000 should work, but the bad ssl cert is silently denied, so it doesn't.

Jamstash fails because it inexplicably downloads the first 20kb of the file and then tries to reestablish connection X bytes into the file - you can't seek in streaming opus files (it seems), so this fails.

Dsub fails due to simple lack of support of opus.

I've filed bug reports in all three projects, if I can get just Jamstash and Dsub working, I'll be a happy camper. :3

Settings (remember to link opusenc in your subsonic transcoder folder):

From: ogg mp3 oga aac m4a wav wma aif aiff ape mpc shn

TO: oga

Decode: ffmpeg -i %s -ab %bk -v 0 -f wav -

Encode: opusenc --quiet --bitrate 52 --downmix-stereo --title %t --album %l --artist %a - -

Note that the output file extension is oga, because the opus audio is contained in an ogg container - this will not make ogg vorbis audio! :)
ripdog
 
Posts: 1
Joined: Thu Dec 12, 2013 12:18 pm

Re: Subsonic Web-Player - possible Audio codec?

Postby GJ51 » Thu Dec 12, 2013 1:00 pm

http://www.longtailvideo.com/support/jw ... at-support

According to JW's documentation the player should support ogg playback. I use ogg on my android phone and would love to get it to work on the desktop player so that I could use ogg instead of mp3 for both environments.

I use:

ffmpeg -v 0 -i %s -f ogg -vn -acodec libvorbis -ar 44100 -aq 3 -ac 2 -map_meta_data 0:0 -

for mobile output, which works great on Android phones, but won't play on the desktop web player.

Here's the log output from a test:

[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Duration: 00:02:20.67, start: 0.000000, bitrate: 128 kb/s
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0: Audio: mp3, 44100 Hz, 1 channels, s16, 128 kb/s
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Output #0, ogg, to 'pipe:':
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Metadata:
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) MusicBrainz TRM Id: d0898d61-586b-40a3-808a-9c3d551742ad
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) MusicBrainz Artist Id: b59ac58d-036e-4bba-8112-c32a34c4575b
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) MusicBrainz Album Id: db845e6c-35ae-473c-bd8b-d652cc164127
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) MusicBrainz Album Type: compilation
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) MusicBrainz Album Status: official
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) MusicBrainz Album Artist Id:
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) artist : Jerry Lee Lewis
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) album : Greatest Hits
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TPE2 : Jerry Lee Lewis
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) title : Good Golly Miss Molly
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) track : 08
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) genre : Oldies
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0: Audio: vorbis, 44100 Hz, 2 channels, s16, 64 kb/s
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream mapping:
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0 -> #0.0
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Press [q] to stop encoding
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [mp3 @ 014a91f0]Header missing
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Error while decoding stream #0.0
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) size= 1540kB time=135.08 bitrate= 93.4kbits/s
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg)
[12/12/13 7:44:53 AM EST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) video:0kB audio:1350kB global headers:4kB muxing overhead 13.747113%

Currently I run a separate site just to service mobile use, otherwise a new user would get the mp3 default encoding when a new player was initiated. If I could get ogg to work on the desktop player i could consolidate to one site for both environments as I prefer ogg over mp3 anyway for it's efficiency and quality.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Re: Subsonic Web-Player - possible Audio codec?

Postby Foyaxe » Sun Dec 22, 2013 5:38 pm

ripdog wrote:Opus streaming works fine, and it's easy to set up. Unfortunately, client support is a *little* lacking.


Yeah, i know…
I got it running smoothly with clementine now…
But i actually thought of a web client.
But lets see, maybe from now on I like a standalone player even more…
It adds a lot of extra functionality compared to the subsonic web client.
The Android Open Source Project doesn't support opus audio yet either.
I think it is not the job of DSub to bring its own codecs. It probably uses the system libs.
This is the feature request for Android supporting opus:
https://code.google.com/p/android/issues/detail?id=32456
Foyaxe
 
Posts: 8
Joined: Tue May 15, 2012 7:08 pm


Return to General

Who is online

Users browsing this forum: No registered users and 6 guests