PDA

View Full Version : Streaming internet videos - the painful DYI alternative


Bec
2010-01-31, 01:03
1) This first tutorial focuses on manualy obtaining video streams for (k)mplayer:

Prerequisites:mplayer (no, not your internal media player, but MPLAYER!)
the nice much more than a GUI kmplayer - make sure to select mplayer as the default player within kmplayer:p
a bookmark to www.clipnabber.com (if you know sites that do not require the html source please post them below)
a video that is unwatchable in your browser: encoded with no regard for common sense OR embedded with tons of ads OR embedded with a crappy player (eg.http://www.megavideo.com/?v=5NIYEE8A)Watching any video out there in 2.5 easy steps:1) in kmplayer, go to "Download Page", "Add Plain Download", paste the link to the desired video (eg.http://www.megavideo.com/?v=5NIYEE8A) and save the result as "file.txt" in a handy location.
2) go to clipnabber, paste the link (http://www.megavideo.com/?v=5NIYEE8A). For some sites it works out of the box for others it will ask for the page "code". In that case open "file.txt" CTL-A to select all, CTL-C to copy and CTL-V to paste it in the clipnabber "source code" window.
3) long press the "Download FLV" button to either save the whole video via "Save link as" or "Add bookmark" to simply copy the link (discard te bookmark). Paste the link in kmplayer and enjoy silky-smooth playback!

Other sites for downloading: Keeptube, KeepVid, ClipNabber, Javimoya, SaveTube, kCoolOnline,
Video sites that stream smooth directly in the browser: Youtube, Wisevid, Smotri,For now we have a brainstorm, (please vote for it!) since I suspect a plug-in would work better than various scripts: http://maemo.org/community/brainstorm/view/plugin_to_play_embeded_videos_in_another_applicati on/
And a thread for discussing the automated means for what I have described above: http://maemo.org/community/brainstorm/view/plugin_to_play_embeded_videos_in_another_applicati on/

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


2) This tutorial focuses on an easier method that is however not available for all the video sharing sites out there:

