Reply
Thread Tools
Posts: 230 | Thanked: 302 times | Joined on Oct 2009 @ Helsinki, Suomi (Finland)
#1
This is mainly for Finns out there.

yle-dl is an rtmpdump frontend for downloading videos from Finnish national broadcaster Yle: Yle Areena, and Elävä Arkisto. yle-dl is created by Antti Ajanki.

Install these rtmpdump packages first:
librtmp0_2.4-2_armel.deb
rtmpdump_2.4-2_armel.deb

Then download yle-dl archive (modified interpreter directive from python2 to python, otherwise same as original):
yle-dl_2.2.1.tar.bz2

Extract it and copy resulting yle-dl script into a directory in your $PATH. (I use ~/bin, but /usr/local/bin is ok too)

To download videos open the terminal application (f.e. meego-terminal) and run yle-dl with --vfat flag and use areena page as argument.
For example:
Code:
$ cd MyDocs/Movies
$ yle-dl --vfat http://areena.yle.fi/tv/1610991

As a bonus here's a nice little script to use as command line UI for watching Yle channels live. (needs mplayer, the package from openrepos should work):
Code:
#!/bin/sh
#################
# select stream #
#################
chname1="YLE TV1"
chstrm1="http://areena.yle.fi/tv/suora/tv1"
chname2="YLE TV2"
chstrm2="http://areena.yle.fi/tv/suora/tv2"
chname3="YLE Fem"
chstrm3="http://areena.yle.fi/tv/suora/fem"
chname4="YLE Teema"
chstrm4="http://areena.yle.fi/tv/suora/teema"

channel=1
while [ "$channel" != q ] 
do
	clear
	trap - INT
	echo ""
	echo -e "1. $chname1\n2. $chname2\n3. $chname3\
	\n4. $chname4"
	echo ""
	echo -n -e "Select channel nr. (Ctrl+c to quit): "
	read -n1 channel
	echo ""
	trap '' INT

	if [ $channel = 1 ]
	then
		echo -e "\nPreparing to stream $chname1"...
		yle-dl --live $chstrm1 -o - | mplayer -fs -
    	fi

	if [ $channel = 2 ]
	then
		echo -e "\nPreparing to stream $chname2"...
		yle-dl --live $chstrm2 -o - | mplayer -fs -
	fi

	if [ $channel = 3 ]
	then
		echo -e "\nPreparing to stream $chname3"...
		yle-dl --live $chstrm3 -o - | mplayer -fs -
	fi

	if [ $channel = 4 ]
	then
		echo -e "\nPreparing to stream $chname4"...
		yle-dl --live $chstrm4 -o - | mplayer -fs -
	fi
done
Create a new file named strsel.sh and paste above code into it. Make the file executable with chmod 755 strsel.sh and put it into a directory in your $PATH.

When you run strsel.sh you can select Yle channels with the on screen keyboard and the selected channel will start playing fullscreen. To stop playback simply swipe down and you'll be back in the channel selection menu. Sound lags in the beginning, but will usually sync later on.

Making apps view shortcut is left as user exercise.

Last edited by ladoga; 2014-11-22 at 19:44.
 

The Following 12 Users Say Thank You to ladoga For This Useful Post:
Posts: 334 | Thanked: 616 times | Joined on Sep 2010
#2
Thanks Ladoga, much appreciated.

Aegis rejects python-central, python-crypto and libgmp3. Open mode or inception probably required. Will try with latter.

Update: Ok, now installed. Libgmp3c2 must be incepted first, then python-central and python-crypto. Then 'apt-get install yle-dl' will do for the rest.

Have to learn to use the thing; yle-dl [url] --destdir [path] doesn't seem to be enough at least with the two broadcasts I tried.

Update2: Ok, silmä käteen, or how the usage says it:
yle-dl [url] --sublang fi --vfat --destdir [path to MyDocs]

Works fine!

Last edited by Manatus; 2012-07-04 at 17:14.
 

