IntroductionThe YouTube Direct platform is designed to run on Google App Engine. App Engine allows you to run applications on top of Google's infrastructure. Follow this guide to deploy your own instance of YTD. But before you do that, you need to set up your environments for YTD: If you are upgrading from a previous release, please familiarize yourself with the latest release notes. Getting Started VideoIn addition to the material below, you might find the following video tutorial useful when getting started:
DetailsYouTube Direct Getting Started GuidePlease complete the setup steps listed in the Introduction above before proceeding. Sync your Eclipse project to the YTD codebaseIn your Eclipse window, select the File menu > New - In the sub menu, choose Other ...
- With the popup menu, choose SVN > "Checkout projects from SVN". Click the Next button.
- Click on "Create a new repository location". Click the Next button.
- Enter "http://youtube-direct.googlecode.com/svn/trunk/" as the URL.
- Click on the URL to highlight it. Click the Finish button.
Eclipse should now be downloading all the files from YTD repository in a project named "ytd". Build the YTD project in EclipseOnce the download is completed, Eclipse should automatically begin to build the deploy binary. While it is building the status bar on the bottom right should say "Building workspace". If you do not have automatic build enabled for Eclipse, you can go to Project > Build All. Deploy YTD on your local machineBefore deploying your YTD instance to App Engine, it's always a good idea to run it locally and test. The App Engine development server was automatically installed when you installed the Google Eclipse plugin in the previous step. - Make a copy of war/WEB-INF/appengine-web_DEFAULT.xml and name it war/WEB-INF/appengine-web.xml. Edit your local copy of the file to:
- Replace
<application> with your registered App Engine application ID. - Replace
<version> with 1, and increment it as you see fit. - Replace com.google.ytd.YTDeveloperKey property with your registered YT Developer Key
- Replace com.google.ytd.YTClientID the unique identifier string of your choice.
- Deploy YTD using the local development webserver environment that comes with the App Engine SDK. If using Eclipse with the GAE plugin, the default "Run" Eclipse action will do this. The webserver runs at http://localhost:8080/ .
- You can test the YTD instance by going to http://localhost:8080/admin. The data you entered in the local instance will not be deployed to production. Once you're satisfied with your testing, you can proceed to deploy your YTD instance to Google App Engine.
Deploy YTD to Google App EngineIf local deployment is successful, you can procede to deploy to Google App Engine. - Right click on the project "ytd". See the dropdown menu and select Google > Deploy to App Engine
- Enter the email and password for your Google App Engine account. Click on the Deploy button.
- Once deployment is done, you can access your production instance of YTD at http://APP_ID.appspot.com/admin.
Configuration of YTD AdminAfter deployment is completed. You must perform a few configuration before you can start creating assignment. - Go to the admin panel for YTD by visiting http://APP_ID.appspot.com/admin, where APP_ID is your registered App Engine instance name. You'll need to log in with a Google Account that is set up as an administrator for your App Engine instance.
- Go to the "Configuration" tab and make the desired configuration changes. Mouse over the ? icons for descriptions of each option.
- Make sure that the YouTube account you authenticate as is linked to the Google Account that owns your YouTube Developer Key.
Registering your website for AuthSubRegister your new YTD instance with Google's AuthSub. This will get rid of the red warning text box that appears when unregistered web sites us AuthSub. There is more information on AuthSub in this document. You can initiate the registration process at https://www.google.com/accounts/ManageDomains. - When asked for the Target URL path prefix: you should use http://APP_ID.appspot.com/ (where APP_ID is the name of your App Engine instance). Be sure that you use http:// and not https://
- If you enter an incorrect value for Target URL path prefix: then the AuthSub web interface will reject your requests for AuthSub tokens and will display an error message warning that a malicious web site might be requesting tokens on your behalf.
Creating new assignments & Embedding YTD Uploader to your page- In your YTD Admin panel, go to the "Assignments" tab and create a new assignment.
- Set the Assignment to the appropriate category (e.g "Entertainment"), set the status to "Active" to enable video submission and put a description to the assignment.
- Select the new assignment by highlighting it in the list and click the "Embed Code" button to show the JavaScript code to embed the YTD uploader on your page.
- Make sure that you modify the ytd-embed.js URL to point to the actual path to the file. By default, ytd-embed.js is hosted on your App Engine instance at http://APP_ID.appspot.com/ytd-embed.js.
- If your page has an existing window.onload handler, add the ytd.embed() JavaScript code to that instead of creating a new window.onload.
- Copy the embed code and paste it onto the page where you want the uploader to appear. Save and deploy your updated page. Now your site visitors can start submitting their videos. They have 2 options to do this, they can upload a new video, or submit an existing video that they already own.
Moderating submissionsOnce videos have been submitted through the uploader, you can go back the YouTube Direct admin panel to moderate the videos. - Visit the "Submissions" tab to view submitted videos and approve/reject them as desired. All newly submitted videos will have the UNREVIEWED statys. As an admin, you can preview the video and details, and once you're satisfied, you can change the status as "APPROVED".
- Approved videos will be automatically added to a playlist associated with each assignment (owned by your YouTube account), and depending on your configuration settings, will have their descriptions and tags updated to reflect your approval.
- Note that in the "Configuration" tab, you can specify an address to receive an email whenever a new video is submitted.
Embedding playlistsOnce you have approved videos to display, you can go back to Assignment tab to get the code to display the playlist. - Select the Assignment, and click on the "Playlist" button.
- Copy the code and paste it onto the page where you want to display the approved videos. Approved videos are automatically added to the playlist.
|
Is there a way to create a channel like this by just copying and pasting some code into a webpage??
Steve
Mmm. I'm actually really surprised that so far, Youtube does not have an embedded html code option, with submission management via an administration panel within a Youtube account. Watching the demo, it looks exactly like it should work that way. My only guess is that at this stage, Google wants to see where developers take this option, and how much server-crunching this might take before leaping into it.
This is so hard for my simple mind! Please make a Widget!
Sync your Eclipse project to the YTD codebase:
(Mac OSX 10.4.11)
When its time to hit finished I get a message:
"You appear to be checking out the root of your repository. Are you sure that this is what you want to do? If your repository contains any branches or tags all of them will be check out." Yes No??
1) If I chose yes and get a small popup box with a red exclamation mark and and "OK" to hit, which when I hit sends me back to the finish button choice (endless loop).
2) If I chose no, it closes the the whole window leaving just Eclipse up.
Long story short, "Eclipse should now be downloading all the files from YTD repository in a project named "ytd" ISN'T HAPPENING AND THERE IS NO YTD PROJECT. WHAT TO DO?
I get stuck at: "Deploy YTD on your local machine" How do you do that??
Platform YTD in java is so great. But I don't know how to make it in Python. Please help us to make a platform YTD in Python ...
Trunk would not work for me both locally it had runtime errors and during appengine upload. I picked up the releases/2.0 and all was well
I can not sync the project to my codebase.. I get errors that say "Unable to load default SVN Client" "Cannot map the project with svn provider" and "An exception stack trace is not available." I have the same problem as CelebrateGreece? and when I run the app engine launcher, I am not authorized to access the application. ugh, lol..
Two things:
- When you are installing the subclipse plugin, also select the (required) Subversion Client Adapter and the JavaHLNative Library Adapter components. This will fix the "Unable to load default SVN Client" error message.
- When you sync your Eclipse project to the YTD codebase use http://youtube-direct.googlecode.com/svn/trunk/ytd/ note the extra /ytd/ in the URL.
This is the most confusing and difficult process. Please make it more simple for us less advanced users!!
Damn!
I am getting a lot of errors in the markers section I am sure I should not be. First I get the following errors:
after right clicking the missing appengine-web.xml and quickfixing to create a new one I get the following errors added on:
I installed the java_ee_sdk from sun's website. I thought that might fix the JDK error.
Please help. Thank you for anything you can provide me with.
Sorry I did not mean to post the large pictures like that. did not know they would be embedded.
I have figured out the problems I was having. I am now having a problem authenticating with youtube. Or any google app for that matter. I registered and verified (http://APP_ID.appspot.com/) at https://www.google.com/accounts/ManageDomains
however when I click authenticate under the youtube api settings then click accept on the youtube site I get the following error:
{{{Uncaught exception from servlet java.lang.ExceptionInInitializerError?
Caused by: java.security.AccessControlException?: access denied (java.net.NetPermission? getCookieHandler)Unexpected exception from servlet: java.lang.ExceptionInInitializerError?}}}
I am stuck again and could use some help if anyone has a chance please.
Really trudging through this..
I was finally able to get youtube to authenticate. The problem I was having was that the quickfix in eclipse on the appengine-web.xml file was missing tons of values in the original file.
Anyways the next problem I am having is that after embedding the code on my site and clicking login I am receiving this error:
"The page you have requested cannot be displayed. Another site was requesting access to your Google Account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error."
This apparently means that I assigned the wrong domain name to googles api. I think? but where? Where can I change the domain? or is it something different entirely?
I have no idea why they've made such a pigs ear over this. Surely a iframe with a developer id would do the job!
I'm stuck at this step "Registering your website for AuthSub?". Try to register my web site, even try to upload RSA certificate but still youtube users still get the alert message after they log in youtube to use my YouTube? Direct uploader. Anyone has this problem and find solution for it?
Hum this looks way to complicated for me buy I would like to pay some one to assist me info@goldnotes.com
very nice work. after a lot of work hours, we can implement this step by step we can. thank u google
Hum this looks way to complicated for me buy I would like to pay some one to assist me educatube.br@gmail.com
Got everything working. I think this will really work well for a video contest site we are running. Is there any way to delete a video from the submissions instead of just rejecting it?
I finally got the site registered for AuthSub?. I find out need to register http://my_APP_ID.appspot.com site, not the site where I put youtube direct script on.
Now uses will get this message after they log in youtube:
This website is registered with Google to make authorization requests, but has not been configured to send requests securely
So my next step is to figure out how to set up secured request.
I'm at the exact same spot I think. After the user clicks agree they are able to upload correct?
I believe it has to do with the x.508 certificate but the tutorial on how to generate one is not very user friendly at first glace..
I'm at SYNCING ECLIPSE PROJECT TO YTD CODEBASE.
I put "http://youtube-direct.googlecode.com/svn/trunk/" in and click Finish, but it says "error validating location..."
help?
Does anyone have a YTD up and running yet? Thanks
I have one up and running you can see it here:
www.colorectal-cancer.ca/psa/
It is for a video contest site. Click submit.
There is still an warning when logging into youtube about security but it all works.
When I go to Versions I do not get the option to bind it to a domain. And I have a Google Apps domain. Do I need to do this entire process with my Google Apps email and not with my GMail account (that is associated with my YouTube? account)?
Also how am I supposed to verify the domain to get rid of the AuthSub? red box if I cannot upload a HTML file or change a META tag?
Got the domain CNAME to work. Not in the same spot as the screencast. Still not sure how to verify the domain though.
Nevermind I fixed it.
Like someone else (Celebrate Greece and AlexInChinatown?) i had this problem:
Sync your Eclipse project to the YTD codebase:
(Mac OSX 10.6.2)
When its time to hit finished I get a message:
"You appear to be checking out the root of your repository. Are you sure that this is what you want to do? If your repository contains any branches or tags all of them will be check out." Yes No??
1) If I chose yes and get a small popup box with a red exclamation mark and and "OK" to hit, which when I hit sends me back to the finish button choice (endless loop).
2) If I chose no, it closes the the whole window leaving just Eclipse up.
Long story short, "Eclipse should now be downloading all the files from YTD repository in a project named "ytd" ISN'T HAPPENING AND THERE IS NO YTD PROJECT. WHAT TO DO? Please can someone help me?
When I go to my admin page I get the following error: "Error: Forbidden Your client does not have permission to get URL /admin from this server."
What do you think is wrong?
The message above appears after I login to the account that I have authenticated for use with YTD.
i checked out 'Trunk' and it has a bad .CP ( missing entry for datanucleus-appengine-1.0.4.1.final.jar )
at runtime , im getting errors below but the class is in the web-inf/lib jar mentioned above . What happened to containers' just using ALL the jars in web-inf/lib?
--- ERROR: WARNING: Error for /admin/GetAllSubmissions? java.lang.NoClassDefFoundError?: Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?
... WARNING: Error for /admin/GetAdminConfig? java.lang.NoClassDefFoundError?: Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?
--- examine jar contents ....
\ytd\war\WEB-INF\lib\datanucleus-appengine-1.0.4.1.final.jar\\org\datanucleus\store\appengine\query\DatastoreQuery?.class
jar is there and jar is in proper place. However the CP needs to be modified.
I have set up the google app engine, and have come across a couple of problems:
1. My google app engine account is registered against my email address, which also happens to be the account for our main youtube channel. I validated the ytd instance on app engine against this, but I assume this means that uploaded video (when approved) will go into that account. It would be better to have a separate youtube account for the uploads; can you let me know how to set this up?
2. I tried setting up authsub as per the instructions on this page. This requires authentication of the site URL (the appspot one), which means either adding an HTML file, or adding a meta tag. Not sure how to do this through app engine (I assume it is simple)!
Very grateful for any pointers on this!
Ave.
OK - as is the way with these things, I have answered my own question!
you should now be able to log into the embedded uploader without seeing the annoying red banner!
Hi,
another problem! I have got the uploader working OK, but am having problems with the admin interface; specifically with the mp4 doownload link for the submitted videos. This links through to a URL something like https://itndirect.appspot.com/admin/VideoDownloadRedirect?id=GjIJaqP-2Lo&username=itn which says "Error: This functionality is not implemented". Any ideas?
I resolved an issue that droves me insane.. I'll share if you guys have a same problem...
The issue was that when running the application in http://localhost:8080/admin it displays an error --Cannot run program "javac.exe"--, so if you experiment the same error you probably should set the PATH variable.
1- Click Start > Control Panel > System on Windows XP or Start > Settings > Control Panel > System 2- Click Advanced > Environment Variables. 3- Add the location of bin folder of JDK installation for PATH in User Variables and System Variables. A typical value for PATH is: C:\Program Files\Java\jdk1.6.0<version>\bin
For step #3 where do you see that verification code? I dont see it anywhere. I don't think I am getting the red banner you are talking about anyhow just the allow access warning..
The new branch ( #265 ) from 1/4/10 works for me where the older 2.0 release would not ..
From the SVN repository view, i went to "branches 265" and then under that to the folder "2.0 265" and checked that out to a project.
From there , i followed the video instructions and was able to run the app on localhost and to create a new assignment in the admin/config . Then, after the assignment was created, i got the embed JS from the admin/assignment tab and copied that JS into ./index.html.
I visited index.html and cliked on the submit, then logged into my Youtube account to satisfy the OAuth 'access' dialog. From there , i got the URL to the Youtube video from the links in the native , youtube, 'myvideos' list. Using the Url to the video, i imported an existing youtube video to the assignment. When i went back to the 'submissions' tab in YTD, the new video appearred in the adming panel.
Frustrator.. after switching back to the Java EE tab and fixing the appengine-web.xml file... The entire admin folder is broken and the embed.jsp file... restarted the setup and had the same errors.. under my markers, it shows "Your web application must be configured to use jdk to use jsp" ... anyone? lagunatre@gmail.com
Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?
Does anyone know how to resolve this? I see a previous comment, but it is quite cryptic and doesn't give an answer.
Need help with the error message below. After I select the allow access for authentication from the localhost configuration tab.. I get
HTTP ERROR: 500
Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?
RequestURI=/admin/PersistAuthSubToken? Caused by:
java.lang.NoClassDefFoundError?: Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?
Powered by Jetty://
robstein
How do you fix this problem? "The page you have requested cannot be displayed. Another site was requesting access to your Google Account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error."
If you have problems with datanucleus try an older version http://youtube-direct.googlecode.com/svn/tags/20091113/ or another version in (http://youtube-direct.googlecode.com/svn/tags) instead of http://youtube-direct.googlecode.com/svn/trunk/
i can recreate the NoClassdeffound? error by checking out the TRUNK "ytd 250" and running it on localhost...
Jan 7, 2010 6:18:44 PM com.google.apphosting.utils.jetty.JettyLogger? warn WARNING: Error for /admin/GetAllAssignments? java.lang.NoClassDefFoundError?: Could not initialize class org.datanucleus.store.appengine.query.DatastoreQuery?
try checking out the following:
branches 269
A head's-up to folks: we're going to be disabling comments on Wiki pages, as we never intended it as a means for providing YouTube? Direct support.
What we'd ask is that if you have any general questions or comments about YouTube? Direct, you post them in the YouTube? API Google Group: http://groups.google.com/group/youtube-api-gdata
If you have a specific bug report or feature request, feel free to add it to the project's Issue Tracker at http://code.google.com/p/youtube-direct/issues/list