(Solved)Streaming aacplus

Need help? Post your questions here.

Moderator: moderators

(Solved)Streaming aacplus

Postby ziller » Sun Aug 01, 2010 12:53 pm

Hello i'm trying to get the AACplus v2 command line encoding tool to work in subsonic
http://www.un4seen.com/
http://www.un4seen.com/filez/4/enc_aacPlus.zip

what are the parameters i gues it has to be wave to aacp? (step 1 step2)but how to do it :) or any other methode to have streaming aacplus
who can help i think there is a need to stream aacplus insted only mp3
Last edited by ziller on Sat Aug 28, 2010 1:28 pm, edited 1 time in total.
ziller
 
Posts: 5
Joined: Sun Aug 01, 2010 12:41 pm

Postby ziller » Sat Aug 07, 2010 9:53 am

found a temp. solution "Shoutcast transcoder" :roll:
now i can do some aac+ streaming.
I hope in the future Ss will have shoutcast transcoder build in.
:wink:
ziller
 
Posts: 5
Joined: Sun Aug 01, 2010 12:41 pm

Postby Kirk » Thu Aug 12, 2010 7:35 pm

At one point in time, I was interested in doing AAC+ transcoding... AAC+ is a great codec, it seems to provide extremely nice sounding music at really low bitrates.

I lost interest once I found out the web player (JWPlayer) can't play the AAC format. At least that is the impression I was given. I think it can only play MP3 and FLV.

It might work if you could get the AAC+ audio into an MPEG-4 container, since JWPlayer seems to support MPEG-4. Nevertheless... I don't know enough about audio transcoderg yet to be able to do that. My understanding of Subsonic's transcoders doesn't go very far beyond the text in the Settings panel. :?

Cheers,
Kirk
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

This time i figured it out

Postby ziller » Sat Aug 28, 2010 2:02 pm

Download enc_aacPlus.dll see link at the top
enc_aacPlus.dll & nscrt.dll must be in transcode directory
(C:\subsonic\transcode )
(nscrt.dll get it from Winamp directory)


Settings |Transcoding

Name:mp3 > aac
Convert from:mp3
Convert to:aac
Step 1: ffmpeg -i %s -f wav -
Step 2: enc_aacPlus - - --br 32000 --he --silent --rawpcm 44100 2 16


Settings | Players

tick External player
Active transcodings tick mp3 > aac do this with all your players
Image
ziller
 
Posts: 5
Joined: Sun Aug 01, 2010 12:41 pm

Postby Kirk » Sat Aug 28, 2010 8:00 pm

Cool! I'd be interested to know if this requires WinAmp to be installed or not...

Either way, I probably won't be doing it since my Subsonic server is Ubuntu and I don't think it could do anything useful with the DLL.

Still, excellent find...

Cheers,
Kirk
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Postby delcypher » Sun Aug 29, 2010 9:50 am

@Kirk - The JWplayer can play any format that flash supports. So it does support AAC. The problem is finding a way to transcode to AAC that works with subsonic. I've only found one way so far that works well and that is using libfaac with ffmpeg using a flv container (see my wiki post http://sourceforge.net/apps/mediawiki/subsonic/index.php?title=Transcoders#Transcoding_to_AAC). Unfortunately this is only Low complexity (LC-AAC) and not HE-AAC (this is aac+ which is just a brandname)

It may be possible to run this "enc_aacPlus" tool using wine under linux but I'm not very keen but I may look into it quickly.

@Ziller
The shoutcat transcoder option isn't very good really as it is intended to be used with the shoutcast server. We really don't want another server just so we can stream HE-AAC (v1 or v2) audio. Even if you setup everything the output never goes to standard output so it will never work with subsonic.

Well done for finding it though. I never new it existed.
delcypher
 
Posts: 109
Joined: Tue Jun 01, 2010 10:39 am

Postby delcypher » Sun Aug 29, 2010 11:54 am

Okay I did a little more research