The Following 2 Users Say Thank You to Manatus For This Useful Post:
Posts: 230 | Thanked: 302 times | Joined on Oct 2009 @ Helsinki, Suomi (Finland)
#3
Originally Posted by Manatus View Post
Thanks Ladoga, much appreciated.

Aegis rejects python-central, python-crypto and libgmp3. Open mode or inception probably required. Will try with latter.
Inception or openmode shouldn't be needed. I have neither installed. Dependencies you mention are from offical nokia repositories so that would be odd. IIRC Aegis throws some warnings when installing one of python packages, but those can be ignored. I last tried install on clean system on pr1.2 so maybe something has changed after that? Can others confirm? You should be able to install yle-dl by simply tapping the links to rtmpdump and yle-dl packages in web browser (worked in fennec atleast) or downloading them and tapping in filemanager (for example filebox).

You are right that --vfat flag is necessary when downloading into ~/MyDocs which resides in FAT partition. Other flags are optional and subs get downloaded by default. For mplayer to display subtitles with correct encoding you need to use -utf8 flag. I guess it should also work in kmplayer if you add corresponding line (utf8=true) to ~/.mplayer/config and set kmplayer to use mplayer as backend.

You can watch live broadcasts too (with mplayer). Just start to play the file while it's downloading. I watched football European Championships live on the phone.

Last edited by ladoga; 2012-07-04 at 18:50.
 

The Following User Says Thank You to ladoga For This Useful Post:
Posts: 334 | Thanked: 616 times | Joined on Sep 2010
#4
Originally Posted by ladoga View Post
Inception or openmode shouldn't be needed. I have neither installed. Dependencies you mention are from offical nokia repositories so that would be odd. IIRC Aegis throws some warnings when installing one of python packages, but those can be ignored. I last tried install on clean system on pr1.2 so maybe something has changed after that? Can others confirm?

You are right that --vfat flag is necessary when downloading into ~/MyDocs which resides in FAT partition. Other flags are optional and subs get downloaded by default. For mplayer to display subtitles with correct encoding you need to use -utf8 flag. I guess it should also work in kmplayer if you add corresponding line to ~/.mplayer/config and set kmplayer to use mplayer as backend.
Thanks for the extra tips.

I have cleaned up (reflashed fully just 3 days a go) pr1.2 device with OTA pr1.3 installed. I had installed Inception this morning but otherwise the setup was clean.

The error message was:

"Aegis rejecting [package]: package [package] origin cannot be determined -- signature check failed"
for all those three packages. Rtmpdump and yle-dl were alright.
I do have allow installation from unknown sources and dev-mode enabled, so unfortunately it couldn't have been that. I also did apt-get update before doing apt-get install.

Before these reject lines there were the lots of 'duplicate hash entries' messages for crypto cipher modules, and I got those during inception too but I ignored them.
 

The Following User Says Thank You to Manatus For This Useful Post:
OVK's Avatar
Posts: 559 | Thanked: 1,017 times | Joined on May 2008 @ Finland
#5
Originally Posted by ladoga View Post
This is mainly for Finns out there.

yle-dl is an rtmpdump frontend for downloading videos from Finnish national broadcaster Yle: Yle Areena, and Elävä Arkisto. yle-dl is created by Antti AjankiAjan

If you have rzr's legendary Harmattan Community Repository set up, you can just:
Code:
# apt-get update && apt-get install yle-dl
Or alternatively you can get the necessary packages here:
rtmpdump_1.9-1_armel.deb
yle-dl_2.0.0-1_all.deb

Install rtmpdump package first, then yle-dl.

To download videos open the terminal application (f.e. meego-terminal) and run yle-dl with --vfat flag and use areena page as argument.
For example:
Code:
$ cd MyDocs/Movies
$ yle-dl --vfat http://areena.yle.fi/tv/1610991
Have fun.
Is rzr's repo the same one that is available from MeeCatalog?

For some reason I can't install this with apt-get, I just get message "Keskeytetty" (Terminated) after apt-get update.



