Create asset from existing file located on S3

16 views
Skip to first unread message

Anton

unread,
Jan 9, 2011, 1:44:03 PM1/9/11
to Sorenson Media Developer Group
I am trying to transcode a video which is currently located on my
client's S3 account. I am using the Sorenson API with PHP and cURL.
The problem I am facing is that after successfully logging in and
creating the source asset, the transcode job status eventually fails
because the source file could not be located.

My hunch tells me it has something to do with the source_s3_bucket and
source_s3_key parameters (perhaps the format?) I provide when creating
the source asset. Here are the parameters and their values that I'm
posting to the API:

- required parameters
source_file_name: "MVI.AVI"
display_name: 'MVI.AVI'
description: 'S3 Integration'
author_name: 'Anton'
- optional parameters
source_s3_bucket: 'triplew'
source_s3_key: 'uploads/MVI.AVI'
source_s3_username: <S3 username>
source_s3_password: <S3 password>

I'm passing the username and password even though the permissions for
the file are public-read. You can actually access the file at:
triplew.s3.amazonaws.com/uploads/MVI.AVI

Please note that I have successfully transcoded a video when the
external location was HTTP. Please help me do the same for S3

abruno

unread,
Jan 10, 2011, 5:31:06 PM1/10/11
to Sorenson Media Developer Group
Hi Anton:

Are you getting this error when trying to access the file?

"The request signature we calculated does not match the signature you
provided. Check your key and signing method."

Are those your actual s3 access and secret keys?

Thank you,
Ana

Anton

unread,
Jan 10, 2011, 5:59:02 PM1/10/11
to Sorenson Media Developer Group
Hi Ana,

Thanks for the reply.

Firstly, I've worked around this by accessing the file on the S3
server using the HTTP method instead of the S3 method and it worked
like a charm. If you'd like, you can respond to this for anyone else
that might want to actually use the S3 method.

To answer your questions.

No, I'm not getting the signature error. What's happening is this:
1. login: success (from Accounts class)
2. create source asset: success (from Assets class)
3. create transcode job: success (from Transcode Jobs class)
4. Then I proceed by requesting the transcode job status every 2
seconds. The status begins with Downloading, quickly goes to Waiting,
stays there for about a minute and then this cycle repeats another 2
times until I finally get an error message which is something along
the lines of 'Failed: could not locate source file'.

I am not passing my s3 access and secret keys because I thought
source_s3_username & source_s3_password referred to the username/
password pair I use to log into the S3 account through their website.
Does source_s3_username & source_s3_password refer to my s3 access and
secret keys respectively?

Thank you,
Anton

abruno

unread,
Jan 10, 2011, 6:31:41 PM1/10/11
to Sorenson Media Developer Group
Yes, username is "access key" and password is "secret key". Please try
again with this information.

Anton

unread,
Jan 10, 2011, 7:08:55 PM1/10/11
to Sorenson Media Developer Group
Tried with access key and secret key as username/password and failed
once again. I managed to copy the error message though: "The source
video file could not be downloaded".

abruno

unread,
Jan 11, 2011, 12:46:37 PM1/11/11
to Sorenson Media Developer Group
Hi Anton:

Can you log into your S3 account using S3Fox with those keys?

a.anton...@gmail.com

unread,
Jan 11, 2011, 12:52:51 PM1/11/11
to sorenson-med...@googlegroups.com
I haven't tried S3Fox, but I'm using the keys in an HTML form I've created that posts a file directly to the Amazon S3 bucket and they work.
Sent from my BlackBerry® wireless device
--
Check out Sorenson Media Developer docs, videos and articles at
http://developers.sorensonmedia.com

You received this message because you are subscribed to the Google
Groups "Sorenson Media Developers" group.
To post to this group, send email to
sorenson-med...@googlegroups.com
To unsubscribe from this group, send email to
sorenson-media-dev...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sorenson-media-developers?hl=en
Reply all
Reply to author
Forward
0 new messages