PrerequisitesGreasemonkey installed in microb (note that due a bug in greasemonkey you won't be able to scroll/edit long lists in the config menu eg. BetterTube)
Various scripts from: http://userscripts.org, the links here will redirect you there.
Most scripts will offer to download the video. Just save it and open it with (k)mplayer, you don't have to wait for the download to finish.Working scripts:Direct Megavideo FLV link (http://userscripts.org/scripts/show/42944)
-long press "download", copy link adress and paste it inKMplayer.
Youtube Buffer Video (http://userscripts.org/scripts/review/6198)
-it does leak a frame or two but it's better stuttering until the video is buffered properly.
BetterTube 5.19.1 (http://talk.maemo.org/attachment.php?attachmentid=6948&stc=1&d=1265538688) (change the extension from .txt to .js and install it from the file manager)
-failed on youtube but if configured like above it opens the video on a clean page, it enlarges it so you can close in-video adverts and press the full screen button easily.
Bookmarklet (http://talk.maemo.org/showthread.php?t=43540) for tvgorge.com (http://tvgorge.com/) (thanks Bundyo (http://talk.maemo.org/member.php?u=10333) & mrebanza (http://talk.maemo.org/member.php?u=31717))javascript:(function() { prompt("Copy and Paste in your favorite player.", document.getElementById('watchwrap').innerHTML.mat ch(/clip\:\s*{\n\s*url\:\s*'(http.*flv)'\,/)[1]); })()-simply create a new bookmark, paste this as a target and open it whenever you're starting to view a show; paste the link in kmplayer.

Scripts that should work on some sites but not those I like :p:Keep Tube: Download Youtube Videos, Dailymotion... (http://userscripts.org/scripts/show/47636)
-asked for "source" on megavideo

(http://userscripts.org/scripts/show/13269)---------------------------------------------------------------------------------WORK IN PROGRESS---------------------------------------------------------------------------------


3) This tutorial will focus on porting firefox/seamonkey/etc. plug-ins:

- some of us have recently noticed that Mozilla add-ons install without issues in microb but their functionality is broken.
- this tutorial will focus on porting 101 without asking you to be an expert in either linux or add-on creation,
- when? -whenever I or someone with more experience has some free time...
http://imgs.xkcd.com/comics/surgery.png


---------------------------------------------------------------------------------WORK IN PROGRESS---------------------------------------------------------------------------------

Best regards,
Bec

Bratag
2010-01-31, 01:18
There was a mplayer plugin in previous versions of maemo - I am wondering if it cannot be ported.

phortize
2010-01-31, 02:54
thank u so much i was looking just for that!!! ill try tomorrow as soon as possible as im just back from a destroying evening..

while your there, may you know a way to change/hide the mplayer user agent? i need that to watch crappy italian television (you knpw sometimes they stream some sports from there, its not only berlusconi luckily). sorry if its a stupid questiom but im a linux noob so i cant figure how to do it. i can handle some terminal btw.

thank you again!

bunanson
2010-01-31, 03:29
...i need that to watch crappy italian television (you knpw sometimes they stream some sports from there, its not only berlusconi luckily..!

You happen to have some working Italian TV links? I can include in the update version of WorldTV99 then you would NOT need the trouble to do any Linux work or mplayer plug-in,

bun

Bec
2010-01-31, 08:02
know a way to change/hide the mplayer user agent?

I have no idea, never had to hide it. But a clean stream should play without issues though...

Also, ClipNabber states, "Download Videos From:" 56.com, 5min, 6.cn, 9you, Bebo, Blip.tv, Bofunk, BollywoodHungama, Break, BuzzHumor, Buzznet, Chilevision.cl, ClipFish.de, ClipLife.jp, ClipJunkie, Clipser, ClipShack, CollegeHumor, CrunchyRoll, Current, Dailymotion, dalealplay, Disclose.tv, DivXStage.net, DoubleAgent, eBaumsWorld, eHow, elRellano, elpolvorin, eSnips, ExpertVillage, Facebook, FairyShare, Flurl, FunForMobile, FunnyJunk, FunnyorDie, Glumbert, Google Video, Graspr, GreekTube.org, HowCast, HowStuffWorks, iShare.Rediff, Izlesene, Jokeroo, Kewego, ku6, Libero.it, LiveVideo, LiveLeak, MediaBum, Megavideo, Metacafe, MilkandCookies, Miloyski, Mojoflix, Mojvideo, MonkeySee, MusicMaza, Myspace, MyVideo.de, Newsy, NothingToxic, Novamov, own3D.tv, Pinkbike, Photobucket, PokerTube, PWNorDIE, RuTube.ru, RetroJunk, SantaBanta, Sevenload, Sina, Snotr, Spike, Stagevu, StreetFire.net, StupidVideos, SuperNovaTube, Tangle, TeacherTube, TheOnion, TinyPic, TipExhibit, TotallyCrap, TrailerAddict, Trilulilu.ro, tu.tv, Tudou, vbox7, Veoh, Videa.hu, VideoCopilot.net, VideoJug, Vidiac, Vidivodo, Viddyou, VideoWebTown, VidPK, ViiKii.net, Vimeo, Vioku, VReel.net, WeGame, WorldStarHipHop, Yahoo Videos, Yikers, Yobler, Youku, YourFileHost, YouSportz, Youtube, YummyBun, Zoopy, zShare.net

phortize
2010-01-31, 09:43
hi! just woke up. i have some italian tv links working, but they are such *******s to check if you're using silverlight! thats why i need to change the user agent. its the same i do on my desktop pc, there i used to change the vlc user agent and it does the trick. anyway, its true that the mediaset links worked out of the box till some days ago, now they arent working anymore and probably not because the user agent (they simply closed them i guess) but the rai ones should still work with the user agent workaround. im not sure actually because i didnt touch my desktopo since i own the n900!! im going to look at it and answer your questions in a couple of hours. again, thank you for your interest in this area. and beg my sunday morning english :)

phortize
2010-01-31, 10:50
what i've discovered so far:

1. there are a lot of italian tvs streaming on the web
2. almost all of them is either from rai group (state tv, berlusconi controlled) or mediaset group (berlusconi owned)
3. the rai streamings has several restrictions to be "hacked":
3.1 they check for your ip if its from italy you can stream otherwise not;
3.2 they chek if you're streaming from silverlight and block you if your not;
3.2.1 that block once it was easily workarounded with user agent changing
(in vlc, user agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009020911 Ubuntu/8.10 (intrepid) Firefox/3.0.6)
3.2.2 now its even more difficult because you got to use a non-standard http header in order to pretend to be using it; using vlc in ubuntu, from terminal: (wget --header="viaurl: www.rai.tv" [here the strean URL] -O - | vlc --http-user-agent="Linux" -)
4. the mediaset streaming used to be without restrictions till some days ago, now is reported to be checking for silverlight as well (maybe not for your country; maybe its not true, maybe they simply removed them).
4.1 mediaset streamings are not working by simply changing the vlc user agents, maybe they check for the header too and at the moment i dont have a linux box at hand and cant check for it. im not able to change the header from this xp machine im typing from.
5. so the problem is bigger i guess: we should not only find a way to change mplayer user agent but also how to put a non-standard http header on it.
6. there's a way to run vlc on the n900, maybe inside a debian chroot as per iceweasel and open office? then it would be easier i guess.

thats what i know at the moment. ill try to investigate about it some more. sorry for the casual ******** i could have said, im a linux noob and my english is awful. :)

these are my sources on this matter:

http://flavio.tordini.org/dirette-raitv-senza-silverlight-o-moonlight

http://www.mambro.it/guardare-i-canali-rai-senza-silverlight/

http://www.maemoitalia.com/guarda-la-tv-con-il-tuo-nokia-n900/

http://wiki.multimedia.cx/index.php?title=MPlayer_FAQ

there you will find also the link for it tv streamings.

thank you again!

slender
2010-01-31, 11:25
thats nice. Megavideo from microb was unwatchable but with direct link and mplayer it streams smoothly. Sad that this is so hard. I wonder why this was not optimized out of box because it looks like that it needs just some quirks. (operas browser.js for example makes some modification to some webpages on fly)

btw. Only way i was able to get link was long press to download flv button and selecting add bookmark and from there you could copy url. There is no copy link for me on popup menu.

Bec
2010-01-31, 11:26
Ok, I have never gone so far for hacking streams. The "usual" way for me, in win XP is to "fish" the streamed file out of opera browser cache (8.xx works great, 9.xx file is locked, 10.xx some restrictions).
1. start the video in the browser
2. pause or mute
3. drag the cache file over mplayer

Being a linux noob myself even if I'd find the streaming cache file (no idea where to even start looking for it) I suspect it might be locked.

I usually avoid clipnabber on my pc since it's an online service that can be down or even banned, and it requires the page source... Too much work when I can simply drag a file from opera cache.

On the other hand the clipnabber way is somewhat easier on N900 than browsing through a lot of files, opening terminal and finally starting the video...

But provided we would know the cache location, an xterminal shortcut could be made to directly start a rooted xterm in the cache folder with the command to list the largest files first.
Finding the video stream is easy since cache files rarely have above 500kb.

Then the only thing you would need to do would be to apply the ip, user agent and header tricks into the browser. I suspect a complicated html crafted by professionals could overcome the header issue...

slender
2010-01-31, 11:32
btw. if you are using desktop pc you can normally get direct flash link with firebug.

Bec
2010-01-31, 11:35
thats nice. Megavideo from microb was unwatchable but with direct link and mplayer it streams smoothly. Sad that this is so hard. I wonder why this was not optimized out of box because it looks like that it needs just some quirks. (operas browser.js for example makes some modification to some webpages on fly)

Please vote for this, it's the first link in my sig. I'm surprised by the lack of interest and how no one seems to be bothered by this... made a brainstorm, made a thread, I spam them with every post I make yet there's only 7 votes.
Does nobody watch web tv anymore?
And why watch anything in the browser? You have to full-screen anyway, the buttons are ridiculously small and the cpu-usage & battery drain are huge.
To see captions on youtube? that's the only advantage you would have and youtube is nothing but a drop in the ocean regarding internet video.

btw. Only way i was able to get link was long press to download flv button and selecting add bookmark and from there you could copy url. There is no copy link for me on popup menu.
Nope there isn't (that's why I mentioned the bookmark, as some kind of "replacement"), the same way there isn't "show page source" in microb.
What's the use to have the most advanced mobile browser ever made when (I really do consider them) basic functions are capped???

slender
2010-01-31, 12:57
I think we need some sort of extension to microb which strips configured webpages (youtube, megavideo, dailymotion, vimeo etc) with some script which replaces embedded video area with link to external (mplayer) video player. I do not know if this is possible, but i do know that making it is beyond my skills. Quite sad that this device has full potential play flash videos (not hd) inside webpages but on most of pages its jerky.

Bec
2010-02-07, 12:29
I started checking out scripts.

Here's something that might be useful for RAI: http://userscripts.org/scripts/show/61782

jim_0068
2010-02-09, 10:04
just wanted to let you know that i was able to follow both steps from your original post via the painful way and also the user script way. BTW i found that this script is rather superior for youtube:

http://userscripts.org/scripts/show/25105

it throws up a small download option that allows you to download to your device or if you copy the linked address and put it in mplayer it will stream. It's an extra step of course to watch youtube videos BUT it allows you to watch them in much better quality.

i wish someone would create a youtube app that grabs the mp4 file as it would negate this whole step but i digress.

http://2.bp.blogspot.com/_ZaGO7GjCqAI/SyuzEkXekSI/AAAAAAAAR2Y/n2YHS6cXbHk/s640/download-youtube-mp4-hd.png

Bec
2010-02-09, 10:15
You could try Canola, MyTube or zoutube.

MyTube is by far the most advanced one but it hasn't been updated for quite a while:
http://talk.maemo.org/showthread.php?t=37000&page=4

jim_0068
2010-02-12, 17:27
zoutube still doesn't download the high quality mp4 video though :(

tamps883
2010-02-20, 15:43
hi, i'm real noob with this device and i wanted to know what is clipnabber, only thing i could do was to add megavideo link to .txt file. Plaese help me

tamps883
2010-02-20, 19:14
i got it now, but when i paste the link and press play, it says buffering and loading icon comes, but in 5 seconds it desapear and looks like nothing happens. what did i di wrong?

cjsegninir
2010-03-16, 15:48
I got lost in the thread... Sorry about that.
What would be the simple/easiest/reliable way to watch megavideo?
Regards!

Bec
2010-03-16, 16:54
http://userscripts.org/scripts/show/42944 install this in greasemonkey.

Save the vid and open it with kmplayer(you don't have for the dl to finish to start the vid).

cjsegninir
2010-03-16, 17:32
Thanks Bec.
But this will download the video to the device, is there a way to just stream it?

Bec
2010-03-16, 18:38
No, there was a mplayer pug-in for N800 and firefox but it's no longer maintained.

I think Bundyo is quite skilled with scripts and he could help you start the video directly. Considered that the hard part (getting the flv) is accomplished, launching it in mplayer shouldn't be hard for someone with experience in scripting.