The enc_aacPlus tool is actually open source command line front end for enc_accplus.dll . See http://aacpluscli.codeplex.com/

You need enc_accplus.dll, nscrt.dll & libmp4v2.dll from Winamp 5.33/5.34 ( available here http://www.filehippo.com/download_winamp/2243/ ). You will also need MS Visual C++ 2008 libraries (mfc90,msvcp90,msvcr90) if you don't have it installed.

I can get the command to run in windows and on linux (using wine with winetricks vcrun2008) and it will encode a file into an HE-AAC file. However on linux I don't seem to be able to do any standard input/output redirection which is needed.

In windows when I try and run the commands I can get enc_aacplus.exe to except from standard input but it won't write to standard output. If use '-' as the output it writes a file called '-'! The user Ziller seemed to suggest that it is possible. How did you do it?

Not being able to write to standard output seems to be a reoccurring problems for all AAC encoders when using a Mpeg4 container I've found. I've tried

ffmpeg (using mp4 container)
Nero AAC encoder
faac

and now enc_aacplus.exe . ffmpeg complains that it needs random access to the output file and so cannot use an output stream. I've tricking the others into writing to standard output and they all fail at the end of encoding.

If others are interested in trying this encoder I've zipped up the executable and the needed dll files (the dlls are from Winamp so you won't need to install it yourself). The zip file can be found here

http://www.su-root.eu/temp/enc_accplus_with_dlls.zip
delcypher
 
Posts: 109
Joined: Tue Jun 01, 2010 10:39 am

This is how to log looks... mebbe its usefull

Postby ziller » Sun Aug 29, 2010 4:38 pm

[8/29/10 6:33:41 PM CEST] INFO PlaylistInputStream admin listening to "Minz - Positive Streamers EP (2010)\01-minz--drop_forged.mp3"
[8/29/10 6:33:41 PM CEST] DEBUG TranscodeInputStream Starting transcoder: [c:\subsonic\transcode\ffmpeg] [-i] [C:\mowes_portable\www\audiobooks\mp3\audio_books\Deephouse\Minz - Positive Streamers EP (2010).folder\Minz - Positive Streamers EP (2010)\01-minz--drop_forged.mp3] [-f] [wav] [-]
[8/29/10 6:33:41 PM CEST] DEBUG TranscodeInputStream Starting transcoder: [c:\subsonic\transcode\enc_aacPlus] [-] [-] [--br] [32000] [--he] [--silent] [--rawpcm] [44100] [2] [16]
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) FFmpeg version SVN-r21231-Sherpya, Copyright (c) 2000-2010 Fabrice Bellard, et al.
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) built on Jan 16 2010 05:42:31 with gcc 4.2.5 20080919 (prerelease) [Sherpya]
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavutil 50. 7. 0 / 50. 7. 0
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavcodec 52.47. 0 / 52.47. 0
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavformat 52.47. 0 / 52.47. 0
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavdevice 52. 2. 0 / 52. 2. 0
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavfilter 1.15. 0 / 1.15. 0
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libswscale 0. 8. 0 / 0. 8. 0
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libpostproc 51. 2. 0 / 51. 2. 0
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [mp3 @ 013bd100]max_analyze_duration reached
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Input #0, mp3, from 'C:\mowes_portable\www\audiobooks\mp3\audio_books\Deephouse\Minz - Positive Streamers EP (2010).folder\Minz - Positive Streamers EP (2010)\01-minz--drop_forged.mp3':
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Metadata:
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TALB : Positive Streamers EP
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TPE1 : Minz
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TDAT : 3103
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TENC : rakshas
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TSSE : Lame 3.96r
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TCON : House
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TLAN : eng
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TPUB : Ransom Note
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TIT2 : Drop Forged
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TRCK : 1/4
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TYER : 2010
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Rip date : 2010-03-31
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Source : WEB
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Supplier : rakshas
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Ripping tool : EAC
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Release type : EP
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Catalog # : RNFN06
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Duration: 00:07:56.26, start: 0.000000, bitrate: 320 kb/s
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0: Audio: mp3, 44100 Hz, 2 channels, s16, 320 kb/s
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Output #0, wav, to 'pipe:':
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream mapping:
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0 -> #0.0
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Press [q] to stop encoding
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) size= 1539kB time=8.93 bitrate=1411.2kbits/s
[8/29/10 6:33:42 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) size= 3137kB time=18.21 bitrate=1411.2kbits/s
[8/29/10 6:33:43 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) size= 4437kB time=25.76 bitrate=1411.2kbits/s
[8/29/10 6:33:43 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) size= 6246kB time=36.26 bitrate=1411.2kbits/s
[8/29/10 6:33:44 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) size= 7920kB time=45.98 bitrate=1411.2kbits/s
[8/29/10 6:33:45 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) size= 8546kB time=49.61 bitrate=1411.2kbits/s
[8/29/10 6:33:46 PM CEST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) size= 10404kB time=60.40 bitrate=1411.2kbits/s
Image
ziller
 
