Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Linux, Mac OS X, & Co

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th July 2005, 17:24   #1  |  Link
bugmenotwillyou
Guest
 
Posts: n/a
please, ac3 to aac & aac5.1 to spdif?

I read all the faq on doom and other forums but I still have no succesful results under Linux.

Hrere what I do:

AC3 5.1 to AAC 5.1
I do:

Rip the AC3
mplayer video.vob -dumpaudio -dumpfile audio.ac3

Covert the AC3 to 6 channel PCM
a52dec audio.ac3 -o wavdolby > audio6.wav

Covert PCM to AAC 5.1
faac -q 100 -I 5,6 -P -R 48000 -C 6 -X audio6.wav -o audio.aac

Play the aac
faad audio.aac -w | mplayer -

---> I got on SPDIF a stereo AAC that play 2 times faster?!
instead of AAC 5.1 to the normal speed <----

How do I solve this dilemma?

why mplayer doesn't read the aac directly? faad support is enabled
Code:
$ mplayer audio.aac -ao faad
MPlayer 1.0pre7-3.4.3-20050110 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon 4 /Athlon MP/XP Palomino (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
MMX2 supported but disabled
CPUflags:  MMX: 1 MMX2: 0 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compilato per CPU x86 con estensioni: MMX 3DNow 3DNowEx SSE



85 audio & 196 video codecs
In riproduzione audio.aac
Cache fill: 10.57% (886293 bytes)

In uscita... (Fine del file)

Any advice is welcome!

Last edited by bugmenotwillyou; 28th July 2005 at 17:29.
  Reply With Quote
Old 28th July 2005, 17:48   #2  |  Link
GraDy
Registered User
 
Join Date: Jul 2005
Posts: 24
What are you pluging in the spdif to? Most receivers (well, all) do not support 5.1 AAC. I don't know if there's a program that converts AAC to AC3 on the fly in Linux.
GraDy is offline   Reply With Quote
Old 28th July 2005, 18:26   #3  |  Link
bugmenotwillyou
Guest
 
Posts: n/a
Thanks for the reply
I have a Creative audigy2 and a Kenwood KRF-V5580D as receiver.. AC3 6ch works on it.
It supports dolby digital, dolby pro logic II and DTS
Is AAC written on when it is supported?

Last edited by bugmenotwillyou; 28th July 2005 at 18:31.
  Reply With Quote
Old 28th July 2005, 19:17   #4  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
If
Code:
mplayer file.aac
doesn't work, this probably indicates that the FAAD support in mplayer isn't working. Is it a self compiled mplayer or a distribution binary? Also, the commandline switch should be -ac (audio codec) not -ao (audio output).

Mplayer will not pass raw AAC over SPDIF (only a few receivers support this anyway, as previously mentioned). AFAIK mplayer will only play AC3 or DTS raw over S/PDIF, using the -ac hwac3 or -ac hwdts switch.

Mplayer might not be the best choice for audio-only playback. I recommend XMMS or amaroK as audio players, both of which have AAC plugins readily available.
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ
KpeX is offline   Reply With Quote
Old 28th July 2005, 19:12   #5  |  Link
GraDy
Registered User
 
Join Date: Jul 2005
Posts: 24
Since AAC-support is pretty unusual, it would probably be advertised. I don't know if there even is such a thing as a aac capable AV reciever.
Your options are:
1) try to find a program that converts AAC to AC3 on the fly for Linux (not sure it exists)
2) use AC3
3) or connect your soundcard to your receiver with analog cables. You'll need a 3 3,5mm to 6 RCA cable (or 3 1 3,5 mm to 2 RCA cable) Should be availible in a RadioShack near you
GraDy is offline   Reply With Quote
Old 28th July 2005, 19:56   #6  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,452
Quote:
Originally Posted by GraDy
Since AAC-support is pretty unusual, it would probably be advertised. I don't know if there even is such a thing as a aac capable AV reciever.
Sony's TA-E9000ES had an on-board AAC decoder... but I think that was about it

A real shame...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 28th July 2005, 20:05   #7  |  Link
bugmenotwillyou
Guest
 
Posts: n/a
I don't care so much that my receiver doesn't support AAC natively; probably processing a 5.1 matroska file will waste some cpu loop to convert AAC in AC3, but the important thing is to use AAC 5.1 over SPDIF
  Reply With Quote
Old 28th July 2005, 20:10   #8  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,452
FFdshow has an option to transcode 6Ch AAC-LC/HE to 6Ch AC3 "on-the-fly" for passing via S/P-DIF.... But I've only ever tested it using WinXP.


Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 28th July 2005, 19:55   #9  |  Link
bugmenotwillyou
Guest
 
Posts: n/a
@GraDy
I found http://essej.net/ac3jack/, realtime Ac3 encoder but i have no idea how to pass an aac file (or better an aac in a matroska file) through it.

