Hi Mike,

How is the issue going?

In case you did not receive my previous email, I stated that the URL
obtained from the MediaContent all pointed to the same entry ID but
had different expire&signature tags. The only difference between a
working link and a broken link was in the tags following ID.

Here's what I mean by ID and expire&signature tags.

http://redirector.googlevideo.com/videoplayback?id=<ID omitted
here>&itag=18&source=picasa&cmo=sensitive_content
%3Dyes&ip=0.0.0.0&ipbits=0&expire=1346193601&sparams=id,itag,source,ip,ipbits,expire&signature=38351650A46CF31F8E3EF307BA95E0C932752806.532D3984A42C4A7BD8E903CF42E4B79DB23E1A92&key=lh1

The ID following videoplayback?id=<some ID> is the same as in the link
below. The only difference is when the link expires.

http://redirector.googlevideo.com/videoplayback?id=<ID omitted
here>&itag=18&source=picasa&cmo=sensitive_content
%3Dyes&ip=0.0.0.0&ipbits=0&expire=1346193715&sparams=id,itag,source,ip,ipbits,expire&signature=35FA4CA6CFFE5216AC0847CD69770F4F87226E88.242FF9505B04B81CBC1A77E6D1C62778FA6796CA&key=lh1

When you have the time, please let me know if there are any updates to
this issue.

Thanks

Rich


On Jul 28, 1:44 am, Michael Erickson <[email protected]> wrote:
> Out of curiosity, is it the same stream each time? As in, the URL is
> identical each time?
>
> I'm sorry to hear that this is failing, and that it is not consistently
> failing.
> -Mike
>
> -m.e.
>
> On Fri, Jul 27, 2012 at 12:06 PM, Richard.Leagh 
> <[email protected]>wrote:
>
>
>
>
>
>
>
> > The funny thing is, reading from the stream works on and off. Today,
> > using the same exact code I was able to successfully grab a video off
> > Picasa twice after hours of not being able to.
>
> > On Jul 27, 11:27 am, "Richard.Leagh" <[email protected]> wrote:
> > > I'm having an issue grabbing the video stream from the url supplied by
> > > MediaContent of a PhotoEntry. I've checked to make sure that the
> > > PhotoEntry itself is definitely a video, here's a snippet of my code:
>
> > > List<PhotoEntry> photos = ....
> > > for(PhotoEntry media : photos) {
> > > List<MediaContent> content = media.getMediaContents();
> > > if(content.size()>1) { //its a video, only a video has more than 1
> > > stream
> > > byte[] videoData = getData(new URL(content.get(2).getUrl()));
> > > //the URL points to a h264 encoded version
>
> > > }
> > > }
>
> > > public byte[] getData(URL datastream) {
> > > ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
> > > InputStream is = datastream.openStream();
>
> > > int c;
> > > try {
> > > while((c=is.read())!=-1) {
> > > outputStream.write(c);}
> > > } catch(Exception e) {
>
> > > e.printStackTrace();} finally {
>
> > > try {
> > > is.close();} catch(Exception f) {}
> > > }
>
> > > return outputStream.toByteArray(); }
>
> > > For some reason, the program is getting stuck in the While loop which
> > > I'm assuming could only be because the value of the InputStream is
> > > never -1. Am I just missing something simple here? Please let me know.
>
> > > Thanks.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Picasa Web Albums API" group.
> > To post to this group, send email to
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/google-picasa-data-api?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-picasa-data-api?hl=en.

Reply via email to