Posts: 5
Joined: Sun Aug 01, 2010 12:41 pm

Postby delcypher » Sun Aug 29, 2010 10:01 pm

Good news I got it working under linux & windows :)

It turns out the version of enc_aacPlus.exe that Ziller is using is a modified version (by Modified by Bernd Niedergesaess to work with BASS (www.un4seen.com)
) of the open source of the one I found (http://aacpluscli.codeplex.com/). This modification allows piping to standard output (there maybe other modifications too).

So I started trying that version and it works fine through wine. So the following works.

Code: Select all
ffmpeg -i - -f wav - | wine /var/subsonic/transcode/enc_aacPlus.exe - - --mpeg4aac --rawpcm 44100 2 16 --silent


The '--raw pcm 44100 2 16' part is very important as without the enc_aacpPlus.exe decides that it can't understand what comes from ffmpeg. The '--silent' argument is important too else encoding information ends up in standard output and messes up the stream.

I've reuploaded the zip file with the relevant dlls,exes and a wrapper script for running on linux. It is available at http://www.su-root.eu/temp/aac_encoderwin32.zip

The wrapper script (aac_wrapper) I wrote passes a bitrate argument to the encoder. You can't do this in subsonic as %b is in kbit/s and the encoder use bit/s so the wrapper script does the conversion. Note on linux you may need to use winetricks to install the "MS Visual C++ 2008 libraries".

This only works with an external player. It works with VLC but I haven't tried any other external player.
delcypher
 
Posts: 109
Joined: Tue Jun 01, 2010 10:39 am

Postby Kirk » Mon Aug 30, 2010 1:44 am

I will give this a go, and report back my findings...
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Postby delcypher » Tue Aug 31, 2010 11:05 am

I've looked into this more and discovered that just like other transcoders enc_aacPlus.exe does NOT use a mp4 container if you output to standard input. I've analysed a file that was the result of piping to standard output and the container is identified by ffmpeg as raw AAC.

In fact enc_aacPlus.exe usage message even says it can't produce a mp4 container if you send to standard output.

Code: Select all
Input/Output:
   <inputfile>      : WAV input file (use - to read from STDIN)
                      (must be 8 or 16 bit PCM, 32000, 44100 or 48000 Hz)
   <outputfile>     : Bitstream output file (use - to write to STDOUT)
                      To write MPEG4 ISO compilant .mp4/.m4a:
                        libmp4v2.dll [from Winamp folder] must be in the same directory
                        (mp4/m4a not possible, if STDOUT is selected)


So my configuration is just writing raw AAC. VLC is good enough to just handle it.

ffmpeg & faac can both output raw AAC so these could be used instead of this complicated setup involving wine although neither can do HE-AAC v2
delcypher
 
Posts: 109
Joined: Tue Jun 01, 2010 10:39 am


Return to Help

Who is online

Users browsing this forum: No registered users and 13 guests