3).. I don't want analog cables

@KpeX
$ mplayer -ac help | grep faad
MMX2 supported but disabled
faad faad working FAAD AAC (MPEG2/MPEG4 Audio) decoder [libfaad2]
I compiled it with all the codec i need, -ac hwac3 works with ac3, but aac files aren't read by mplayer (I tried a lot of options),..

This is the last:
Code:
$ faad audio.aac -w | mplayer - -ac hwac3
 *********** Ahead Software MPEG-4 AAC Decoder V2.0      ******************

 Build: Jun 11 2005
 Copyright 2002-2004: Ahead Software AG
 http://www.audiocoding.com
 Floating point version

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

 **************************************************************************

audio.aac file info:
ADTS, 18.027 sec, 393 kbps, 48000 Hz

  ---------------------
 | Config:  5.1 Ch     | WARNING: channels are reordered according to
  ---------------------  MS defaults defined in WAVE_FORMAT_EXTENSIBLE
 | Ch |    Position    |
  ---------------------
 | 00 | Center front   |
 | 01 | Left front     |
 | 02 | Right front    |
 | 03 | Left back      |
 | 04 | Right back     |
 | 05 | LFE            |
  ---------------------

MPlayer 1.0pre7-3.4.3-20050110 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon 4 /Athlon MP/XP Palomino (Family: 6, Stepping : 2)
Detected cache-line size is 64 bytes
MMX2 supported but disabled
CPUflags:  MMX: 1 MMX2: 0 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compilato per CPU x86 con estensioni: MMX 3DNow 3DNowEx SSE



85 audio & 196 video codecs
In riproduzione -
Leggo da stdin...
Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/win32/avisynth.dll, /us r/local/lib/win32/avisynth.dll
Rilevato file audio!
==========================================================================
Codec audio forzato: hwac3
Impossibile trovare il codec per il formato audio 0xFFFE!
Leggi DOCS/it/codecs.html!
==========================================================================
Audio: nessun suono!!!
Video: no video!!!


In uscita... (Fine del file)
I tried to send aac -> pcm -> hwac3 and I got a 2channel 2 times faster(?!) audio.
Probably the correct pipe to send is aac -> pcm -> ac3 -> hwac3 it seems a bit long but I have no other ideas.

I hope to solve it with ac3jack but It is giving me some compilation problems and I didn't understand where to put the PCM/wav file in ac3jack?!

Last edited by bugmenotwillyou; 28th July 2005 at 19:59.
  Reply With Quote
Old 30th July 2005, 01:22   #10  |  Link
Joe Fenton
Registered User
 
Join Date: Jul 2003
Location: In a house.
Posts: 663
When using mplayer from the cli, add "-ao alsa9:spdif" to the command to get S/PDIF output. You can also go into mplayer's preferences and change the audio output. Right click the mplayer window, select Preferences, and click on the Audio tab. You then see a choice of a bunch of output drivers. Select one and click Configure Driver. For example, select OSS and click Configure Driver. Click the Device popup and select /dev/dsp_ac3 for S/PDIF output. Or you could select ALSA and click Configure Driver. Click the Device popup and select iec958 for S/PDIF output. If these devices aren't listed, they haven't been setup correctly yet (normally).
Joe Fenton is offline   Reply With Quote
Old 1st August 2005, 11:04   #11  |  Link
bugmenotwillyou
Guest
 
Posts: n/a
With -ao alsa9:spdif I got:
Quote:
Checking audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
AF_pre: 48000Hz/2ch/s16le
audio_out: alsa9 and alsa1x modules were removed, use -ao alsa instead.
and with -ao alsa:spdif
Quote:
...
Rilevato formato file Matroska!
==========================================================================
Apertura decoder audio: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 48000 Hz, 6 ch, 16 bit (0x10), ratio: 16000->576000 (128,0 kbit)
Selected audio codec: [faad] afm:faad (FAAD AAC (MPEG2/MPEG4 Audio) decoder)
==========================================================================
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
vo_xvmc: X-Video extension 2.2
vo_xvmc: No X-Video MotionCompensation Extension on :0.0
==========================================================================
Apertura decoder video: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 48000Hz/6ch/16bit -> 48000Hz/2ch/16bit...
AF_pre: af format: 2 bps, 6 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 6ch Signed 16-bit (Little-Endian)

-ao alsa commandline help:
Example: mplayer -ao alsa:mmap:device=hw#0.3
sets mmap-mode and first card fourth device

