PDA

View Full Version : In Development: MaemoTube


aleksandyr
2007-01-03, 22:10
Very commonly, I'd like to be able to quickly download and watch a video on YouTube. Navigating YouTube's interface is painful: this is of course ignoring the issue of copying and pasting variables into a downloader site.

I noticed this in the MPlayer thread:

None special parameters are required, but '-vo nokia770' has some suboptions which can be used to tune it. You can set a screen area for video playback in a 'windowed' mode. For example '-vo nokia770:x=174:y=60:w=600:h=360' sets video output area for windowed mode to the dimentions used by default video player. It may be useful for 'slave' mode if somebody decides to implement exact clone of default video player using MPlayer as a backend.

A bit of searching dug up the XML-RPC API for YouTube, and a youtube-dl program capable of downloading a YouTube video.

I've linked them together with some Python, providing a reasonably simple way to search for and download videos. The next step is to wrap a UI around this: final step, integrating MPlayer.

If anyone has worked on a similar concept previously, or has code snippets to share, that would be great.

A nice Python library that abstracts out controlling an MPlayer slave would be excellent as well.

teemu
2007-01-04, 04:30
Hi alexandyr,

I have to say that your idea sounds very promising. I've been also thinking about a similar project since it seems that it would be possible to do with the great mplayer port that is available.

Maybe we could join our efforts? I've been already testing with a very simple GUI, but I haven't yet implemented the youtube downloading part. Also, I wasn't aware of the XML-RPC or the REST APIs that youtube has, so I've based my implementation on the RSS feeds that youtube offers. However, I think it could be easily modified to use your implementation as well. Here is a screenshot (http://www.saunalahti.fi/~tsharju/maemotube.png) of what I've made so far. It's a bit ugly, but its been made in less than a day or something.

PS. Funnily my app has the same name as yours. ;)

Ceklund
2007-01-05, 05:21
I am very excited by this idea and hope both of you will work on it and get it working because it would make the 770 way more valuable to be able to access youtube and flash movies etc....

I have been waiting for someone to do this since the 770 launched... although youtube wasn't as big at that time as it's become.

Teemu once again comes to the rescue with another cool app.

I can't wait... :)

aleksandyr
2007-01-05, 06:45
PS. Funnily my app has the same name as yours. ;)

I went through 10 other names...but really, what can you do :D

Your UI looks nice! Haven't thought through all the subcases yet, but I figure at least 75% of the non-watching time will be searching.

I'm having issues with the youtube API: I get a lot of random error messages (claiming my dev-id is invalid) but these are intermittent...once I sort this out I'll post it up here. The API is pretty limited though: no real searching, just by tag.

The youtube downloader I'm using is FOSS and can be found at http://www.arrakis.es/~rggi3/youtube-dl/ --- it takes a watch URL and gets the FLV for it.

Sounds like I should hack together a script that will download a given watch URL and start streaming / playing it.

Serge
2007-01-05, 17:15
Probably you have already found this link, but posting it here just in case (it contains some useful information about developing gui frontends for mplayer on nokia 770):
http://mplayer.garage.maemo.org/slave-mode.html

Also if you need any help or additional information, feel free to contact me.

aleksandyr
2007-01-05, 17:24
*jawdrop* Nope, missed that link!

Ok, I'll probably have something rather nifty ready tonight.

Serge, you rock.

gostt
2007-01-08, 01:23
I hope you guys continue development on this even though the N800 has hit stores. Us 770 owners could use this app :)

aleksandyr
2007-01-08, 02:43
Given what I've heard of the N800 (flash movie player is only getting 1-2fps) it seems like there's still a use for this: I'm far enough along that I'm going to see this one through even if the N800 gets patched :D

One problem I'm having is that I can't get mplayer to play partially downloaded FLVs, which somewhat limits the usefulness of the app. Suggestions?

mplayer slave mode is also causing videos to refuse to play. I'm not sure if it's just my device acting up: if someone could follow Serge's directions and see if they have any issues, that would be great.

aflegg
2007-01-08, 09:30
I've found mplayer/mencoder to be picky about file extensions with FLV files, is your partial download named <something>.flv?

aleksandyr
2007-01-08, 17:10
I've found mplayer/mencoder to be picky about file extensions with FLV files, is your partial download named <something>.flv?

The only difference between the partial and full download is that one's partial and the other is full: I've verified that the partial is a valid preamble of the full, and the filenames and non-size metadata are identical.

Note to self: fill the file with zeroes so the size matches when I get home. :D

aflegg
2007-01-08, 17:56
That sounds like a dodgy hack ;-)

What's in the mplayer log?

Serge
2007-01-08, 23:46
Support for FLV in upstream MPlayer is still not perfect (though it was improved in 1.0rc1 release). It has some problems with seeking and can't drop frames, so it is possible to get audio lags on heavier video files. If the same problem can be reproduced with x86 version of mplayer, it should be reported upstream, so we may get better FLV support in the coming 1.0rc2 release.

With all that said, FLV support is still not so bad in MPlayer, it definitely can be used to watch FLV videos if you can tolerate some quirks.

Xetra
2007-06-18, 20:47
Hi all
any news ??

I use keepvid.com to paste the youtube url, it give me the url of the flv file.
in xterm:
mplayer url_of_the.flv

Play perfectly the stream without having to save it.

Is it possible to add an option to stream the file and one to save the file in the sd ?

thank ou for your work !
(please email me a beta whn possible : maemo at xetranet-com)

wirelessaddict
2007-06-18, 22:04
Picture me way excited about this project. Push on boys!!

aleksandyr
2007-06-21, 17:52
Cancelled. :)

uktube does the job about as well as my prototypes did: the youtube API just isn't where I want it to be.

That said, I'm debating putting together a proxy that would intercept YouTube video downloads, save them to a specified directory, and auto-start mplayer. You'd browse YouTube normally, but the video player would be replaced by a large "Play with MPlayer" button: clicking it would start the DL and start MPlayer.

...really, I'd rather working flash :)

aflegg
2007-06-22, 08:36
There's still a lot of room for an application as polished as the iPhone's newly announced YouTube app. One where you don't have to visit the YouTube website at all, can browse/search/watch/bookmark all from one app.

Perhaps things Urho's got in mind.

Xetra
2007-07-04, 09:12
Cancelled. :)

uktube does the job about as well as my prototypes did: the youtube API just isn't where I want it to be.

That said, I'm debating putting together a proxy that would intercept YouTube video downloads, save them to a specified directory, and auto-start mplayer. You'd browse YouTube normally, but the video player would be replaced by a large "Play with MPlayer" button: clicking it would start the DL and start MPlayer.

...really, I'd rather working flash :)

good, but i prefer to stream the video using the keepvid.com method ....
would be great if uktube allow us to stream the video using mplayer rather than to download it before (specially for large video ...)

konttori
2007-07-04, 10:34
Next version of uktube is streaming. I will try to release it today. It's bound to ukmp release. Ukmp 1.4 is a bit rough on the edges, so I'll maybe release it as 1.4 beta today. Sounds like a good plan?

konttori
2007-07-04, 10:35
There's still a lot of room for an application as polished as the iPhone's newly announced YouTube app. One where you don't have to visit the YouTube website at all, can browse/search/watch/bookmark all from one app.

Perhaps things Urho's got in mind.

I do have that kind of support in mind and that should be relatively easy to implement, but will take some time to do it properly.

One big problem is that I can't use the keyboard in pygame app. Any ideas on how to get around that issue?