Code covered by the BSD License  

Highlights from
Upload a Video to YouTube™

5.0

5.0 | 2 ratings Rate this file 6 Downloads (last 30 days) File Size: 232.05 KB File ID: #19258
image thumbnail

Upload a Video to YouTube™

by Matthew Simoneau

 

18 Mar 2008 (Updated 04 Jan 2010)

Using the Youtube™ data API, upload a video directly from MATLAB®.

| Watch this File

File Information
Description

This MATLAB function will send a video directly to YouTube, along with the most important metadata.

INSTALLATION
1) Download and unzip the GData Java™ Client Library, available at http://code.google.com/p/gdata-java-client/

2) Add the full path to gdata-youtube-1.0.jar to your classpath.txt and restart. Just using JAVAADDPATH doesn't work.

MATLAB release MATLAB 7.6 (R2008a)
Other requirements * An account (username/password) on YouTube. * GData Java Client Library
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
19 Mar 2008 Urs (us) Schwarz

very spiffy, matthew! however, what's MUCH more interesting: the html was published using version 7.7(!) already - whilst the pedestrians just received 7.6...
us

20 Mar 2008 hUser aUser

Excellent! Glad to see this. I have tried myself to get a similar function working for uploading MATLAB pics to picasaweb using a similar api from google. But I did not have any luck.

21 Mar 2008 Matthew Simoneau

Urs, don't you know? I'm from the future!

07 Jul 2011 Thomas

This looks very useful (for us). However, the latest java is gdata-youtube-2.0.jar. I think this may be why I can't get this function to work. (I get a youtubeservice error).

24 Feb 2012 Nathan Orloff

Sheesh. This is a long error message. I am sorry about this. I tried making a new account but I am having trouble with the username and password. I don't understand why it isn't logging in. Do you have ideas why this might be happening? I have checked the username and password several times to verify that they are correct.
Error using
com.google.gdata.client.youtube.YouTubeService/setUserCredentials
Java exception occurred:
com.google.gdata.util.AuthenticationException: Error connecting with login
URI
at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:489)
at com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:346)
at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:362)
at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:317)
at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:301)
    
Caused by: java.io.IOException: The issuer can not be found in the trusted
CA list.
at ice.ssl.SSLSocket.processEvent(OEAB)
at ice.ssl.SSLSocket.certCallback(OEAB)
at ice.ssl.SSLSocket.append(OEAB)
at ice.ssl.SSLSocket.startHandshake(OEAB)
at ice.ssl.SSLSocket.IVSize(OEAB)
at ice.ssl.SSLSocket.getInputStream(OEAB)
at ice.net.ClientSocket.getInputStream(OEAB)
at ice.net.PersistentConnection.setSocket(OEAB)
at ice.net.ConnectionManager.getConnection(OEAB)
at ice.net.HttpURLConnection.connect(OEAB)
at ice.net.HttpURLConnection.getOutputStream(OEAB)
at com.google.gdata.client.GoogleAuthTokenFactory.makePostRequest(GoogleAuthTokenFactory.java:551)
at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:487)
... 4 more

26 Feb 2012 Nathan Orloff

The problem with this code is in the developerKey, clientid. I think these are expired so you need to register with google API to get your own. I modified the code to allow you to set the privacy settings, and also work for an arbitrary movie type instead just .avi. Send me an email if you want it.

Please login to add a comment or rating.
Updates
20 Mar 2008

Fix example.

07 Jan 2009

Update description.

04 Jan 2010

Remove JAR-files from ZIP. Add trademarks. Clarify installation.

Tag Activity for this File
Tag Applied By Date/Time
graphics export Matthew Simoneau 22 Oct 2008 09:54:11
upload Matthew Simoneau 22 Oct 2008 09:54:11
youtube Matthew Simoneau 22 Oct 2008 09:54:11
video Matthew Simoneau 22 Oct 2008 09:54:11
api Matthew Simoneau 22 Oct 2008 09:54:11
google api Matthew Simoneau 07 Jan 2009 13:33:36
gdata Matthew Simoneau 07 Jan 2009 13:33:38
youtube Linda 06 Apr 2009 12:35:23
video Linda 06 Apr 2009 12:35:25
google api Linda 06 Apr 2009 12:35:27

Contact us at files@mathworks.com