Options:
mmap
Set memory-mapped mode, experimental
noblock
Sets non-blocking mode
device=<device-name>
Sets device (change , to . and : to #)
Impossibile aprire/inizializzare il dispositivo audio -> NESSUN SUONO
Audio: nessun suono!!!
Inizio la riproduzione...
VDec: configurazione richiesta dal vo - 640 x 272 (csp preferito: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect \uffff 2,36:1 - riscalo per ottenere un rapporto corretto.
VO: [xv] 640x272 => 642x272 Planar YV12
V: 6,0 150 4% 7% 0,0% 0 0 98%
In uscita... (Uscita)
I don't have any /dev/dsp_AC3
  Reply With Quote
Old 1st August 2005, 14:53   #12  |  Link
bugmenotwillyou
Guest
 
Posts: n/a
I play with success an ac3 5.1 file with
Quote:
mplayer <file> -ac hwac3
but I have no idea how to play a AAC 5.1 file with mplayer
  Reply With Quote
Old 2nd August 2005, 00:14   #13  |  Link
Joe Fenton
Registered User
 
Join Date: Jul 2003
Location: In a house.
Posts: 663
If you have ALSA installed, it provides a backwards compatible OSS that doesn't have /dev/dsp_ac3. It's "real" OSS that has /dev/dsp_ac3.

I'd suggest going through the mplayer mail list archives for info on this. It might already have been discussed there.
Joe Fenton is offline   Reply With Quote
Old 3rd August 2005, 06:23   #14  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
Just to be clear:

1. If your alsa mixer settings are correct, the only CLI / config switch you should need is -ao alsa.

2. Mplayer will not (as it shouldn't) allow you to pass undecoded AAC over spdif. Mplayer will decode all audio except for AC3 or DTS with the appropriate -hwac3 or -hwdts switch.

3. To play aac over spdif it must be decoded and downmixed to 2 channels (spdif only supports 2 channel pcm).

4. AFAIK, There is no way using mplayer or any linux player to transcode to AC3 and pass over spdif on the fly. It might be possible with gstreamer, but it would be difficult at best.
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ
KpeX is offline   Reply With Quote
Old 3rd August 2005, 10:30   #15  |  Link
bugmenotwillyou
Guest
 
Posts: n/a
Quote:
Originally Posted by KpeX
Just to be clear:
1. If your alsa mixer settings are correct, the only CLI / config switch you should need is -ao alsa.
I already can play files with -ao alsa, but only in 2ch mode

Quote:
2. Mplayer will not (as it shouldn't) allow you to pass undecoded AAC over spdif. Mplayer will decode all audio except for AC3 or DTS with the appropriate -hwac3 or -hwdts switch.
I can pass undecoded AAC to my receiver and i listen just noise

Quote:
3. To play aac over spdif it must be decoded and downmixed to 2 channels (spdif only supports 2 channel pcm).
Why? My soundcard Audigy2 supports raw AC3, pc -> ac3 ->receiver works, I'd like to do:

pc -> AAC -> ac3 ->receiver

Quote:
4. AFAIK, There is no way using mplayer or any linux player to transcode to AC3 and pass over spdif on the fly. It might be possible with gstreamer, but it would be difficult at best.
Thank you for your clearness, I found http://essej.net/ac3jack/ but I don't know how to use this tool for what I'd like to do
  Reply With Quote
Old 2nd April 2007, 19:30   #16  |  Link
grigio
Registered User
 
Join Date: Mar 2007
Posts: 4
http://forum.doom9.org/showthread.ph...300#post424070
Quote:
12. Is it possible to pass AAC over S/PDIF?

It is possible, although it has not yet been fully implemented. Only a few hardware devices currently support AAC decoding, and no DirectShow filter has yet been implemented with AAC pass-through ability. However, this is definitely a possibility for the future. Read more about S/PDIF and AAC hardware support here and here.

However, until AAC over SPDIF becomes more viable, there are several DirectShow filters that can be used to encode six channel AAC to AC3 over S/PDIF on the fly. Dolby Out DS filter by Haaan , as well as 1.x versions of AC3Filter can be used for this purpose. Although this reencoding on the fly process will theoretically result in a quality loss, using the full 640 kb/s bitrate allowed will result in an excellent listening experience and minimal quality loss.
Is there something like Directshow or AC3Filter for linux?
grigio is offline   Reply With Quote
Old 2nd April 2007, 21:14   #17  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Yes. GStreamer is like DirectShow. I don't know how well the current ac3 encoding filters work with it, but there should be an encoder in the gst-ffmpeg plugin. Constructing a filter graph that uses it might be tricky though. Ac3jack is worth trying too.
nm is offline   Reply With Quote
Old 2nd April 2007, 23:55   #18  |  Link
grigio
Registered User
 
Join Date: Mar 2007
Posts: 4
I have a video with audio AAC-5.1 in demo.mp4, could you suggest me a real world usage?

I see that libjack is already in my system (dependecy of gstreamer-plugins-bad)
grigio is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.