Problem launching a SteamResource

Discussion in 'Developers Corner' started by koopa_troopas, May 18, 2011.

  1. koopa_troopas

    koopa_troopas New Member

    10
    0
    May 18, 2011
    Hi, I'm getting this problem:

    172.25.12.166 I/O Exception handling HTTP GET prueba.mp3: Connection reset by peer: socket write error

    when I try to execute a mp3 I have stored in the package root. The piece of code I try tu execute is one taken from the tivo programming book, this one:

    StreamResource mp3;
    String furl = getApp().getContext().getBaseURI().toString();
    try {
    furl += URLEncoder.encode("prueba.mp3", "UTF-8");
    } catch (UnsupportedEncodingException e) {
    }
    mp3 = createStream(furl, null, true);
    mp3.play();


    Does anyone knows how could I reproduce this audio?? thank you.
     
  2. koopa_troopas

    koopa_troopas New Member

    10
    0
    May 18, 2011
    Well, finally I've found out that the problem only occurs when I try to run mpeg2 layer III files. When I use mpeg1 layer III files, I have no problem at all.
    Does that mean that I can't reproduce any mpeg2 audio files??

    Does anyone know how could I hadle them???
     
  3. wmcbrine

    wmcbrine Well-Known Mumbler

    11,656
    786
    Aug 2, 2003
    MPEG-1, Layer 3 is what we commonly know as "MP3". Where are you getting these other files?

    AFAIK, MP3 is the only kind of bare audio stream the TiVo will handle, although it will play other types of audio (AC3, AAC, MP2) as part of video/audio streams.
     
  4. koopa_troopas

    koopa_troopas New Member

    10
    0
    May 18, 2011
    I may look like an idiot now, but how can I exactly play those other types??
    "video/audio" is not a valid content type for the createStream method, isn't it?

    Should I use another method? I'm sorry, I'm a little lost here.

    By the way, my final goal is to program an audio podcast application, and some audios I get from some podcast are in that format :S
     
  5. wmcbrine

    wmcbrine Well-Known Mumbler

    11,656
    786
    Aug 2, 2003
    "video/audio" was not meant to be a MIME type. I was just saying "video files with audio tracks", or as they're colloquially known, "video files". That's what I get for trying to be exact. :)

    Your best bet is simply to transcode the files to standard MP3.

    I still find it odd that these files are supposedly in a format that nobody else uses. I have to wonder if that's really the issue.
     
  6. koopa_troopas

    koopa_troopas New Member

    10
    0
    May 18, 2011
    I used mpgtx in order to obtain the info. They're mpeg2 layer III for sure.

    Anyway, the problem must be with the simulator, because when I try running the code on tivo, it runs perfectly.

    Sorry if I've brought confusion, I'm a newbie in all this tivo programming stuff.
     
  7. wmcbrine

    wmcbrine Well-Known Mumbler

    11,656
    786
    Aug 2, 2003
    Yeah, the simulator is kinda buggy.
     

Share This Page