After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 583394 - Import from YouTube
Import from YouTube
Status: RESOLVED WONTFIX
Product: pitivi
Classification: Other
Component: Media library
Git
Other Linux
: Normal enhancement
: 0.91
Assigned To: Pitivi maintainers
Pitivi maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-21 00:53 UTC by Jean-François Fortin Tam
Modified: 2013-09-10 03:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
very first youtube importer version. (15.65 KB, patch)
2010-11-15 04:41 UTC, Mathieu Duponchelle
none Details | Review
new importer, lacks speed and remaining time (16.81 KB, patch)
2010-11-15 15:40 UTC, Mathieu Duponchelle
none Details | Review
speed and time implemented, duration appended to tooltip, & bug fixed (17.99 KB, patch)
2010-11-16 02:54 UTC, Mathieu Duponchelle
none Details | Review
Used queues instead of threads to make queries. (9.02 KB, patch)
2010-11-22 01:56 UTC, Mathieu Duponchelle
rejected Details | Review

Description Jean-François Fortin Tam 2009-05-21 00:53:38 UTC
Someone sent me this feature suggestion by mail:
"Hook into the totem youtube plugin (if possible), download the youtube videos, transcode them to something a bit more editable, and then put them right in the editor."
Comment 1 Edward Hervey 2009-05-21 06:22:45 UTC
... or just use the libgdata API directly (GData is the underlying youtube API).

This will definitely have to be a plugin... because the Youtube TOS seem a bit shady to me.
Comment 2 Edward Hervey 2010-05-18 06:54:17 UTC
No need to hook into the totem youtube plugin, one can just use the gdata library directly (http://live.gnome.org/libgdata).

This could also *somewhat* be related to the proxy support (since the video you download is a proxy of the online resource).
Comment 3 Edward Hervey 2010-05-18 06:54:45 UTC
and a facepalm to me for not reading the comment I put just before. I apparently need more coffee.
Comment 4 Brian Grohe 2010-06-23 01:29:09 UTC
Is libgdata the same as the the library that google supplies on its website, if not which one do you prefer?
Comment 5 Edward Hervey 2010-06-23 07:02:25 UTC
Which part of comment #2 isn't clear enough ? No, it's not the google provided one.
Comment 6 Brian Grohe 2010-06-23 12:28:15 UTC
I just wanted to know, because the one from google has more documentation on how to use it. Also, I am still learning how to program, so stuff obvious to you may not be obvious to me.
Comment 7 Edward Hervey 2010-06-23 13:23:05 UTC
It should have documentation when built/installed. Try seeing if you have it in devhelp. Maybe you're distro as it available as libgdata-docs or sth like that.
Comment 8 Edward Hervey 2010-11-08 14:42:50 UTC
Using the google python bindings would be acceptable also.
Comment 9 Mathieu Duponchelle 2010-11-15 04:41:58 UTC
Created attachment 174488 [details] [review]
very first youtube importer version.
Comment 10 Mathieu Duponchelle 2010-11-15 15:40:35 UTC
Created attachment 174517 [details] [review]
new importer, lacks speed and remaining time
Comment 11 Jean-François Fortin Tam 2010-11-15 17:50:39 UTC
> ImportError: No module named gdata.youtube

It should probably not fatally die if someone doesn't have python-gdata installed (and we should add that to our dependencies I guess :)

For the "remaining time", have a look at the rendering dialog, it has some method to beautify it.
Comment 12 Mathieu Duponchelle 2010-11-16 02:54:53 UTC
Created attachment 174582 [details] [review]
speed and time implemented, duration appended to tooltip, & bug fixed
Comment 13 Jean-François Fortin Tam 2010-11-16 04:02:25 UTC
Latest iteration of the patch seems broken, I get the following: Le pipeline a refusé de se mettre en mode pause (PAUSED).

Also, is it possible to have some sort of progressbar or progress indication while searching?
Comment 14 Mathieu Duponchelle 2010-11-16 13:11:24 UTC
(In reply to comment #13)
> Latest iteration of the patch seems broken, I get the following: Le pipeline a
> refusé de se mettre en mode pause (PAUSED).
> 
> Also, is it possible to have some sort of progressbar or progress indication
> while searching?

I cant get to the same error that you do, Thiblahute had the exact same because, does it seem, of jhbuild.
It works on my master.
I suppose I could calculate the progress with the number of thumbnails retrieved.
I'll see
Comment 15 Mathieu Duponchelle 2010-11-16 22:25:16 UTC
Does the importer have to be a plugin or a core function ?
Comment 16 Mathieu Duponchelle 2010-11-16 22:26:41 UTC
(In reply to comment #15)
> Does the importer have to be a plugin or a core function ?

Didnt see the comment 1 sorry. But then is the plugin system for pitivi functionnal ?
Comment 17 Jean-François Fortin Tam 2010-11-19 19:25:44 UTC
> I cant get to the same error that you do,
> Thiblahute had the exact same because, does it seem, of jhbuild.

I'm not using jhbuild at the moment. Stock gstreamer packages from Ubuntu 10.10.


> is the plugin system for pitivi functionnal ?

I'm wondering about that too. 


In the meantime, could you push your branch somewhere so I can attempt fixing UI details on it?
Comment 18 Mathieu Duponchelle 2010-11-22 01:56:23 UTC
Created attachment 175001 [details] [review]
Used queues instead of threads to make queries.
Comment 19 Jean-François Fortin Tam 2010-11-23 04:31:38 UTC
https://github.com/nekohayo/pitivi/commits/youtube-importer fixes some minor details/polish based on Mathieu69's branch.


Here are some comments/requests that require more invasive changes:


1) Kill the 1st step and have only the 2nd step (search bar and empty icon view); when the user types a youtube URL instead of search terms, then simply show the video in the icon view as if it was a search result.

2) Don't maximize windows, automagically figure out the proper size instead

3) Add a Download button at step #2 (now step #1) instead of expecting users to double-click (they still can if they want)

