Professional Web Applications Themes

How to stream MP3s stored above the root - Coldfusion - Getting Started

My mp3s are kept above the root to protect them from unauthorized download. I am currently using cfcontent to dynamically retrieve the audio files from their location e.g. <cfcontent file='#expandPath(../..')#/audio/#track_title#.mp3' type='audio/x-mpeg'> However, I would really like to have the files stream as they download. This requires the use of a .m3u file (A text file which just lists the location of the mp3). This is where I run into problems. Since the .m3u file is used by the client computer?s audio application (WinMedia, iTunes, etc.) and therefore can?t deal with CF, I can no longer use the cfcontent tag to ...

Sponsored Links
  1. #1

    Default How to stream MP3s stored above the root

    My mp3s are kept above the root to protect them from unauthorized download. I
    am currently using cfcontent to dynamically retrieve the audio files from their
    location e.g. <cfcontent file='#expandPath(../..')#/audio/#track_title#.mp3'
    type='audio/x-mpeg'> However, I would really like to have the files stream as
    they download. This requires the use of a .m3u file (A text file which just
    lists the location of the mp3). This is where I run into problems. Since
    the .m3u file is used by the client computer?s audio application (WinMedia,
    iTunes, etc.) and therefore can?t deal with CF, I can no longer use the
    cfcontent tag to pull the audio file from its protected location. If the mp3s
    weren?t above the root, I could just point directly to them in .m3u Does
    anyone have a good way to protect MP3s from unauthorized download, yet still
    make the mp3s stream during an authorized download? Any suggestions would be
    very much appreciated!

    Sponsored Links
    Monizzle Guest

  2. #2

    Default Re: How to stream MP3s stored above the root

    I doubt this would work, but have you tried putting a dynamic URL in the M3U
    file? The URL would point to a script that would call CFCONENT based on the
    parameters passed to it, e.g.:

    #EXTM3U
    #EXTINF:111,My Track
    [url]http://www.myserver.com/stream.cfm?trackID=123[/url]

    Then the stream.cfm would get the MP3 file and output it with CFCONTENT. No
    idea if that will work, but worth a try I guess.

    Bryan


    blewis Guest

  3. #3

    Default Re: How to stream MP3s stored above the root

    Bryan,
    That was a good suggestion, but I tried that in iTunes and had no luck.
    Monizzle Guest

  4. #4

    Default Re: How to stream MP3s stored above the root

    I am interested in this as well, but more for streaming video. If anyone has a suggestion....fire away!
    schl_central Guest

  5. #5

    Default Re: How to stream MP3s stored above the root

    Does anyone wlese have some suggestions. I am looking to do this same project with mp3 files, but can not figure out how to get it to work.
    jeffromace Guest

Similar Threads

  1. FMS server record stream from stored FLV
    By B_Shack in forum Macromedia Flash Flashcom
    Replies: 2
    Last Post: September 26th, 11:24 AM
  2. ExpandPath evaluates to ColdFusion root instead ofvirtual web server root
    By _Tian_ in forum Coldfusion Server Administration
    Replies: 0
    Last Post: April 7th, 11:54 PM
  3. Web content root ?= CF application root?
    By cjeris in forum Coldfusion Server Administration
    Replies: 0
    Last Post: May 9th, 07:46 PM
  4. Doent root not website root
    By jpb in forum PHP Development
    Replies: 2
    Last Post: October 27th, 05:26 PM
  5. Streaming mp3s
    By Joshua Beall in forum PHP Development
    Replies: 4
    Last Post: September 22nd, 05:27 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139