LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-23-2018, 01:10 PM   #5146
jowski
Member
 
Registered: Aug 2007
Posts: 117

Rep: Reputation: 9

Quote:
Originally Posted by tonycpsu View Post
Ah, my guess is you're running from the version in PyPI, which doesn't contain the new inning feature.

Try pip install -U git+https://github.com/tonycpsu/mlbstreamer/ or wait until I can push a new release to PyPI.
BINGO!

Jim
 
Old 04-23-2018, 02:51 PM   #5147
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled
First of all, thank you for the help! :-)
Up to now I got at least mlbstreamer running. Now, starting a game this happens:
Quote:
lars@acer:~$ ~/.local/bin/mlbstreamer
Traceback (most recent call last):
File "/home/lars/.local/bin/mlbstreamer", line 11, in <module>
sys.exit(main())
File "/home/lars/.local/lib/python2.7/site-packages/mlbstreamer/__main__.py", line 409, in main
state.loop.run()
File "/home/lars/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 286, in run
self._run()
File "/home/lars/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 384, in _run
self.event_loop.run()
File "/home/lars/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 788, in run
self._loop()
File "/home/lars/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 825, in _loop
self._watch_files[fd]()
File "/home/lars/.local/lib/python2.7/site-packages/urwid/raw_display.py", line 404, in <lambda>
event_loop, callback, self.get_available_raw_input())
File "/home/lars/.local/lib/python2.7/site-packages/urwid/raw_display.py", line 502, in parse_input
callback(processed, processed_codes)
File "/home/lars/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 411, in _update
self.process_input(keys)
File "/home/lars/.local/lib/python2.7/site-packages/urwid/main_loop.py", line 511, in process_input
k = self._topmost_widget.keypress(self.screen_size, k)
File "/home/lars/.local/lib/python2.7/site-packages/urwid/wimp.py", line 648, in keypress
return self._current_widget.keypress(size, key)
File "/home/lars/.local/lib/python2.7/site-packages/urwid/container.py", line 1590, in keypress
key = self.focus.keypress(tsize, key)
File "/home/lars/.local/lib/python2.7/site-packages/urwid/container.py", line 1590, in keypress
key = self.focus.keypress(tsize, key)
File "/home/lars/.local/lib/python2.7/site-packages/urwid/container.py", line 2271, in keypress
key = w.keypress((mc,) + size[1:], key)
File "/home/lars/.local/lib/python2.7/site-packages/mlbstreamer/__main__.py", line 323, in keypress
self.watch(self.table.selection.data.game_id)
File "/home/lars/.local/lib/python2.7/site-packages/mlbstreamer/__main__.py", line 334, in watch
self.toolbar.start_from_beginning,
File "/home/lars/.local/lib/python2.7/site-packages/mlbstreamer/play.py", line 154, in play_stream
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] Datei oder Verzeichnis nicht gefunden
lars@acer:~$
For me this is chinese... ;-)
 
Old 04-23-2018, 02:54 PM   #5148
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
Quote:
Originally Posted by larshenric View Post
First of all, thank you for the help! :-)
Up to now I got at least mlbstreamer running. Now, starting a game this happens:

For me this is chinese... ;-)
Looks like it's not finding the streamlink executable, which should be in the same path as mlbplay. It's probably best to put ~/.local/bin in your PATH, e.g.:

Code:
export PATH=~/.local/bin:$PATH
 
1 members found this post helpful.
Old 04-23-2018, 03:41 PM   #5149
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled
I'm quite unsure... I have to put exactly that into terminal?
 
1 members found this post helpful.
Old 04-23-2018, 05:06 PM   #5150
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
Quote:
Originally Posted by larshenric View Post
I'm quite unsure... I have to put exactly that into terminal?
You can do that in the terminal window before run mlbplay, or you can put it in your shell startup file (usually .bashrc by default) so that ~/.local/bin is in your PATH variable by default.
 
Old 04-24-2018, 12:46 AM   #5151
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled
Double thumb up!! Thank you! :-))
Last thing (I hope): How do I create the startup file? How does the file look like?

Last edited by larshenric; 04-24-2018 at 01:39 AM.
 
Old 04-24-2018, 01:45 AM   #5152
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled
With some googling I managed to create an sh-file with this content:
Quote:
#!/bin/bash
export PATH=~/.local/bin:$PATH
~/.local/bin/mlbstreamer
I made it executable, but it only starts mlbstreamer with no option to watch a game. It ignores the first "export"-command of the script...
 
Old 04-24-2018, 10:20 AM   #5153
friggo
LQ Newbie
 
Registered: May 2012
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by larshenric View Post
With some googling I managed to create an sh-file with this content:

I made it executable, but it only starts mlbstreamer with no option to watch a game. It ignores the first "export"-command of the script...
Don't use ~ in the PATH, use $HOME instead. Also it is better to export PATH on a separate line.

