Setting parameters for auto-encode

Subscribe to Setting parameters for auto-encode 5 posts, 2 voices

 
Avatar eaccent 4 posts

hi, guys. I have one question about auto-encode. First let me describe briefly what I want to accomplish:

I have an app that accept user upload, convert the video, and save it in s3. So I use heywatch api. First I transfer the video to heywatch in an upload form. And then having another action(I’m using rails) invoke the Job api to convert the video, adding a logo and upload it to s3, finally notice my server. Everything works good. Now I suddenly figured out that heywatch can auto-encode the uploaded file(Sorry, I didn’t see the doc very well). So my question is whether I can set encoding parameters when uploading the video, so that the auto-encode process can pick up those parameters and use those while encoding the video. Thanks

Snow

 
Avatar eaccent 4 posts

Will Discover api do the magic?

 
Avatar eaccent 4 posts

Ok, after some digging around the forum and api, I now figure out that I can do that directly in the upload form, cool. However, there is still one thing I want to do: I assign s3_directive in the upload form, but I want to name the encoded video the same as filename returned by encode video callback xml. So I am expecting something like this: s3_directive: ‘s3://key:secret@mybucket/videos/some_hash/filename’ How can can do that? What should I set in s3_directive to let it use my customized name + encoded filename to form my s3 file name? Thanks

 
Avatar Bruno Celeste 374 posts

You shouldn’t put the s3_directive in the upload form for obvious security reason. You should stick with your first solution:

  • Upload the file to HeyWatch via the upload form
  • Receive the ping after transfer
  • Create the job with the parameter s3_directive with custom name

There is no easy solution to give the same filename like that. You have two choices:

  • You set the filename at the upload form via the parameter “title”, so the encoded video will have the same filename
  • At the job request, generate the filename randomly
 
Avatar eaccent 4 posts

Hi, Bruno. It is clear, thanks for the response.