Help. Config to Transcode FLAC to PCM

Stephen
2010-01-25
2013-05-30
  • Stephen
    Stephen
    2010-01-25

    I have been trying a variety of configurations to accomplish the subject, but nothing works and I am just floundering.

    I can't find a working configuration for file for this.

    I can get the the PS3 to recognize the files, but the data is not understood. The current attempt that I am posting shows the directories but not the files.

    Can someone get me going in the right direction?

    I think the key sections that I have are:

      <transcoding enabled="yes">
        <mimetype-profile-mappings>
          <transcode mimetype="video/x-flv" using="vlcmpeg"/>
          <transcode mimetype="application/ogg" using="oggflac2raw"/>
          <transcode mimetype="audio/x-flac" using="2pcm"/>
          <transcode mimetype="application/flac" using="2pcm"/>
        </mimetype-profile-mappings>
        <profiles>
          <profile name="oggflac2raw" enabled="no" type="external">
            <mimetype>audio/L16</mimetype>
            <accept-url>no</accept-url>
            <first-resource>yes</first-resource>
            <accept-ogg-theora>no</accept-ogg-theora>
            <agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
            <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
          </profile>
          <profile name="vlcmpeg" enabled="no" type="external">
            <mimetype>video/mpeg</mimetype>
            <accept-url>yes</accept-url>
            <first-resource>yes</first-resource>
            <accept-ogg-theora>yes</accept-ogg-theora>
            <agent command="vlc" arguments="-I dummy %in -sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
            <buffer size="14400000" chunk-size="512000" fill-size="120000"/>
          </profile>
          <profile name="oggflac2raw" enabled="no" type="external">
            <mimetype>audio/L16</mimetype>
            <accept-url>no</accept-url>
            <first-resource>yes</first-resource>
            <accept-ogg-theora>no</accept-ogg-theora>
            <agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
            <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
          </profile>
          <profile name="2pcm" enabled="yes" type="external" >
            <mimetype>audio/L16</mimetype>
            <first-resource>yes</first-resource>
            <accept-url>yes</accept-url>
            <sample-frequency>44100</sample-frequency>
            <audio-channels>2</audio-channels>
            <hide-original-resource>yes</hide-original-resource>
            <agent command="/usr/bin/ffmpeg" arguments="-i %in -ac 2 -ar 44100 -y -f s16be %out"/>
            <buffer size="1048576" chunk-size="4096" fill-size="1024"/>
          </profile>
        </profiles>
      </transcoding>

     
  • Jin
    Jin
    2010-01-25

    There may be a problem (depending on your ffmpeg version), where ffmpeg is not able to write to a FIFO correctly (you can test that using the method described in the transcoding documentation).

    So what I would do is - try to use a wrapper script around ffmpeg:

    exec /usr/bin/ffmpeg -i "$1" -ac 2 -ar 44100 -y -f s16be - >  "$2"
    

    Make sure it's executable (+x) and is located in $PATH, call this script from your config.xml i.e.:

    <agent command="yourffmpegscript.sh" arguments="%in %out"/>
    

    Does that help?

     
  • Stephen
    Stephen
    2010-01-30

    Thank you.

    I downloaded the latest ffmpeg and compiled and all is well! :)

    If anyone wants the latest ffmpeg for Ubuntu/Debian I recommend this link:

    http://ubuntuforums.org/showthread.php?t=786095