maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   How do I install 'hls-player' on N900 (https://talk.maemo.org/showthread.php?t=43488)

sophocha 2010-02-05 16:33

How do I install 'hls-player' on N900
 
http://gitorious.org/hls-player/page...aming+player++

Any help on this.How do I install this?If I run the command it asks me for a password.Do I have to put the files first on the phone and then run the command?I`m new to linux.....any help is appreciated!

sophocha 2010-02-05 19:18

Re: How do I install 'hls-player' on N900
 
Anyone? this is really important as it will allow the UK folks to stream .m3u8 files from catchup tv....FREE TV FOR EVERYBODY!

fms 2010-02-05 19:24

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by sophocha (Post 512261)
Anyone? this is really important as it will allow the UK folks to stream .m3u8 files from catchup tv....FREE TV FOR EVERYBODY!

Your ability to watch free TV is not important to me.

MSHAH 2010-02-05 19:27

Re: How do I install 'hls-player' on N900
 
if its askng for a password u should install rootsh, check in the downloads section, use the link there.

sophocha 2010-02-05 19:27

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by fms (Post 512265)
Your ability to watch free TV is not important to me.

well, it is for some folks....take it this way, this is another PLUS for the N900, its ability to stream m3u8 files!The more the better!

sophocha 2010-02-05 19:28

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by MSHAH (Post 512273)
if its askng for a password u should install rootsh, check in the downloads section, use the link there.

I`ve already done it.I`ve install rootsh when I installed winscp.Do I have to install ti again?I have total access to my files through wifi with winscp.That means rootsh works right?

MSHAH 2010-02-05 19:38

Re: How do I install 'hls-player' on N900
 
i think youre talkng about something else, install it on your phone then try the sudo gainroot command then you'll have what the phone calls 'superuser' priviledges

sophocha 2010-02-05 19:41

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by MSHAH (Post 512289)
i think youre talkng about something else, install it on your phone then try the sudo gainroot command then you'll have what the phone calls 'superuser' priviledges

I think rootsh is installed because when i type sudo gainroot in xterminal I go straight to home/user....does this mean I have superuser priviledges?

My problem is how do I go about installing the setup.py file ( and the hls files in the folder) on my phone? Do I copy the files on the phone somewhere and excecute the sudo python setup.py install command?

MSHAH 2010-02-05 19:51

Re: How do I install 'hls-player' on N900
 
oh yeah well in that case you do have those priviledges. im not too familiar with python. but when installing .deb files i download them onto my device then run the command dpkg -i /ilepath/filename.deb then if anythng goes wrong i run dpkg --configure -a. try googling it mate

MSHAH 2010-02-05 19:53

Re: How do I install 'hls-player' on N900
 
anything and everything i know about linux/maemo, i learnt from here so your answers sure to pop up. thank god for the maemo community!

sophocha 2010-02-05 19:54

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by MSHAH (Post 512300)
oh yeah well in that case you do have those priviledges. im not too familiar with python. but when installing .deb files i download them onto my device then run the command dpkg -i /ilepath/filename.deb then if anythng goes wrong i run dpkg --configure -a. try googling it mate

Thanks....google is not my friend today :( I guess I have to search some more

danramos 2010-02-05 19:57

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by MSHAH (Post 512273)
if its askng for a password u should install rootsh, check in the downloads section, use the link there.

You have to root an N900 just to get it to play an m3u (playlist) stream??

sophocha 2010-02-05 20:09

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by danramos (Post 512306)
You have to root an N900 just to get it to play an m3u (playlist) stream??

It`s an m3u8 file (http streaming), and it doesn`t play with the standard media player nor kmplayer.I think the only way is to install this hls-player and then presto, you can stream it.

Any python guys around to shed some light to this.How can we install a .py file?

This is the content of the ziped folder:

1) There is a setup.py file
2) There is a HLS folder containing:
player.py
m3u8.py
fetcher.py
_init_.py

zaheerm 2010-02-05 20:15

Re: How do I install 'hls-player' on N900
 
You don't need to install it. It is a command line player, just untar it like you have and run:

python player.py <url>

zaheerm 2010-02-05 20:16

Re: How do I install 'hls-player' on N900
 
You don't need to install it. It is a command line player, just untar it like you have and run:

python player.py <url>

sophocha 2010-02-05 20:22

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by zaheerm (Post 512321)
You don't need to install it. It is a command line player, just untar it like you have and run:

python player.py <url>

Thank you for this.....and where do I untar these? Under home/user or anywhere i like?

sophocha 2010-02-05 20:27

Re: How do I install 'hls-player' on N900
 
I`ve run the command and it says:

file 'player.py', line 26, in <module>
from twisted.internet import gtk2reactor
import error: no module named twisted.internet



hm....

danramos 2010-02-05 20:33

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by zaheerm (Post 512319)
You don't need to install it. It is a command line player, just untar it like you have and run:

python player.py <url>

Whew.. okay.

sophocha 2010-02-10 12:49

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by sophocha (Post 512332)
I`ve run the command and it says:

file 'player.py', line 26, in <module>
from twisted.internet import gtk2reactor
import error: no module named twisted.internet



hm....

Can anybody help on this error?Why can it not find twisted.internet?

omeriko9 2010-02-10 12:54

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by fms (Post 512265)
Your ability to watch free TV is not important to me.

Disgusting.

b666m 2010-02-10 12:56

Re: How do I install 'hls-player' on N900
 
try to install vlc.
i think it can open m3u8-playlists. :)

sophocha 2010-02-10 12:58

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by omeriko9 (Post 519311)
Disgusting.

Don`t worry, I`ve already forgive him....ehehe

sophocha 2010-02-10 13:00

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by b666m (Post 519318)
try to install vlc.
i think it can open m3u8-playlists. :)

...let me try this.I`ll report back

Marshall Banana 2010-02-10 13:53

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by sophocha (Post 519305)
Can anybody help on this error?Why can it not find twisted.internet?

Most likely because you have not installed python-twisted. Twisted is a networking engine for python.
Here is a list of the python modules available for fremantle: http://bit.ly/94U7XC

You can install a module with the following command (you need to be root):
apt-get install <module Name>

sophocha 2010-02-10 16:25

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by Marshall Banana (Post 519411)
Most likely because you have not installed python-twisted. Twisted is a networking engine for python.
Here is a list of the python modules available for fremantle: http://bit.ly/94U7XC

You can install a module with the following command (you need to be root):
apt-get install <module Name>

Thank you for this!Now I don`t have any twisted internet errors, however I have another error :) its a syntax error this time.

I type 'sudo gainroot' and I`m at home/user.There I have the player.py and all the files from the hls player.

I type 'python player.py <url>' and I get '/bin/sh: syntax error: newline unexpected'

Any help?

Thanks (I`m trying to learn some basic linux commands, I`m a noob so bear with me)

Marshall Banana 2010-02-10 17:31

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by sophocha (Post 519668)
Thank you for this!Now I don`t have any twisted internet errors, however I have another error :) its a syntax error this time.

I type 'sudo gainroot' and I`m at home/user.There I have the player.py and all the files from the hls player.

I type 'python player.py <url>' and I get '/bin/sh: syntax error: newline unexpected'

Any help?

Thanks (I`m trying to learn some basic linux commands, I`m a noob so bear with me)

Try to enclose the url with single quotes or double quotes, otherwise the shell tries to interpret the url as a command and this may be the source of your problem.

sophocha 2010-02-10 17:47

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by Marshall Banana (Post 519795)
Try to enclose the url with single quotes or double quotes, otherwise the shell tries to interpret the url as a command and this may be the source of your problem.

This is driving me nuts!

I`ve tried it with the quotes, now it says:

ImportError: No module named HLS
/home/user # hls-player
/bin/sh: hls-player: not found

Do I have to put any files in /bin/sh ???
I have the required .py files in /home/user

Thanks

sophocha 2010-02-10 17:55

Re: How do I install 'hls-player' on N900
 
This is what the author says about the hls-player.In the author`s tar file, there is no such a thing as 'hls-player'!Only python files (player.py, setup.py, bla bla)....Am I missing something here???The python player.py command doesn`t work because it needs the hls-player in /bin/sh???


http live streaming player
A simple HTTP Live Streaming player written in Python, using GStreamer.

Installation:

sudo python setup.py install
Play the sample clip from Apple:

hls-player http://devimages.apple.com/iphone/sa...bipbopall.m3u8
or RTVE:

hls-player http://iphonelive.rtve.es/stream1.m3u8 -r http://m.rtve.es/live/
And that is the command line help:

Usage: hls-player [options] url...

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose print some debugging (default: False)
-b BITRATE, --bitrate=BITRATE
desired bitrate (default: 200000)
-k KEEP, --keep=KEEP number of segments ot keep (default: 3, -1: unlimited)
-r URL, --referer=URL
Sends the "Referer Page" information with URL
-D, --no-display display no video (default: False)
-s, --save save instead of watch (saves to /tmp/hls-player.ts)
-p PATH, --path=PATH download files to PATH
-n N, --number=N number of player to start (default: 1)

sophocha 2010-02-10 18:33

Re: How do I install 'hls-player' on N900
 
any help....i really learned so much the past month...linux is growing on me...ehehe

b666m 2010-02-10 18:38

Re: How do I install 'hls-player' on N900
 
what link/playlist are you trying to open?

sophocha 2010-02-10 19:05

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by b666m (Post 519886)
what link/playlist are you trying to open?

basically if this works we can all enjoy free UK tv on our N900 (tvcatchup streams), but any .m3u8 streams would do.

Marshall Banana 2010-02-10 19:41

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by sophocha (Post 519812)
This is driving me nuts!

I`ve tried it with the quotes, now it says:

ImportError: No module named HLS
/home/user # hls-player
/bin/sh: hls-player: not found

Do I have to put any files in /bin/sh ???
I have the required .py files in /home/user

Thanks

The problem is: In the file player.py a module named HLS get's imported. The way you a trying to work (untar the sources and execute python player.py <url>) is not working because you need to install the module HLS first. Roughly speaking this file named __init__.py in the HLS directory is the HLS module.
You can check if the module HLS exists by starting python in the terminal and type import HLS in the interactive console.

This is the way to install it:
download the source tarball from here: http://gitorious.org/hls-player/hls-...commits/master
open terminal and become root and unpack the source tarball
go into the directory where setup.py is and the HLS directory
Execute the following command: python setup.py install (For this you will need to have python-setuptools installed)
This will make the module HLS available in python

Now you can test your player again :)

