To play the video of the current page, select the “Pass URI of current tab to external command” and add your keybinding there. To assign a keybinding to play the video of the selected link, select the “Pass URI of current link to external command” and press a to add a keybinding, and enter the keybinding you want to use in the “Keystroke” field. With the latter you’d have to be on the page that contains the video. With the former, you don’t actually have to browse to the page of the Youtube video you want to view, but can just select the link to that page from your Youtube search results list. You can assign a keybinding to tell Elinks to view the Youtube video of either the selected link, or of the current page. You now have two options (or three if you decide to use both). Open the first section called “Main mapping” with the + key. Close the Options manager if you haven’t done so already (press c) and open the “Keybindings manager” (press k or go to “Setup > Keybindings manager” in the menu). Now you need to assign a keybinding to this script, so that you can tell Elinks to launch it when you want to view a Youtube video. You should see the following window:Īdd the command utube %c (replace utube with whatever you called the above script) into the “Value” field as in the above picture, press Enter, and press v to save the new settings. Select the newly created entry and press e to edit it. Navigate to that section and press a to add an entry, and give it an appropriate name (I called mine youtube). At the very end of the the list (just before the next section, ECMAScript) there is an subsection called “URI passing”. Select the category “Document” and press + to show all the options. Now start elinks, and go to the “Options manager” by pressing o or through the menu (press Escape) in Setup > Options manager. Save the script somewhere in one of your executable paths (I have it in /usr/local/bin as utube), and make it executable ( chmod +x filename). Mplayer -vc ffflv -ac mp3 -cache 300 -prefer-ipv4 $video_url > /dev/null 2>&1 Once youtube-dl is installed, create the following script: If you use Debian Testing, download the package from the sid repostories and install that ( dpkg -i youtube-dl_2009.09.13-2_all.deb), as for some reason it has not made its way to the Testing repos. Youtube-dlįirst download and install youtube-dl, which is available in the repositories of most distros. Both methods use mplayer to play the video, though you could adapt both to use any other media player that plays flash videos if you so prefer. I will describe two ways here, one using youtube-dl (wholly following finferlu’s explanations) and the other clive (or cclive if you prefer that). It is, however, possible to use Elinks in combination with other applications to access and view the flash videos on Youtube and other such sites. Youtube, or other websites that host flash videos, are fairly useless in Elinks, as you can’t access that what they are all about (and, let’s admit, no one really wants to read the comments on Youtube…) Elinks is a great browser, but rather limited when it comes to websites that use more than just text.
0 Comments
Leave a Reply. |