![]() |
Re: Youtube browser - mYTube - released
youtube application for nokia n97 is better ...i don't like the one for nokia n900 honestly
|
Re: Youtube browser - mYTube - released
Ok, I have built on Emgmex's idea, and have gotten the new youtube-dl script to work somewhat. I have had to hack it so that its stdout looks similar to youtube-dl-x. I'm not quite there yet, but you can at least hit the download button, and watch the percent climb until it hits 100%. Once it does, you can hit the play button.
lines that I changed in youtube-dl are lines 360,361, and 382. My guess is if we can get the stdout to look exactly like the youtube-dl-x, we should be good to go. Edit: go here to get the deb, which installs Emgmex's modified script. http://talk.maemo.org/showpost.php?p...&postcount=308 |
Re: Youtube browser - mYTube - released
Hi Liquid Many thanks! I'll take a look at your script later.
|
Re: Youtube browser - mYTube - released
Hi Liquid Yes your script is an improvement thanks. I'm trying to follow your suggestion and get youtube-dl to output the same as youtube-dl-x. Unfortunately it ain't that simple because youtube-dl-x has an additional parameter in the relevant line. Here is the line in youtube-dl-x (line 360)
cond_print('\nRetrieving video data: %5s%% (%8s of %s) at %8s/s ETA %s ' % (percent_str, counter, video_len_str, speed_str, eta_str)) and this is what we have in your version of youtube-dl self.to_stdout(u'\nRetrieving video data: %s of %s at %s ETA %s' % (percent_str, data_len_str, speed_str, eta_str), skip_eol=True) I think the problem is the counter parameter in youtube-dl-x code, which does not exist in youtube-dl. I guess this is what tells mytube to launch mplayer. I'm trying to add the counter somehow , but is is proving difficult and isn't helped by the fact that I don't know python. What we need is a kind and friendly python programmer! Regards |
Re: Youtube browser - mYTube - released
Yea, i'm not really a python guy either. I think you are correct, that there is a "bytes outputted" line in the stdout that mytube watches for. As I get time, I'll look to see if I can figure that out.
|
Re: Youtube browser - mYTube - released
Well by messing with the script a bit and adding the code below at line 360 I now have a byte count on the std out, but unfortunately Mplayer still doesn't launch automatically. I guess there is something wrong with the byte count format.
Line 355 def report_progress(self, percent_str, data_len_str, speed_str, eta_str): """Report download progress.""" if self.params.get('noprogress', False): return #CHANGED BY ENGMEX percent_str = percent_str.rstrip('%') percent_str = float(percent_str) data_len_str = data_len_str.rstrip('M') data_len_str = float(data_len_str) counter = int(((data_len_str*1048576)/100)*percent_str) self.to_stdout(u'\nRetrieving video data: %5s%% (%8s of %sM) at %8s/s ETA %s ' % (percent_str, counter, data_len_str, speed_str, eta_str), skip_eol=True) #END ENGMEX def report_resuming_byte(self, resume_len): """Report attemtp to resume at given byte.""" self.to_stdout(u'[download] Resuming download at byte %s' % resume_len) |
Re: Youtube browser - mYTube - released
Thanks, Engmex and liquid217. I'm sure looking forward to your success in fixing the Diablo mYTube.
(It seems like, so far, there's no point in a non-coder downloading any of what you've implemented these past few days; and that all we can do is thank you and wish you good luck. Good Luck!) |
Re: Youtube browser - mYTube - released
sorry to dissappoint, but I now have the modified youtube-dl script producing the exact same output as the original youtube-dl-x script. Here is the code:
Line 359 #CHANGED BY ENGMEX percent_str = percent_str.rstrip('%') percent_str = float(percent_str) data_len_str = data_len_str.rstrip('M') data_len_str = float(data_len_str) counter = float(((data_len_str*1048576)/100)*percent_str) if counter < 1048576: self.to_stdout(u'\nRetrieving video data: %5s%% (%.2fk of %sM) at %8s/s ETA %s ' % (percent_str, counter, data_len_str, speed_str, eta_str), skip_eol=True) else: counter = counter/1048576 self.to_stdout(u'\nRetrieving video data: %5s%% (%.2fM of %sM) at %8s/s ETA %s ' % (percent_str, counter, data_len_str, speed_str, eta_str), skip_eol=True) #END ENGMEX Unfortunately mplayer still does not launch automatically, so I guess that mytube does not use the std out to launch myplayer. |
Re: Youtube browser - mYTube - released
Good news! I think I have it working. I made a silly mistake and was converting to bytes instead of kilobytes here is the new code:
#CHANGED BY ENGMEX percent_str = percent_str.rstrip('%') percent_str = float(percent_str) data_len_str = data_len_str.rstrip('M') data_len_str = float(data_len_str) counter = float(((data_len_str*1024)/100)*percent_str) if counter < 1024: self.to_stdout(u'\nRetrieving video data: %5s%% (%8.2fk of %sM) at %8s/s ETA %s ' % (percent_str, counter, data_len_str, speed_str, eta_str), skip_eol=True) else: counter = counter/1024 self.to_stdout(u'\nRetrieving video data: %5s%% (%8.2fM of %sM) at %8s/s ETA %s ' % (percent_str, counter, data_len_str, speed_str, eta_str), skip_eol=True) #END ENGMEX I will try and upload the file somewhere so that the rest of you can download it. |
Re: Youtube browser - mYTube - released
Nice Engmex. Congratulations on getting it figured out.
|
Re: Youtube browser - mYTube - released
Ok I've uploaded the modified and working script to here:
http://wikisend.com/download/437498/youtube-dl It seems to be working on my Nokia fine. Remember you will also need to download the getpass.py posted by liquid217 above. You need to put the getpass.py in your /usr/lib/python2.5/site-packages You need to place youtube-dl in /usr/bin/ you need to make sure the permissions on the youtube-dl script are correct. as root type: chmod 755 /usr/bin/youtube-dl You also need to go to mytube>preferences>more>youtube-dl and change youtube-dl-x to youtube-dl leave the rest of the options the same. Good Luck! |
Re: Youtube browser - mYTube - released
Thanks to you liquid for working out that we only needed to change the stdout, without that I wouldn't have known where to begin.
|
Re: Youtube browser - mYTube - released
Quote:
Trivial inconsistency: one of you put getpass.py in /usr/lib/python2.5/site-packages/ and the other put it in /usr/lib/python2.5/ So I put it in both -- messy, I guess, but no problem so far. Still no download percent indicator, but no big deal, either. Great to have YouTube back on my N800! |
Re: Youtube browser - mYTube - released
hi, sorry for the noob question, but how do i get the getpass.py into the /usr/lib/python directory? i don't know how to access the directory
|
Re: Youtube browser - mYTube - released
Quote:
|
Re: Youtube browser - mYTube - released
Quote:
open an x-terminal maybe you need to install the x-terminal package too. in the x-terminal type: cd /home/user/where you placed the downloaded files then sudo cp youtube-dl /usr/bin/ sudo cp getpass.py /usr/lib/python2.5/site-packages sudo chmod 755 /usr/bin/youtube-dl |
Re: Youtube browser - mYTube - released
Quote:
ive placed it on my external memory but i’m not sure what to type in cause cd /home/user/Removable memory card/ doesn’t work. |
Re: Youtube browser - mYTube - released
Honestly, I think the easiest method would be to install an ssh server on the tablet, then use an sftp client on the PC/MAC/Linux machine. I personally use Filezilla. Get the IP address of your tablet, and plug that information into filezilla. (To find this open the Connection manager and select Internet connection > IP address from the menu.) You will also need the root password, which you should set up when installing ssh.
Then, it's just a matter of navigating to the 2 directories and copying the files over. You can also chmod (change permissions) right from filezilla by right clicking on the files once they are copied over. I don't think it really matters if you copy getpass.py to /usr/lib/python2.5/site-packages or /usr/lib/python2.5. I think python probably looks at both folders internally for any dependencies it needs. http://filezilla-project.org/ |
Re: Youtube browser - mYTube - released
Quote:
http://www.ee.surrey.ac.uk/Teaching/Unix/ The external memory card files are in /media/mmc1 so cd /media/mmc1 |
Re: Youtube browser - mYTube - released
Quote:
Quote:
and when i try typing in sudo cp youtube-dl /usr/bin/ it gives me cp: cannot stat 'youtube-dl'? No such file or directory so i'm still a little stuck. but in the meantime i'll be reading the article you sent me, thanks |
Re: Youtube browser - mYTube - released
Did you install the openssh server on your tablet? Many moons ago, when I installed it from the application manager, it asked me to enter a root password. Something may have changed since then.
Obviously, 'root' is your username. |
Re: Youtube browser - mYTube - released
Quote:
thanks liquid217 and Engmex! |
Re: Youtube browser - mYTube - released
Great app.
It works like a charm. Able to view and download the video on my N900. But what I couldn't see is that, while playing the downloaded video inside mytube, its not able to pause. Is it possible to pause the video ? If not, is it possible to add the pause/play/forward/reverse function ? Thanks everyone for the effort. |
Re: Youtube browser - mYTube - released
playback is handled by mplayer, try the spacebar ;)
|
Re: Youtube browser - mYTube - released
Im having trouble with this app, if downloaded it installed it, it finds what im after if i click play or download i can see the thing next to the time loading but it just stops nothing happends.....
|
Re: Youtube browser - mYTube - released
Mplayer doesn't pick up the downloaded media in the Video section. Would like a way to do this so i can view all my video downloads straight from Mplayer hub.
|
Re: Youtube browser - mYTube - released
Quote:
|
Re: Youtube browser - mYTube - released
1 Attachment(s)
Here is a deb file which should update the youtube-dl script for you automatically. It's my first time making a deb, so I hope it works right. (worked for me anyway).
Edit: -It will replace the existing youtube-dl-x script, so you do not need to change anything in mYTube. -It will also copy over the getpass.py to the site-packages directory. |
Re: Youtube browser - mYTube - released
thanks liquid217, worked like a charm for my n800.
|
Re: Youtube browser - mYTube - released
The patch works great, thanks!
|
Re: Youtube browser - mYTube - released
:)Mytube/N800 fixed! That was easy thanks to your patch liquid217 and engmex. Really appreciate your work. Thanks.
|
Re: Youtube browser - mYTube - released
Quote:
|
Re: Youtube browser - mYTube - released
Apologies if a solution to this is buried within the many pages of this thread (I have searched) -
I can download and install Mytube OK but when I try to run it, it says "Creating Video Directory" but then resets to desktop! What am I doing wrong? |
Re: Youtube browser - mYTube - released
Quote:
Help us pleaseeee |
Re: Youtube browser - mYTube - released
try running it from the command line and see what kind of output you get. Just type "mytube" from the prompt.
|
Re: Youtube browser - mYTube - released
Okay, I got it.
I installed OpenSSH Server + Client and logged in to delete the file /home/user/.mytuberc mYtube now wanted me to choose a new path I chose /home/user/MyDocs(in the device it's called N900)/Youtube(or whatever you want) Now it starts but I can't watch the videos, it shows the first frame in Mplayer, nothing else :( I also applied the patch edit:rebooted the device and it plays dat shat :D I hope that I can heldp others with my post :) |
Re: Youtube browser - mYTube - released
Quote:
OSError: [Errno 13] Permission denied: '/media/mtube' |
Re: Youtube browser - mYTube - released
Quote:
|
Re: Youtube browser - mYTube - released
Quote:
Shame really, I think mytube sounds really good. |
Re: Youtube browser - mYTube - released
You were already at the prompt. Just do:
rm /home/user/.mytuberc |
| All times are GMT. The time now is 16:31. |
vBulletin® Version 3.8.8