Good luck

sophocha 2010-02-10 20:23

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by Marshall Banana (Post 520012)
The problem is: In the file player.py a module named HLS get's imported. The way you a trying to work (untar the sources and execute python player.py <url>) is not working because you need to install the module HLS first. Roughly speaking this file named __init__.py in the HLS directory is the HLS module.
You can check if the module HLS exists by starting python in the terminal and type import HLS in the interactive console.

This is the way to install it:
download the source tarball from here: http://gitorious.org/hls-player/hls-...commits/master
open terminal and become root and unpack the source tarball
go into the directory where setup.py is and the HLS directory
Execute the following command: python setup.py install (For this you will need to have python-setuptools installed)
This will make the module HLS available in python

Now you can test your player again :)

Good luck

I really appreciate your help!I have managed to install everything correctly as you said.Now for actually playing a video stream this is another story!ehehehe....I`ve tried couple of links, a video player comes up but it doesn`t play anything....if I go to the xterm...surprise surprise, a million errors!!!

I think I`m going to stop here....this is beyong my knowledge of linux.One error after the other.

I would aprreciate it though if you could at least try it and see if it actually works with an .m3u8 stream from tvcatchup.Somebody could benefit from this.....making a GUI for hls-player?

Thanks

b666m 2010-02-10 20:27

Re: How do I install 'hls-player' on N900
 
did you try vlc?

Marshall Banana 2010-02-10 20:41

Re: How do I install 'hls-player' on N900
 
You are welcome :). Im a big fan of iptv myself. For Germany there is a similar service like tvcatchup called Onlinetvrecorder which i use quite often. I once tried to get access to tvcatchup but never managed it. At that time tvcatchup was closed down because of legal issues i think.

When i try to launch hls-player gstreamer crashes:
Code:

hls-player -r http://m.rtve.es/live/ http://iphonelive.rtve.es/stream1.m3u8
TypeError: <lambda>() takes exactly 1 argument (2 given)
Error: GStreamer encountered a general stream error. gstomx_base_filter.c(731): pad_chain (): /GstPipeline:player/GstDecodeBin2:decodebin/GstOmxH264Dec:omxh264dec0:
OpenMAX component in wrong state
ERROR:root:http://iphonelive.rtve.es/stream1/0/384/br109191337-0007137.ts
ERROR:twisted:Unhandled Error
Traceback (most recent call last):
Failure: twisted.web.error.Error: 404 Not Found

Traceback (most recent call last):
Failure: twisted.web.error.Error: 404 Not Found

I think this issue with gstreamer can be solved somehow, maybe gstreamer can't handle the transport-stream or it is initialized incorrectly.
If i just dump the stream i can watch it with mplayer:
hls-player -D -s -p . -k 100 -r http://m.rtve.es/live/ http://iphonelive.rtve.es/stream1.m3u8
mplayer *.ts
I saw small chunks of a brazilian/spanish tv show :)

EDIT: If you can post a url of tvcatchup i will try it

sophocha 2010-02-10 20:56

Re: How do I install 'hls-player' on N900
 
sure.try this one:

http://84.234.23.231:1935/iphone/iphone_bbcone.sdp

sophocha 2010-02-10 21:07

Re: How do I install 'hls-player' on N900
 
one more question....how can I uninstall all of these stuff (python and the hlsplayer) in case I need to?

Marshall Banana 2010-02-10 21:36

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by sophocha (Post 520139)

The url does not work for me, i get this response:
Code:

<html><head><title>disconnect flash client</title></head><body><BR>ERROR: null<BR>Disconnected: 0</body></html>
I think there's some login mechanism that prevents me from accessing the stream.

sophocha 2010-02-10 21:42

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by Marshall Banana (Post 520184)
The url does not work for me, i get this response:
Code:

<html><head><title>disconnect flash client</title></head><body><BR>ERROR: null<BR>Disconnected: 0</body></html>
I think there's some login mechanism that prevents me from accessing the stream.

http://www.tvcatchup.com/

You are right you have to be logged in to play the streams.Its the same error im getting as well.

[DarkGUNMAN] 2010-03-04 00:12

Re: How do I install 'hls-player' on N900
 
Quote:

Originally Posted by b666m (Post 520082)
did you try vlc?

Tried installing VLC from Qole's repository. Downloaded a playlist from TVCatchup then ran it with VLC immediately.. heres the terminal dump..
The first frame displays and freezes. I have to close it myself then type quit to return to the terminal.

Code:

/MyDocs $ vlc playlist.m3u8
VLC media player 1.1.0-git Yellow Bastard
LibVLC has detected an unusable buggy GNU/libc version.
Please update to version 2.8 or newer.
[0x128a8] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Remote control interface initialized. Type `help' for help.
libdvbpsi error (PSI decoder): TS discontinuity (received 15, expected 0) for PID 0
libdvbpsi error (PSI decoder): TS discontinuity (received 15, expected 0) for PID 4095
[0xa94d8] ts demux error: MPEG-4 descriptor not found
[0xc0ae8] packetizer_mpeg4audio decoder: AAC channels: 1 samplerate: 48000
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
[0x17b428] main generic error: A filter to adapt decoder to display is needed
[0x17b428] xcb_xv generic error: Unknown request in XCB vout display
[0xaf2f8] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
[0x17b428] xcb_xv generic error: Unknown request in XCB vout display
number of reference frames exceeds max (probably corrupt input), discarding one
number of reference frames exceeds max (probably corrupt input), discarding one
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
[0xaf2f8] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
number of reference frames exceeds max (probably corrupt input), discarding one
number of reference frames exceeds max (probably corrupt input), discarding one
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
[0x17b428] xcb_xv generic error: Unknown request in XCB vout display
[0xaf2f8] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
channel element 0.0 is not allocated
channel element 0.0 is not allocated
channel element 0.0 is not allocated
number of reference frames exceeds max (probably corrupt input), discarding one
number of reference frames exceeds max (probably corrupt input), discarding one
channel element 0.0 is not allocated
channel element 0.0 is not allocated



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

vBulletin® Version 3.8.8