4) Cancelling when in the file chooser dialog (last step) should not close everything; it should go back to the previous step instead. 

5) Replace the "Select a page..." combobox widget by a hbox with labels and a spinbox widget, like this:    "Page [1] of 4"
Comment 20 Jarek Wilkiewicz 2010-11-27 06:38:44 UTC
Hi all,
I work for YouTube and would like to chime in on this thread.
Currently YouTube's terms of service prohibit downloading the videos from the site, http://code.google.com/apis/youtube/terms.html, the videos must be played using the player. Only the content owner can download his/her videos, via the YouTube.com site (the API does not support downloading at this time). 
Can you please let me know what problem you're trying to solve and perhaps we'll be able to find a ToS-compliant solution ? 
Thanks,
Jarek
Comment 21 Mathieu Duponchelle 2010-11-27 18:24:57 UTC
(In reply to comment #20)
> Hi all,
> I work for YouTube and would like to chime in on this thread.
> Currently YouTube's terms of service prohibit downloading the videos from the
> site, http://code.google.com/apis/youtube/terms.html, the videos must be played
> using the player. Only the content owner can download his/her videos, via the
> YouTube.com site (the API does not support downloading at this time). 
> Can you please let me know what problem you're trying to solve and perhaps
> we'll be able to find a ToS-compliant solution ? 
> Thanks,
> Jarek

Hi Mr Wilkiewicz. 

We thought about that feature as promising. The general purpose of this patch would be to allow users to do something they can already do, but in one only user-friendly step : download a clip from youtube and start editing it on the spot. We did not aim copyrighted stuff or what, the only purpose of this is to have some sort of gigantic clip source always available to meke video mashups.
Example (on public request) : Someone makes a movie where he wants at a moment to express his eruptive feelings :
Import from youtube => volcano => edit.

The purpose is really not to infringe copyright laws, but to put open sources in open sorce project. Is youtube ready to make an exception to its TOS and help us ?

I think people would accept to have a "sponsored by youtube" in the search function.

Regards, waiting for your answer,

Mathieu Duponchelle.

P.S. : Will you hire me ? ;)
Comment 22 Mathieu Duponchelle 2010-11-27 18:40:34 UTC
(In reply to comment #20)
> Hi all,
> I work for YouTube and would like to chime in on this thread.
> Currently YouTube's terms of service prohibit downloading the videos from the
> site, http://code.google.com/apis/youtube/terms.html, the videos must be played
> using the player. Only the content owner can download his/her videos, via the
> YouTube.com site (the API does not support downloading at this time). 
> Can you please let me know what problem you're trying to solve and perhaps
> we'll be able to find a ToS-compliant solution ? 
> Thanks,
> Jarek

Hi Mr Wilkiewicz. 

We thought about that feature as promising. The general purpose of this patch would be to allow users to do something they can already do, but in one only user-friendly step : download a clip from youtube and start editing it on the spot. We did not aim copyrighted stuff or what, the only purpose of this is to have some sort of gigantic clip source always available to meke video mashups.
Example (on public request) : Someone makes a movie where he wants at a moment to express his eruptive feelings :
Import from youtube => volcano => edit.

The purpose is really not to infringe copyright laws, but to put open sources in open sorce project. Is youtube ready to make an exception to its TOS and help us ?

I think people would accept to have a "sponsored by youtube" in the search function.

Regards, waiting for your answer,

Mathieu Duponchelle.

P.S. : Will you hire me ? ;)
Comment 23 Jean-François Fortin Tam 2010-11-27 22:09:36 UTC
My understanding of the goal/intent of this feature request is that its primary use case would be to "allow users to make mashups of existing content". 
This use case would, AFAIU, fall under the category of "Fair Use" in copyright law, and thus be legit for personal/entertainment/educational/parody purposes (among other things).
This would encourage a read+write culture instead of a read-only culture (see also: Larry Lessig).

