View Full Version : Problem launching a SteamResource
koopa_troopas
05-18-2011, 03:23 AM
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.
koopa_troopas
05-20-2011, 03:03 AM
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???
wmcbrine
05-20-2011, 03:25 PM
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.
koopa_troopas
05-23-2011, 01:32 AM
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
wmcbrine
05-23-2011, 02:49 AM
"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.
koopa_troopas
06-01-2011, 06:49 AM
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.
wmcbrine
06-01-2011, 01:38 PM
Yeah, the simulator is kinda buggy.
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.