Code:
#!/bin/bash
PATH=$HOME/.local/bin:$PATH
export PATH
mlbstreamer
Also it would probably be better to look into the file .bash_profile in you home directory, there is most likely an PATH export there already, just adding it to there would make it global for all you terminal windows.

An Example:
Code:
bash$ cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH
[bash]$

Last edited by friggo; 04-24-2018 at 10:29 AM. Reason: add some info about .bash_profile
 
1 members found this post helpful.
Old 04-24-2018, 12:36 PM   #5154
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled
Alright, I got my file running... :-))
Thanks a lot to all the contributors!!
 
Old 04-24-2018, 04:50 PM   #5155
swetz
LQ Newbie
 
Registered: Apr 2018
Posts: 6

Rep: Reputation: Disabled
Hey all, super new to this so bear with me as I have a bunch of different questions.

With mlbstreamer, would there be a way to create a stream of the file that I could connect to remotely? Currently mlb.tv doesn't work at my location, but I have a headless server that has no restrictions and I can connect to files on it via vlc.

If I used the -s option to create a file of the mlb.tv streams would I be able to watch those on the fly so I could basically catch the games live via the file? or would that not work?

Can you use the -s command and -r command in conjunction with each other?
Is there a way to do the initial config without a media player installed?

Is there a way to do what I want to in a different way?

Thanks for all the help!
 
Old 04-25-2018, 09:58 AM   #5156
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
Quote:
Originally Posted by swetz View Post
Hey all, super new to this so bear with me as I have a bunch of different questions.

With mlbstreamer, would there be a way to create a stream of the file that I could connect to remotely? Currently mlb.tv doesn't work at my location, but I have a headless server that has no restrictions and I can connect to files on it via vlc.
Many years ago I played around with VLC re-encoding and re-streaming input files, but I don't remember the details. This page has some examples, none of which I've tried, but should help you get started.


Quote:
Originally Posted by swetz View Post
If I used the -s option to create a file of the mlb.tv streams would I be able to watch those on the fly so I could basically catch the games live via the file? or would that not work?
Yeah, that's pretty much what I do. MPV seems to handle watching files as they're being written to just fine. Not sure about other media players.


Quote:
Originally Posted by swetz View Post
Can you use the -s command and -r command in conjunction with each other?
Yes, that should work fine as well.

Quote:
Originally Posted by swetz View Post
Is there a way to do the initial config without a media player installed?
I hadn't really considered that, but I suppose in the situation where you want to run headless and watch from somewhere else, that would be useful. Go ahead and file an issue on GitHub and I'll see what I can do.
 
Old 04-25-2018, 10:20 AM   #5157
larshenric
Member
 
Registered: Aug 2012
Location: Flensburg, Germany
Distribution: several
Posts: 90

Rep: Reputation: Disabled
I'm trying to start not from the beginning with this:
Quote:
mlbplay -d 2018-04-22 chc -b T3
And I get this:
Quote:
mlbplay: error: argument -b/--beginning: invalid int value: 'T3'
Any idea?
 
Old 04-25-2018, 10:27 AM   #5158
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
Quote:
Originally Posted by larshenric View Post
I'm trying to start not from the beginning with this:

And I get this:


Any idea?
Please see my response upthread to another user with the same issue. Until this feature is released to PyPI, you have to install from github to get it.
 
Old 04-25-2018, 11:07 AM   #5159
swetz
LQ Newbie
 
Registered: Apr 2018
Posts: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by tonycpsu View Post
Yeah, that's pretty much what I do. MPV seems to handle watching files as they're being written to just fine. Not sure about other media players.
I forgot a few details. I'm doing this over http. I use a seedbox with whatbox and access their files via a http web directory. I open the file .ts as it's being populated on windows via vlc. What happens is that the file opens but only contains the amount of time in the video from when I opened it. it doesn't seem to want to add the new data to the end of it.

Also, I'll check that link! Thanks!
 
Old 04-25-2018, 11:17 AM   #5160
tonycpsu
Member
 
Registered: Apr 2014
Posts: 71

Rep: Reputation: Disabled
Quote:
Originally Posted by swetz View Post
I forgot a few details. I'm doing this over http. I use a seedbox with whatbox and access their files via a http web directory. I open the file .ts as it's being populated on windows via vlc. What happens is that the file opens but only contains the amount of time in the video from when I opened it. it doesn't seem to want to add the new data to the end of it.

Also, I'll check that link! Thanks!
OK I have no experience with seedbox/whatbox, and can't vouch for VLC doing the smart thing when it's reading files from mlbstreamer. I just know mpv handles it properly when reading from a normal local filesystem. Once you have more moving parts in your workflow, I'm afraid you're on your own if things don't work optimally.
 
  


Reply

Tags
help, install, installation, instructions, seek, vlc, windows



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mlb.com gameday audio stream statmobile Linux - Newbie 6 05-06-2008 10:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 10:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration