0

ac-3 output from expansion module



So far, we have been unable to get the ac-3 5.1 audio output from the expansion module optical port. We have a correctly multiplexed mpg file but not having luck with the spdif. In the initialize video parameters section, we have: videoPlayer.SetAudioOutput(1) videoPlayer.MapDigitalOutput(1) videoPlayer.MapAudioMode(0) We have also done the above with videoPlayer.MapAudioMode(0) remmed out. In short, what will we need to do to get the raw ac-3 5.1 stream out the expansion module optical port? Thanks in advance

4 comments

  • 0
    Avatar
    jcavala


    Sorry, I forgot to indicate we are using the 810 with latest firmware, project is video resolution 720 x 480
  • 0
    Avatar
    RokuLyndon


    You can get raw ac3 out, but the unit won't decode the ac3 for you.

    If you look at this thread on the expander:
    <!-- l --><a class="postlink-local" href="http://forums.roku.com/viewtopic.php?f=19&t=25245">viewtopic.php?f=19&t=25245</a><!-- l -->

    A. You should Set your audo output to 3. See list below.
    B. And, Map your digital output to 1. See second list below.


    SetAudioOutput(roInt audioout)
    In a playlist, this is the "audiooutput" keyword. In a csv file, this would be "videoplayeraudiooutput" or "audioplayeraudiooutput".
    The audio outputs are similar, though not identical to HD2000.
    0 - Analog. Output to onboard analog output or one of the 3 expander analog outputs.
    1 - USB. Output to USB audio, this is largely untested as yet.
    2 - Digital PCM. For playing decoded audio to either HDMI or expander SPDIF e.g. decoded MP3 files
    3 - Digital raw. For playing undecoded audio to either HDMI or expander SPDIF e.g. AC-3
    4 - Simultaneous onboard digital and onboard analog. I'm not aiming to do this for expander, only for onboard audio.




    MapDigitalOutput(roInt hdmi_or_spdif)
    This is new and isn't currently listed in csv files or playlists. But, this can be fixed easily.
    This picks which digital output is used from the 2 available:
    0 - HDMI
    1 - Expander SPDIF


  • 0
    Avatar
    jcavala


    Thanks -- I had uncovered that previous post, but had not quite fixed things. I used BrightAuthor to create the various files on the chip, then modified the Autorun.brs file to this:
       ' initialize video player parameters
       videoPlayer.SetPort(zone.msgPort)
       videoPlayer.SetViewMode(zone.viewMode%)
       videoPlayer.SetLoopMode(false)
       videoPlayer.SetAudioOutput(3)
       ' videoPlayer.SetAudioMode(zone.audioMode%)
       ' videoPlayer.MapStereoOutput(zone.audioMapping%)
       videoPlayer.MapDigitalOutput(1)
    Believe me it was a surprise when the audio appeared, but the spdif optical output is being decoded by a surround amp and working fine. My question now is what is the very simplest form of an autorun.brs file that can achieve the same results? I may wish only to loop an MPG file named "bal.mpg" on power up, or at most use a single gpio to start it. I think with a simple script like that as a "starter" I can find my way to more exotic controls.
    Thanks in advance.
    John
  • 0
    Avatar
    RokuLyndon


    Not sure what you're trying to do. This example below plays one video in a loop.


    p=createobject("roMessagePort")
    videoplayer = createobject("roVideoPlayer")
    videoplayer.SetPort(p)
    videoPlayer.SetAudioOutput(3)
    videoPlayer.MapDigitalOutput(1)


    loop:
    videoplayer.PlayFile("video.mpg")

    listen:
    if type(msg) = "roVideoEvent" then
    if msg.GetInt() = 8 then 'end of video
    goto loop
    endif
    endif
    goto listen
Please sign in to leave a comment.