Many AV-receivers cannot decode AAC streams when AAC passthrough is supported. This means that it's not possible to hear multichannel AAC.
To improve this situation I've created simple aactranscode gstreamer plugin which transcodes AAC to AC3 and passes it to dvbaudiosink.
There is no dowmixing so you've all channels in AC3 as in AAC, however price is degraded quality, since AAC and AC3 are both lossy codecs
How it works:
- aactranscode is sink bin which consist's of connected aac decoder, audioconvert, audioresample, ac3encoder and dvbaudiosink elements.
- aactranscode accepts only AAC caps, which means that it's selected only for AAC audio, however rank of aactranscode is lower then dvbaudiosink, so dvbaudiosink has to also not add AAC caps for aactranscode to be selected
- dvbaudiosink knows when to not include AAC caps by reading /etc/gstreamer/aactranscode file, if it contains ac3 or eac3 then AAC caps are not added
- aactranscode knows what kind of transcoding to use by reading /etc/gstreamer/aactranscode file, if it contains eac3 then AAC to E-AC3 transcoding is used else it's AAC to AC3
Dependencies: gstreamer1.0, gstreamer1.0-libav, (it's not possible to use gstreamer-0.10 since it's missing ac3 encoding element)
Installation:
1. 0001-added-aactranscode-plugin.patch is for gst-1.0 branch of gst-plugin-dvbmediasink
2. 0001-added-AAC-transcoding-support-to-AC3-EAC3.patch is for master branch of openpli-enigma2
3. update your machine config in openpli-oe-core:
This is mine for vusolose:
diff --git a/conf/machine/include/vuxxo2.inc b/conf/machine/include/vuxxo2.inc index 6004c5a..c1efa1a 100644 --- a/conf/machine/include/vuxxo2.inc +++ b/conf/machine/include/vuxxo2.inc @@ -10,7 +10,8 @@ KERNEL_MODULE_AUTOLOAD += "xfs" MACHINE_EXTRA_RRECOMMENDS = " \ vuplus-shutdown \ - gst-plugin-dvbmediasink \ + gstreamer1.0-libav \ + gstreamer1.0-plugin-dvbmediasink \ ntfs-3g \ " @@ -24,7 +25,8 @@ EXTRA_IMAGEDEPENDS += "\ TARGET_ARCH = "mipsel" DEFAULTTUNE = "mips32el" -DVBMEDIASINK_CONFIG = "--with-wmv --with-pcm --with-eac3" +GST_VERSION = "1.0" +DVBMEDIASINK_CONFIG = "--with-wmv --with-pcm --with-eac3 --with-aactranscode" PREFERRED_VERSION_linux-${MACHINE} = "3.13.5"
4. update gstreamer1.0-plugin-dvbmediasink recipe or use bbappend with added line
diff --git a/meta-openpli/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink.bb b/meta-openpli/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink.bb index 57d7b35..b2b2e83 100644 --- a/meta-openpli/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink.bb +++ b/meta-openpli/recipes-multimedia/gstreamer/gstreamer1.0-plugin-dvbmediasink.bb @@ -21,6 +21,7 @@ PKGV = "${GSTVERSION}+git${GITPKGV}" inherit autotools pkgconfig FILES_${PN} = "${libdir}/gstreamer-${GSTVERSION}/*.so*" +FILES_${PN} += "${sysconfdir}/gstreamer/aactranscode" FILES_${PN}-dev += "${libdir}/gstreamer-${GSTVERSION}/*.la" FILES_${PN}-staticdev += "${libdir}/gstreamer-${GSTVERSION}/*.a" FILES_${PN}-dbg += "${libdir}/gstreamer-${GSTVERSION}/.debug"
Now you can build your image.
By default is AAC transcoding turned off. You can turn it on by setting Setup/System/AV settings/AAC transcode to AC3/E-AC3. In case you don't use patch for enigma2 you can turn on AAC transcoding like this:
echo -n "ac3" > /etc/gstreamer/aactranscode
For now I tested it on vusolosev2 connected via HDMI to AV receiver, cpu usage is around 10%, works good. On et4x00 it's 97% and sound was choppy, so you need fast receiver.
Attached Files
Edited by mx3L, 15 August 2015 - 21:47.