![]() |
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.
|
All times are GMT. The time now is 11:32. |
vBulletin® Version 3.8.8