Secondly, it's not like users couldn't already get this content directly from their browser cache or using browser extensions or tools like youtube-dl; this feature here only makes it easier for "mom and pop" users who wish to have fun with youtube and pitivi.

Now, on the other hand, your API terms of service seem to indicate that it is only allowed to "play" videos, not cache nor download them in any way. There are some potential solutions I can think of:
- Make this feature an opt-in pitivi plugin
- Put some disclaimer/EULA text (or info button/tooltip) when using this feature
- Use something else than the official gdata libs/do it with a pile of hacks
- Change your TOS so that they don't go against your users (at least for Fair Use) and do not impair a read+write culture.

I am not a lawyer. I'm just siding with the users and hoping to enable them to have fun. I believe part of the point of online video sharing is to share and foster a dynamic, bidirectional culture.
Comment 24 Mathieu Duponchelle 2010-11-28 02:42:07 UTC
Double opt-in if needed :)
And also would you mind joining the #pitivi channel to have this talk ?
I bet you guess but its on irc.freenode.org.

Regards,

Mathieu Duponchelle
Comment 25 Mathieu Duponchelle 2010-12-03 00:14:13 UTC
Jarek W sent me this :
Dear Mr. Duponchelle,

unfortunately we don't have a mechanism to accomodate your request at this
time. We are considering making some improvements to the APIs in 2011 that
could potentially help you, but since the plan is not firm we can't get
into more details at this point.

As I mentioned before, only the content owner can download the videos, you
can read more about how to do this here :

http://www.dataliberation.org/google/youtube-1

There is no ToS-compliant API for video download.

If you would like to implement a video mashup, consider using the player
API instead : http://code.google.com/apis/youtube/js_api_reference.html or
http://code.google.com/apis/youtube/flash_api_reference.html .

We would appreciate if you could please bring your application into
compliance with the ToS : http://code.google.com/apis/youtube/terms.html .


Thank you and I am sorry we cannot help more at this time.
Jarek

I dont know what he may think video mashups are ..
Comment 26 Mathieu Duponchelle 2010-12-03 00:55:53 UTC
https://github.com/Mathieu69/Pitivi-youtube-importer
Here is my github address.
Comment 27 Mathieu Duponchelle 2010-12-03 02:05:37 UTC
Hi,

I agree that YouTube is a very creative community and we definitely want
to keep it that way. At the same time, we can only advance the technology
within the boundaries that the entire community, including content owners,
is comfortable with. I know this can be very frustrating to application
developers, and defiantly empathize with the project's needs.
Wrt API changes, probably the best thing to do is to watch/participate in
http://code.google.com/apis/youtube/forum/. We discuss new features there,
and also solicit community feedback. So I definitely would like to
encourage you to voice your concerns on the list, as we use the feedback
internally as well to help prioritize features and advance functionality.
Wrt Player API-based mashup, the idea is to chain a sequence of :

player.cueVideoByUrl
player.seekTo

invocations across a number of videos. This may require loading the videos
in multiple frames potentially shuffling them around to work around
buffering and keyframe limitations. While this is far from ideal, it is
probably worth trying out. Note that this will need to be implemented in
the browser code (e.g. using JavaScript or Flash), possibly as a reusable
component for others to use. If you decide to try this out, it would be
great to share your experience with the YouTube developer community at :
http://code.google.com/apis/youtube/forum/ .

Thanks,
Jarek
Comment 28 Edward Hervey 2010-12-03 07:58:37 UTC
So basically.... we're only allowed to use the web-based APIs. Which is a no-go for an offline/rich-client like PiTiVi.

Only thing to do now is to participate in those forums to make our voice/requirements heard.

This code will *NOT* be merged into main pitivi until this issue is solved.

Might be a good excuse to revive the plugin system to make this installable by 3rd parties, but we (pitivi maintainers) will not bless this code until this legal issues are solved.

P.S. There is a 3rd way... but it requires being online. That is: using the 'http' sources with some local on-disk buffering :D Worth a shot... but a bit braindead if you ask me.
Comment 29 Mathieu Duponchelle 2010-12-13 16:47:57 UTC
https://github.com/Mathieu69/Pitivi_Gargamel
I replaced Youtube with Archive.org and Blip.tv.
Hope everything is fixed for the release :)
Comment 30 Jean-François Fortin Tam 2011-06-22 01:02:18 UTC
Review of attachment 175001 [details] [review]:

Old patch, rejecting so that it comes off the patch review list.
Comment 31 Jean-François Fortin Tam 2011-06-22 01:02:29 UTC
Review of attachment 175001 [details] [review]:

Old patch, rejecting so that it comes off the patch review list.
Comment 32 Jean-François Fortin Tam 2013-09-10 03:41:43 UTC
Closing this, unless someone comes up and rebases/redoes this work against the latest Pitivi (0.91 or newer/development version).

Whatsmore, I've got enough issues/beefs (philosophical, legal, etc.) with YouTube that I don't quite want to encourage its use anymore.