There probably is an error in the way that my code is negotiating
tokens with YouTube. It will take some digging. If you are up to it
and figure things out, please let me know so that I can patch the
software.
Dave
On Dec 28 2010, 11:21 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
A token issue ?
I was rather suspecting a video format issue, but I may be wrong...
Actually, what I wanted to do was to replace the play code by some
simple download code, to check that the get_video returns a correct
video ( and try the file on my computer ).
Then, if the file is ok, try to open the downloaded file in the
videoView ( to check if it can be a streaming issue ).
I'm not sure I will have time for this...
And I'm not sure what to do if I get more info...
> There probably is an error in the way that my code is negotiating
> tokens with YouTube. It will take some digging. If you are up to it
> and figure things out, please let me know so that I can patch the
> software.
> Dave
> On Dec 28 2010, 11:21 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> > Hi,
> > Do you have a example of a working video ?
> > It's not working for me.
> > All the process is ok until I give the URI to the video View.
> > Then it gives me this error :
> > 12-29 06:13:42.612: ERROR/PlayerDriver(33): Command PLAYER_INIT
> > completed with an error or info PVMFFailure
> > 12-29 06:13:42.612: ERROR/MediaPlayer(961): error (1, -1)
> > 12-29 06:13:42.652: ERROR/MediaPlayer(961): Error (1,-1)
So i did it, and replace the video view with some simple download
code, and I have a filenotfound exception.
I tried to remove the urlencode on the token, but it didn't change
anything...
> There probably is an error in the way that my code is negotiating
> tokens with YouTube. It will take some digging. If you are up to it
> and figure things out, please let me know so that I can patch the
> software.
> Dave
> On Dec 28 2010, 11:21 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> > Hi,
> > Do you have a example of a working video ?
> > It's not working for me.
> > All the process is ok until I give the URI to the video View.
> > Then it gives me this error :
> > 12-29 06:13:42.612: ERROR/PlayerDriver(33): Command PLAYER_INIT
> > completed with an error or info PVMFFailure
> > 12-29 06:13:42.612: ERROR/MediaPlayer(961): error (1, -1)
> > 12-29 06:13:42.652: ERROR/MediaPlayer(961): Error (1,-1)
I was testing this out as well and could not get it to work. It
failed with the same error code mentioned by Alocaly. Could this have
something to do with the switch of media playback from opencore to
StageFright in Android 2.2? I also would like to help address this
issue. I'm not quite sure what the root cause of it is. Has it been
confirmed to be a youtube token issue? Thanks again for providing
this source, this will be very helpful in my application.
On Jan 1, 9:38 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> So i did it, and replace the video view with some simple download
> code, and I have a filenotfound exception.
> I tried to remove the urlencode on the token, but it didn't change
> anything...
> On Jan 1, 7:03 am, keyeslabs <keyes...@gmail.com> wrote:
> > There probably is an error in the way that my code is negotiating
> > tokens with YouTube. It will take some digging. If you are up to it
> > and figure things out, please let me know so that I can patch the
> > software.
> > Dave
> > On Dec 28 2010, 11:21 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> > > Hi,
> > > Do you have a example of a working video ?
> > > It's not working for me.
> > > All the process is ok until I give the URI to the video View.
> > > Then it gives me this error :
> > > 12-29 06:13:42.612: ERROR/PlayerDriver(33): Command PLAYER_INIT
> > > completed with an error or info PVMFFailure
> > > 12-29 06:13:42.612: ERROR/MediaPlayer(961): error (1, -1)
> > > 12-29 06:13:42.652: ERROR/MediaPlayer(961): Error (1,-1)
I haven't taken the time to look into this at all, so I'm only going
to be guessing here.
I believe that this is a change in the way that YouTube creates and
delivers tokens. You'll notice that the URLs used for contacting
YouTube and also the code for parsing out the token are all part of
the component. If I were to debug this, I would step through each of
those processes and see which part is failing. Likely one of the
calls to YouTube is returning some kind of 4xx or 5xx HTTP error code.
In finding a workaround, I would turn to one of the many PHP, Perl or
other embeddable alternate YouTube players that are available on the
Internet. This is where I found direction on how to obtain tokens,
construct video format URLs etc.
If you are interested in becoming a contributor on the project, just
let me know so that I can add you and you can start updating code in
the repository.
Dave
On Jan 24, 5:25 pm, Nadewad <naderja...@gmail.com> wrote:
> I was testing this out as well and could not get it to work. It
> failed with the same error code mentioned by Alocaly. Could this have
> something to do with the switch of media playback from opencore to
> StageFright in Android 2.2? I also would like to help address this
> issue. I'm not quite sure what the root cause of it is. Has it been
> confirmed to be a youtube token issue? Thanks again for providing
> this source, this will be very helpful in my application.
> On Jan 1, 9:38 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> > So i did it, and replace the video view with some simple download
> > code, and I have a filenotfound exception.
> > I tried to remove the urlencode on the token, but it didn't change
> > anything...
> > On Jan 1, 7:03 am, keyeslabs <keyes...@gmail.com> wrote:
> > > There probably is an error in the way that my code is negotiating
> > > tokens with YouTube. It will take some digging. If you are up to it
> > > and figure things out, please let me know so that I can patch the
> > > software.
> > > Dave
> > > On Dec 28 2010, 11:21 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> > > > Hi,
> > > > Do you have a example of a working video ?
> > > > It's not working for me.
> > > > All the process is ok until I give the URI to the video View.
> > > > Then it gives me this error :
> > > > 12-29 06:13:42.612: ERROR/PlayerDriver(33): Command PLAYER_INIT
> > > > completed with an error or info PVMFFailure
> > > > 12-29 06:13:42.612: ERROR/MediaPlayer(961): error (1, -1)
> > > > 12-29 06:13:42.652: ERROR/MediaPlayer(961): Error (1,-1)
So I've been trying to debug this a little bit and here's what I have
come up with so far:
It appears that the url generated and stored in the lUriStr has a
malformed Youtube URL. I tried copying and pasting this URL into my
browser and it failed to resolve the youtube video. Instead I
replaced the following line:
Notice the difference in the url from "get_video?video_id=" to "watch?
v=".
After making this change I received the following error:
01-30 00:47:02.407: ERROR/PlayerDriver(19701): Command PLAYER_INIT
completed with an error or info PVMFErrCorrupt
01-30 00:47:02.407: ERROR/MediaPlayer(4470): error (1, -10)
This seems to get further in the YouTube streaming process.
Unfortunately I do not know enough about playing streamed media from
an Android device nor the YouTube APIs. Keyes, I understand that you
are busy but with using this little tidbit help in debugging this
issue? Thanks again for providing this source.
On Jan 27, 10:53 am, keyeslabs <keyes...@gmail.com> wrote:
> I haven't taken the time to look into this at all, so I'm only going
> to be guessing here.
> I believe that this is a change in the way that YouTube creates and
> delivers tokens. You'll notice that the URLs used for contacting
> YouTube and also the code for parsing out the token are all part of
> the component. If I were to debug this, I would step through each of
> those processes and see which part is failing. Likely one of the
> calls to YouTube is returning some kind of 4xx or 5xx HTTP error code.
> In finding a workaround, I would turn to one of the many PHP, Perl or
> other embeddable alternate YouTube players that are available on the
> Internet. This is where I found direction on how to obtain tokens,
> construct video format URLs etc.
> If you are interested in becoming a contributor on the project, just
> let me know so that I can add you and you can start updating code in
> the repository.
> Dave
> On Jan 24, 5:25 pm, Nadewad <naderja...@gmail.com> wrote:
> > I was testing this out as well and could not get it to work. It
> > failed with the same error code mentioned by Alocaly. Could this have
> > something to do with the switch of media playback from opencore to
> > StageFright in Android 2.2? I also would like to help address this
> > issue. I'm not quite sure what the root cause of it is. Has it been
> > confirmed to be a youtube token issue? Thanks again for providing
> > this source, this will be very helpful in my application.
> > On Jan 1, 9:38 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> > > So i did it, and replace the video view with some simple download
> > > code, and I have a filenotfound exception.
> > > I tried to remove the urlencode on the token, but it didn't change
> > > anything...
> > > On Jan 1, 7:03 am, keyeslabs <keyes...@gmail.com> wrote:
> > > > There probably is an error in the way that my code is negotiating
> > > > tokens with YouTube. It will take some digging. If you are up to it
> > > > and figure things out, please let me know so that I can patch the
> > > > software.
> > > > Dave
> > > > On Dec 28 2010, 11:21 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> > > > > Hi,
> > > > > Do you have a example of a working video ?
> > > > > It's not working for me.
> > > > > All the process is ok until I give the URI to the video View.
> > > > > Then it gives me this error :
Ok so I've been trying my hand at this a bit more and I think the
actual token parsing is correct. I looked at the get_video info file
and it parses out the token correctly as far as I know. My question
is that is the token supposed to include an equals sign at the end?
The only thing I noticed was that when I looked at the raw get_video
file, the token had included the equals sign encoded in url encoding.
When the token was parsed out however, it was decoded into the equals
sign.
The only other thing I can think of is that the url, "http://
www.youtube.com/get_video?" is deprecated as far as I know. I tried
navigating to the url parsed together from the calculateYouTubeURL
funciton in the YouTubeUtility class using a desktop browser and it
doesn't seem to be a valid link. My guess is that YouTube had changed
the exact url for accessing the streams.
Dave if you could chime in and confirm or debunk any of my claims, I
would greatly appreciate it.
Thanks.
All the best,
Nader
On Jan 30, 12:50 am, Nadewad <naderja...@gmail.com> wrote:
> So I've been trying to debug this a little bit and here's what I have
> come up with so far:
> It appears that the url generated and stored in the lUriStr has a
> malformed Youtube URL. I tried copying and pasting this URL into my
> browser and it failed to resolve the youtube video. Instead I
> replaced the following line:
> Notice the difference in the url from "get_video?video_id=" to "watch?
> v=".
> After making this change I received the following error:
> 01-30 00:47:02.407: ERROR/PlayerDriver(19701): Command PLAYER_INIT
> completed with an error or info PVMFErrCorrupt
> 01-30 00:47:02.407: ERROR/MediaPlayer(4470): error (1, -10)
> This seems to get further in the YouTube streaming process.
> Unfortunately I do not know enough about playing streamed media from
> an Android device nor the YouTube APIs. Keyes, I understand that you
> are busy but with using this little tidbit help in debugging this
> issue? Thanks again for providing this source.
> On Jan 27, 10:53 am, keyeslabs <keyes...@gmail.com> wrote:
> > I haven't taken the time to look into this at all, so I'm only going
> > to be guessing here.
> > I believe that this is a change in the way that YouTube creates and
> > delivers tokens. You'll notice that the URLs used for contacting
> > YouTube and also the code for parsing out the token are all part of
> > the component. If I were to debug this, I would step through each of
> > those processes and see which part is failing. Likely one of the
> > calls to YouTube is returning some kind of 4xx or 5xx HTTP error code.
> > In finding a workaround, I would turn to one of the many PHP, Perl or
> > other embeddable alternate YouTube players that are available on the
> > Internet. This is where I found direction on how to obtain tokens,
> > construct video format URLs etc.
> > If you are interested in becoming a contributor on the project, just
> > let me know so that I can add you and you can start updating code in
> > the repository.
> > Dave
> > On Jan 24, 5:25 pm, Nadewad <naderja...@gmail.com> wrote:
> > > I was testing this out as well and could not get it to work. It
> > > failed with the same error code mentioned by Alocaly. Could this have
> > > something to do with the switch of media playback from opencore to
> > > StageFright in Android 2.2? I also would like to help address this
> > > issue. I'm not quite sure what the root cause of it is. Has it been
> > > confirmed to be a youtube token issue? Thanks again for providing
> > > this source, this will be very helpful in my application.
> > > On Jan 1, 9:38 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> > > > So i did it, and replace the video view with some simple download
> > > > code, and I have a filenotfound exception.
> > > > I tried to remove the urlencode on the token, but it didn't change
> > > > anything...
> > > > On Jan 1, 7:03 am, keyeslabs <keyes...@gmail.com> wrote:
> > > > > There probably is an error in the way that my code is negotiating
> > > > > tokens with YouTube. It will take some digging. If you are up to it
> > > > > and figure things out, please let me know so that I can patch the
> > > > > software.
> > > > > Dave
> > > > > On Dec 28 2010, 11:21 pm, Alocaly <emmanuel.ast...@gmail.com> wrote:
> > > > > > Hi,
> > > > > > Do you have a example of a working video ?
> > > > > > It's not working for me.
> > > > > > All the process is ok until I give the URI to the video View.
> > > > > > Then it gives me this error :
Has anyone made any progress getting this to work?
I've re-parsed the URLs to point at watch?v={videoID} but no joy as yet. Incidentally, i get two different types of error message depending on whether I'm running via emulator or hardware.