Notices


Reply
Thread Tools
Posts: 78 | Thanked: 57 times | Joined on Jul 2007
#371
Hi,

I just had a play with this and I can get it working (partly).

Step 1: Head over to http://rg3.github.com/youtube-dl/ and download the most recent youtube-dl script
(currently https://github.com/rg3/youtube-dl/ra....09/youtube-dl)
Step 2: Copy it over your current script on the tablet (in /usr/bin)
(note it will be named either youtube-dl or youtube-dl-x (you may want to back up the current script))
Step 3: Go into Mytube Preferences more ... and on the youtube-dl tab add -f 5 into the parameters and press apply (this selects a lower quality format file which plays better)
Step 4: Download anything you want to watch

NOTE: You must download video now as the play directly will not work. The progress meter is also broken by this change. Just hit download and wait until the [/] stops spinning. Then go to the saved/all screen and you can play videos from there.

Not great, but better than nothing

Can anybody else help to get the progress meter and play buttons ?working?

-John
 

The Following 2 Users Say Thank You to johnpad For This Useful Post:
Posts: 78 | Thanked: 57 times | Joined on Jul 2007
#372
I had a go at fixing this after reading through the earlier threads, but I do not know Python.

If you put this in after line 379 and comment out line 380 it works better, but not perfectly. The play button now works and the % completed shows when you are downloading, but the play button downloads the whole video before it will start playing.

Too tired now. Any hints would be welcome.

Code:
		#CHANGED BY ENGMEX/johnpad
		percent_str = percent_str.rstrip('%')
		percent_str = float(percent_str)
                if data_len_str.rfind('M') > -1:
			data_len_str = data_len_str.rstrip('M')
                        data_len_str = 1024*float(data_len_str)
		else:
			data_len_str = data_len_str.rstrip('k')
			data_len_str = float(data_len_str)
		counter = float(((data_len_str)/100)*percent_str)
                data_len_str = data_len_str/1024
		if counter < 1024:
			self.to_screen(u'\nRetrieving video data: %5s%% (%8.2fk of %8.2fM) at %8s/s ETA %s ' %
			(percent_str, counter, data_len_str, speed_str, eta_str), skip_eol=True)
		else:
			counter = counter/1024
			self.to_screen(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/johnpad
		#self.to_screen(u'\r[download] %s of %s at %s ETA %s' % (percent_str, data_len_str, speed_str, eta_str), skip_eol=True)
Not quite in bed yet. Just realised the old script does not use a temporary .part file then rename it. So if we just comment out those bits it might just work.

-John

Last edited by johnpad; 2011-01-07 at 13:18.
 

The Following User Says Thank You to johnpad For This Useful Post:
Posts: 161 | Thanked: 45 times | Joined on Apr 2010
#373
cute tube in extras devel is the way to go for you tube on the n900. by far the best youtube app available for the n900.
 

The Following User Says Thank You to n900faniam For This Useful Post:
Posts: 78 | Thanked: 57 times | Joined on Jul 2007
#374
But this is on my old N810. Anyone want to send me an N900 ?
I was right, it is the .part file name.
Very quickly hacking out the .part filename:
Code:
 return filename                                                                                                                                                                
 #+ u'.part'
and commenting out the rename
Code:
#self.try_rename(tmpfilename, filename)
Fixes it completely (based on the last 10 seconds of testing). Now sleep.

-John
 
tso's Avatar
Posts: 4,783 | Thanked: 1,253 times | Joined on Aug 2007 @ norway
#375
seems the youtube-dl script can be dumped anywhere inside the main storage area, like say /home/user/MyDocs/, as long as one input the full path in mytube settings and do a chmod +x on the script file.

oh, and i see the latest update to the script in github got a --no-part option.
__________________
Be warned, posts are often line of thoughts at highway speeds...

Last edited by tso; 2011-01-07 at 15:04.
 
Posts: 53 | Thanked: 6 times | Joined on Sep 2008
#376
Originally Posted by johnpad View Post
But this is on my old N810. Anyone want to send me an N900 ?
I was right, it is the .part file name.
Very quickly hacking out the .part filename:
Code:
 return filename                                                                                                                                                                
 #+ u'.part'
and commenting out the rename
Code:
#self.try_rename(tmpfilename, filename)
Fixes it completely (based on the last 10 seconds of testing). Now sleep.

-John
Great John, I will try your fix and see if it works. If it does, I will again have entertaining train rides again
 
Posts: 53 | Thanked: 6 times | Joined on Sep 2008
#377
Hi John, I tried your fix but unfortunately it didnt work, neither the play nor the download. mYTube never worked on my N810 though...just wondering what could be problem. I have mY Tube ver 0.1.5-1 installed on my machine. Any thoughts how I can get it working, so far I tried all the options posted in this thread...
 
Posts: 78 | Thanked: 57 times | Joined on Jul 2007
#378
Hi,

Here is the tar of my modified script which seems to be working for me. Good suggestion to drop it in a user area (though I think it will need to be a unix, not FAT, partition for the file permissions).

Maybe save it to /home/user/MyDocs
Then add the settings in mYTube:
Code:
/home/user/MyDocs/youtube-dl-x -f 5 -o %d -- %s
Hope this helps.

Cheers,
John
Attached Files
File Type: tar youtube-dl-x.tar (90.0 KB, 751 views)
 

The Following 6 Users Say Thank You to johnpad For This Useful Post:
tso's Avatar
Posts: 4,783 | Thanked: 1,253 times | Joined on Aug 2007 @ norway
#379
Originally Posted by johnpad View Post
Maybe save it to /home/user/MyDocs
Bingo, unless the SD(s) are ext2/3 formated one can not run something from there (tho perhaps one could be creative and specifically run python and aim it at the script).
__________________
Be warned, posts are often line of thoughts at highway speeds...
 

The Following User Says Thank You to tso For This Useful Post:
Posts: 53 | Thanked: 6 times | Joined on Sep 2008
#380
Originally Posted by johnpad View Post
Hi,

Here is the tar of my modified script which seems to be working for me. Good suggestion to drop it in a user area (though I think it will need to be a unix, not FAT, partition for the file permissions).

Maybe save it to /home/user/MyDocs
Then add the settings in mYTube:
Code:
/home/user/MyDocs/youtube-dl-x -f 5 -o %d -- %s
Hope this helps.

Cheers,
John
Thanks John for the file, i extracted it into mydocs and changed the script /home/user/MyDocs/youtube-dl-x -f 5 -o %d -- %s in mYtube>prefaces>more settings>mytube-dl. however it didnt work:-(...any help?
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:28.