EDIT: stupid me. Even if terminal asks "continue?" (K/e) it actually means "continue" (y/n)... So don't answer _K_yllä, answer _Y_es...

Aegis gave some warnings but did not prevent installation.
__________________
Hattivattein lauma sankka suur!

Last edited by OVK; 2012-07-10 at 09:28.
 

The Following 2 Users Say Thank You to OVK For This Useful Post:
Posts: 230 | Thanked: 302 times | Joined on Oct 2009 @ Helsinki, Suomi (Finland)
#6
Originally Posted by OVK View Post
EDIT: stupid me. Even if terminal asks "continue?" (K/e) it actually means "continue" (y/n)... So don't answer _K_yllä, answer _Y_es...

Aegis gave some warnings but did not prevent installation.
Not stupid you, but a stupid bug that needs fixing. I don't think that apt-get behaves that way in debian.

Anyway, thanks for feedback.
 

The Following User Says Thank You to ladoga For This Useful Post:
Posts: 182 | Thanked: 337 times | Joined on May 2010 @ Finland
#7
Is it difficult to buld UI for this ? Typing the address and --vfat needs too many keystrokes, with UI only copy/paste is needed.
 
OVK's Avatar
Posts: 559 | Thanked: 1,017 times | Joined on May 2008 @ Finland
#8
Originally Posted by Metsämies View Post
Is it difficult to buld UI for this ? Typing the address and --vfat needs too many keystrokes, with UI only copy/paste is needed.
A Firefox plugin would be nice
__________________
Hattivattein lauma sankka suur!
 
Posts: 230 | Thanked: 302 times | Joined on Oct 2009 @ Helsinki, Suomi (Finland)
#9
Originally Posted by Metsämies View Post
Is it difficult to buld UI for this ? Typing the address and --vfat needs too many keystrokes, with UI only copy/paste is needed.
You can paste the URL to command line too.

Originally Posted by OVK View Post
A Firefox plugin would be nice
Yes a firefox plugin would be probably the easiest and most usable method.

However I'm just an end user - with no coding background - who learned debian packaging by making this yle-dl package. So anyone of you would be as qualified as me to write the plugin. If one has need one can learn.

I myself am fairly content with the CLI. (actually I'm thrilled to have it on the phone.) Never say never, though.

Last edited by ladoga; 2012-07-12 at 20:36.
 

The Following User Says Thank You to ladoga For This Useful Post:
Posts: 230 | Thanked: 302 times | Joined on Oct 2009 @ Helsinki, Suomi (Finland)
#10
Here's some more tips for viewing those videos with MPlayer.


To get rid of the screen blanking you can add higher timeout values to the phone's display settings menu.

To list current settings:
Code:
$ gconftool-2 -a /system/osso/dsm/display
To add 10800sec (3 hours) timeout:
Code:
$ gconftool-2 --type-list --list-type int --set /system/osso/dsm/display/possible_display_dim_timeouts [15,30,60,120,300,10800]
Some useful ~/.mplayer/config options (to autoload subs and improve performance a bit.)
Code:
sub-fuzziness=1        # don't be too picky about filenames
slang=fi,fin,en,eng    # autoload sub priority
double=1               # double buffering
framedrop=1            # enable framedrop
fs=1                   # enable full screen
utf8=1                 # enable UTF-8 encoded subs
For more go to mplayer manpage

To enable pausing video by tapping the screen

Create a file named ~/.mplayer/input.conf with the following content:
Code:
MOUSE_BTN0 pause
If someone has ideas how to seek back/forth without switching back to meego-terminal and using arrow keys I'm all ears.

Piping yle-dl output straight to mplayer goes like this:
Code:
$ yle-dl http://areena.yle.fi/tv/1577834 -o - | mplayer -cache 4096 -
Try it, very handy when you want to begin watching immediately or when watching live broadcast.
 

The Following 3 Users Say Thank You to ladoga For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 14:38.