You are not logged in.

#1 2010-02-14 19:24:02

mrbug
Member
Registered: 2007-07-17
Posts: 221

[NEW RELEASE] dvdtube

With the help of the Arch forums, I've been able to finish the first version of my new Python script called dvdtube.

It will create a DVD of all of a YouTube user's uploads. It takes a single argument -- the username.

It's currently "hardcoded" to use NTSC, but it only requires one word to be changed in the file to use PAL.

The requirements are:
python
python-feedparser
python-gdata
youtube-dl
videotrans (for now -- may change)


It is available at http://code.google.com/p/dvdtube/


I plan to put it on the AUR if someone can help me build a PKGBUILD for a python script through svn!


The script is for educational purposes only as a proof-of-concept.


EDIT: If anyone wants to contribute, let me know (so that I can add you to the contributors) and/or post changes/patches here.

Last edited by mrbug (2010-02-14 19:36:06)


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#2 2010-02-15 13:56:14

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

I have added dvdtube and dvdtube-svn to the AUR at http://aur.archlinux.org/packages.php?ID=34647 and http://aur.archlinux.org/packages.php?ID=34646 respectively.

I would really appreciate input and (if motivated) assistance! =-)


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#3 2010-02-17 10:18:55

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

I have updated both dvdtube and dvdtube-svn in the AUR after making some big changes:

* significant code cleanup
* command-line arguments support has been added
* can now use -f NTSC/PAL or --format=NTSC/PAL to specify video format

I'm going to work on adding other arguments next. After that, I will try to fix this weird YT h264 -> MPEG2 transcoding problem that I have that only seems to affect ffmpeg if it's being called by another program like tovid or any2dvd.


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#4 2010-02-17 12:54:15

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [NEW RELEASE] dvdtube

It seems your tool only gets a limited number of videos. i tried mismag822 who has like 200 videos. But dvdtube only found 25


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#5 2010-02-17 13:30:46

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

Thanks for the input! It previously worked with any number of videos using my screen-scraping method, but that broke somehow.

It seems that the Google API is only returning a limited number (presumably 25) at a time from each user's feed. I'll have to dig a little deeper to see if there's a way to grab more at a time. I have added your bug to the tracker with high priority. I'll make that my next goal.

What do you think of the script overall? Has it worked for you with the limited number of videos? I don't have support for DVD sizes yet, though, so you may need to manually shrink the output using dvd95 or something like that in the meantime if it does not fit onto one disc.

Nice YouTube find, by the way -- I love magic tricks!


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#6 2010-02-17 14:53:14

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [NEW RELEASE] dvdtube

i didnt test the actual dvd creation yet. In fact i would like to ask for a "Download-only" option, as i dont even own a dvd player.


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#7 2010-02-17 15:15:18

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

I found the problem!!!!

The api has a limit of 50 video results at a time -- but 25 by default.

I will have to modify my code to step through each page of 50 videos.


EDIT: I didn't notice your reply before. That's a good idea, I'll work on adding that function. It's a slight bit of feature creep (as this utility was made for archiving to a viewable dvd), BUT since the "download" step is intermediary, I don't see a problem with it!

....and I'd use it myself. It would be like youtube-dl on steroids.

Last edited by mrbug (2010-02-17 19:16:03)


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#8 2010-02-17 21:18:57

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

I have fixed the problem and added your requested feature! (Re)Install dvdtube-svn from the AUR for the latest changes. I'll upload new PKGBUILDs and the newest compiled package later today.


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#9 2010-02-20 22:57:35

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

Update for version 0.4:
  * Added support for -u/--urls-only argument to just print a list of URLs
  * Supports up to 1000 videos per user

Regarding the second version, ARE there any YouTube users with more than 1000 videos? Should I lower the limit to save time? Should I make it a switch/argument (default to ###, but changeable through that switch).


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#10 2010-02-21 00:45:37

melik
Member
Registered: 2009-10-11
Posts: 108

Re: [NEW RELEASE] dvdtube

mrbug wrote:

Update for version 0.4:
  * Added support for -u/--urls-only argument to just print a list of URLs
  * Supports up to 1000 videos per user

Regarding the second version, ARE there any YouTube users with more than 1000 videos? Should I lower the limit to save time? Should I make it a switch/argument (default to ###, but changeable through that switch).

There are some with thousands.

1000 is pretty nice, btw nice program big_smile

Offline

#11 2010-02-21 08:11:29

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [NEW RELEASE] dvdtube

yes.. this works very nicely!


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#12 2010-02-21 10:44:19

paldepind
Member
From: Århus, Denmark
Registered: 2010-02-17
Posts: 141

Re: [NEW RELEASE] dvdtube

It's probably me who is doing something wrong, but I can't get it to work. After downloading and converting the videos it give me this error:

Traceback (most recent call last):
  File "/usr/bin/dvdtube", line 195, in <module>
    main()
  File "/usr/bin/dvdtube", line 87, in main
    make_dvd(video_format, filelist, output_dir)
UnboundLocalError: local variable 'video_format' referenced before assignment

Offline

#13 2010-02-21 20:24:27

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

melik wrote:

There are some with thousands.

1000 is pretty nice, btw nice program big_smile

Thousands? Wow. I assumed that some could have hundreds, but thousands? Maybe I'll have to make a switch for "--heavy-user" or something =-)

Hey, thanks for the feedback and compliment!


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#14 2010-02-21 20:40:12

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

paldepind wrote:

It's probably me who is doing something wrong, but I can't get it to work. After downloading and converting the videos it give me this error:

Traceback (most recent call last):
  File "/usr/bin/dvdtube", line 195, in <module>
    main()
  File "/usr/bin/dvdtube", line 87, in main
    make_dvd(video_format, filelist, output_dir)
UnboundLocalError: local variable 'video_format' referenced before assignment

Ah, you found a regression. It used to check for the format (NTSC/PAL) earlier in the script, but I moved it when I wrote the support for downloading only.

Try upgrading to the newest regular (0.4.1) or svn (20100221) version -- that should fix the problem!


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#15 2010-02-23 17:33:41

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

I have released version 0.4.2 with some major upgrades and fixes. It currently matches the svn code.

Caution: The -d/--delete-files argument has been changed to --remove-files (no short argument).



EDIT: Oops, I uploaded a blank tarball by accident. If you've downloaded 0.4.2, try it again.

Last edited by mrbug (2010-02-24 00:55:22)


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#16 2010-03-03 13:00:13

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

I have just released version 0.4.9! It's a release candidate for version 0.5.

Regular and dual-layer DVDs should be supported. It should also separate videos into 120/240 minute collections to fit onto each DVD.

If I do not receive any bug reports during the next week, I will release it as version 0.5!


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#17 2010-03-09 13:55:01

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: [NEW RELEASE] dvdtube

Version 0.5 has been released! As usual, check the AUR for installation or http://dvdtube.googlecode.com/ for the source.


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

Board footer

Powered by FluxBB