Results 1 to 10 of 10

Thread: WDTV: Transcoding AAC 6-chan to AC3 6 chan

  1. #1
    Join Date
    Mar 2010
    Posts
    146

    Default WDTV: Transcoding AAC 6-chan to AC3 6 chan

    Unlike my PS3, my WDTV can only handle AC3 when it comes to 5.1 audio. I have a few DVDs that I had ripped in H264 with AAC 5.1 audio. Can you tell me what I should put into my WDTV profile to have it transcode any AAC with more than 2 channels into AC3 (but keeping AAC 2 channels as it is)? That way the WDTV would pass the audio to my receiver, for proper 5.1 surround.

    Thanks!

  2. #2
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    11,642

    Default

    Is it for Matroska, QT or MPEG-TS containers?

    Mezzmo Android: Install it on your tablet, smartphone, Android TV or Amazon Fire to browse and stream files from your Mezzmo library to all your devices. Full details at http://www.conceiva.com/products/mez...mo_android.asp
    Mezzmo for Kodi Add-on: Install it into Kodi to stream files from your Mezzmo library directly in Kodi. Full details at http://www.mezzmo.com/wiki/doku.php?...odi_user_guide
    Mezzmo for Roku App: Install it onto your Roku to stream files from your Mezzmo library. Full details at http://www.mezzmo.com/wiki/doku.php?...oku_user_guide
    Wiki: User Guides & Reference Manual at http://www.mezzmo.com/wiki
    Facebook: http://www.facebook.com/Mezzmo.DLNA.Server
    Twitter: https://twitter.com/conceiva_mezzmo
    Web: http://www.mezzmo.com

  3. #3
    Join Date
    Mar 2010
    Posts
    146

    Default

    I used mp4 for my container. Here's a sample:

    Code:
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'f:\Video\Movies\Science Fiction\Star Trek\StarTrek.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 1
        compatible_brands: isomavc1
      Duration: 02:06:49.13, start: 0.000000, bitrate: 1191 kb/s
        Stream #0.0(und): Video: h264, yuv420p, 720x480 [PAR 32:27 DAR 16:9], 999 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
        Stream #0.1(und): Audio: aac, 48000 Hz, 5.1, s16, 188 kb/s

  4. #4
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    11,642

    Default

    Try something like this (it's untested though, so I don't know if it'll work or not):

    Code:
            <avcontainer id="mov,mp4,m4a,3gp,3g2,mj2" name="qt" format="mp4" encode="1" mimetype="video/m4v">
    				<video>
    						<format id="h264" encode="1" codec="libx264" preferredtranscoded="1">
    								<copyts>1</copyts>
    								<samequality>1</samequality>
    								<bitrate>25000000</bitrate>
    						</format>
    				</video>
    				<audio>
    						<format id="ac3" encode="1" codec="ac3" preferredtranscoded="1">
    								<channels>2</channels>
    								<channels>6</channels>
    								<bitrate>448000</bitrate>
    								<maxbitrate>448000</maxbitrate>
    								<minbitrate>64000</minbitrate>
    								<samplingrate>48000</samplingrate>
    						</format>
    				</audio>
    				<audio>
    						<format id="aac" encode="0" codec="aac">
    							<channels>2</channels>
    						</format>
    				</audio>
    				<ffmpegadditional>-threads 4 -coder 1 -flags +loop -cmp +chroma -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 3 -refs 2 -directpred 1 -trellis 1 -flags2 +bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp 2</ffmpegadditional>
            </avcontainer>
    Please let me know if it works or not. If it works, I think it'll be a good addition to the device profile for everyone to use. If it fails in transcoding, can you please post the transcoding log so that I could fix the issue? Thanks!

    Mezzmo Android: Install it on your tablet, smartphone, Android TV or Amazon Fire to browse and stream files from your Mezzmo library to all your devices. Full details at http://www.conceiva.com/products/mez...mo_android.asp
    Mezzmo for Kodi Add-on: Install it into Kodi to stream files from your Mezzmo library directly in Kodi. Full details at http://www.mezzmo.com/wiki/doku.php?...odi_user_guide
    Mezzmo for Roku App: Install it onto your Roku to stream files from your Mezzmo library. Full details at http://www.mezzmo.com/wiki/doku.php?...oku_user_guide
    Wiki: User Guides & Reference Manual at http://www.mezzmo.com/wiki
    Facebook: http://www.facebook.com/Mezzmo.DLNA.Server
    Twitter: https://twitter.com/conceiva_mezzmo
    Web: http://www.mezzmo.com

  5. #5
    Join Date
    Mar 2010
    Posts
    146

    Default

    Hi Dennis,

    I had to take out the following block for transcoding to occur:

    Code:
            <avcontainer id="mov,mp4,m4a,3gp,3g2,mj2" name="qt" encode="0" mimetype="video/m4v">
            	<video>
            		<format id="h264" encode="0">
            		</format>
            	</video>
                    <audio>
                            <format id="aac" encode="0" codec="aac">
                            </format>
                    </audio>
            </avcontainer>
    After that, the file was properly being transcoded. However for some reason the WDTV was still only playing two channels. Same thing happened when I took the transcoded file and tried to play it back locally using KMPlayer on my desktop - only two channels were played. I did some research, and turns out AC3 isn't officially supported in an mp4 container.

    I manually transcoded a test sample in an mpegts container instead of an mp4 container (using the same settings Mezzmo was using when transcoding), and then it properly played in 5.1 on my desktop, as well as on my WDTV (5.1 audio was properly passed to my receiver, and decoded to my surround speakers).

    Is it possible to adjust the profile so it will also convert that mp4 container into an mpegts container? So the end result would be:

    Input: H264, AAC 5.1, MP4
    Output H264, AC3 5.1, MPEG-TS

    (or if you can think of a better choice for a container, that would work too

    I also prepared a sample H264/AAC 6 channels file in case you wanted to test it yourself:

    http://www.lostrealm.ca/temp/Sample-h264-aac.mp4

    Keep me informed.
    Last edited by RMerlin; 07-30-2010 at 07:28 AM.

  6. #6
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    11,642

    Default

    Hi,

    Yes, sorry I didn't mention it, but it was meant to replace that container.

    Ok, to transcode to MPEG-TS with h264/AC3 you'll need the following container (replace the current mpegts container):

    Code:
            <avcontainer id="mpegts" name="mpegts" encode="1" format="mpegts" mimetype="video/mpeg">
                    <video>
                            <format id="h264" encode="1" codec="libx264" preferredtranscoded="1">
                                    <copyts>1</copyts>
                                    <samequality>1</samequality>
                                    <bitrate>25000000</bitrate>
                            </format>
                    </video>
                    <video>
                            <format id="mpeg2video" encode="0">
                            </format>
                    </video>
                    <audio>
                            <format id="mp2" encode="0">
                            </format>
                    </audio>
                    <audio>
                            <format id="s16be" encode="0">
                            </format>
                    </audio>
                    <audio>
                            <format id="ac3" encode="1" codec="ac3" preferredtranscoded="1">
                                    <channels>2</channels>
                                    <channels>6</channels>
                                    <bitrate>448000</bitrate>
                                    <maxbitrate>448000</maxbitrate>
                                    <minbitrate>64000</minbitrate>
                                    <samplingrate>48000</samplingrate>
                            </format>
                    </audio>
                    <audio>
                    	<format id="aac" encode="0">
                    	</format>
                    </audio>
                    <ffmpegadditional>-threads 4 -copyinkf -sc_threshold 1000000000 -vbsf h264_mp4toannexb</ffmpegadditional>
            </avcontainer>
    and also probably change the mp4 one to:

    Code:
            <avcontainer id="mov,mp4,m4a,3gp,3g2,mj2" name="qt" encode="0" mimetype="video/m4v">
    				<video>
    						<format id="h264" encode="0">
    						</format>
    				</video>
    				<audio>
    						<format id="ac3" encode="0">
    							<channels>2</channels>
    						</format>
    				</audio>
    				<audio>
    						<format id="aac" encode="0" codec="aac">
    							<channels>2</channels>
    						</format>
    				</audio>
            </avcontainer>
    Let me know if that achieves the result you're looking for If not, I'll grab your file and try it here.

    Mezzmo Android: Install it on your tablet, smartphone, Android TV or Amazon Fire to browse and stream files from your Mezzmo library to all your devices. Full details at http://www.conceiva.com/products/mez...mo_android.asp
    Mezzmo for Kodi Add-on: Install it into Kodi to stream files from your Mezzmo library directly in Kodi. Full details at http://www.mezzmo.com/wiki/doku.php?...odi_user_guide
    Mezzmo for Roku App: Install it onto your Roku to stream files from your Mezzmo library. Full details at http://www.mezzmo.com/wiki/doku.php?...oku_user_guide
    Wiki: User Guides & Reference Manual at http://www.mezzmo.com/wiki
    Facebook: http://www.facebook.com/Mezzmo.DLNA.Server
    Twitter: https://twitter.com/conceiva_mezzmo
    Web: http://www.mezzmo.com

  7. #7
    Join Date
    Mar 2010
    Posts
    146

    Default

    Worked perfectly (I applied the two changes you last recommended) An mp4 with AAC 5.1 was correctly transcoded to AC3 5.1 and played in surround on my system, and another mp4 with AAC 2.0 was streamed without being transcoded, just as expected. I think this is worth adding to the next WDTV profile. Thanks!

  8. #8
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    11,642

    Default

    Great! Thanks for letting me know. I'll add this to the WD TV Live profile for the next Mezzmo update.

    Mezzmo Android: Install it on your tablet, smartphone, Android TV or Amazon Fire to browse and stream files from your Mezzmo library to all your devices. Full details at http://www.conceiva.com/products/mez...mo_android.asp
    Mezzmo for Kodi Add-on: Install it into Kodi to stream files from your Mezzmo library directly in Kodi. Full details at http://www.mezzmo.com/wiki/doku.php?...odi_user_guide
    Mezzmo for Roku App: Install it onto your Roku to stream files from your Mezzmo library. Full details at http://www.mezzmo.com/wiki/doku.php?...oku_user_guide
    Wiki: User Guides & Reference Manual at http://www.mezzmo.com/wiki
    Facebook: http://www.facebook.com/Mezzmo.DLNA.Server
    Twitter: https://twitter.com/conceiva_mezzmo
    Web: http://www.mezzmo.com

  9. #9
    Join Date
    Aug 2010
    Posts
    1

    Default Is this possible in FAT+

    Quote Originally Posted by Dennis View Post
    Great! Thanks for letting me know. I'll add this to the WD TV Live profile for the next Mezzmo update.
    Hi, I chanced upon this thread while searching for the exact problem with FAT+.
    I have both MP4 and MKV, but my receiver cannot accept AAC. I tried various method to convert AAC to AC3, but haven't quite figured out how to correct the channel mix-up. And the task itself is quite laborious.

    The solution exchanged in here looks perfect, is there a way for it to work in Free Agent Theatre+ ?

    Thanks.

  10. #10
    Join Date
    Mar 2010
    Posts
    146

    Default

    As long that device can passthrough the AC3 audio to your receiver (not all of them do), it should work, yes. Which device profile do you use?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •