LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MLB.TV in Linux (https://www.linuxquestions.org/questions/linux-software-2/mlb-tv-in-linux-432479/)

Redbullsnation 05-13-2018 12:19 PM

BTW, is anyone having success getting alternative audio? I'm not to sure why I'm not getting another audio other than the TV feed

chrisVV 05-14-2018 06:09 PM

Quote:

Originally Posted by Redbullsnation (Post 5854154)
BTW, is anyone having success getting alternative audio? I'm not to sure why I'm not getting another audio other than the TV feed

Yes it works fine, apart from the fact that sometimes the radio audio is a little out of sync. Probably you are not using ffmpeg-4, or have an insufficiently recent version of streamlink.

x-9er 05-14-2018 06:24 PM

Quote:

Originally Posted by chrisVV (Post 5854796)
Yes it works fine, apart from the fact that sometimes the radio audio is a little out of sync. Probably you are not using ffmpeg-4, or have an insufficiently recent version of streamlink.

Using "--hls-audio-select", '"*"' in your play.py? Or another method?

chrisVV 05-14-2018 06:29 PM

Quote:

Originally Posted by x-9er (Post 5854803)
Using "--hls-audio-select", '"*"' in your play.py? Or another method?

I do not know what you man by 'play.py' - I use mlbplay.py. Possibly you are using the wrong program. Try mlbplay.py and see if that works.

For what it is worth, my streamlink_args are
Quote:

--ffmpeg-ffmpeg /usr/bin/ffmpeg40 --hls-audio-select 'English Radio'
/usr/bin/ffmpeg40 is a script which starts ffmpeg-4.0, which is installed in /opt/ffmpeg40 - you don't want to interfere with your distribution's version.

x-9er 05-14-2018 06:39 PM

Quote:

Originally Posted by chrisVV (Post 5854806)
I do not know what you man by 'play.py' - I use mlbplay.py. Possibly you are using the wrong program. Try mlbplay.py and see if that works.

For what it is worth, my streamlink_args are

/usr/bin/ffmpeg40 is a script which starts ffmpeg-4.0, which is installed in /opt/ffmpeg40 - you don't want to interfere with your distribution's version.

There is no mlbplay.py in the current mlbstreamer package... mlbplay.py was part of the old, no longer functioning mlbviewer.

chrisVV 05-14-2018 06:54 PM

Quote:

Originally Posted by x-9er (Post 5854809)
There is no mlbplay.py in the current mlbstreamer package... mlbplay.py was part of the old, no longer functioning mlbviewer.

OK I see at least part of what you are doing wrong. The python script installed in /usr/bin is /usr/bin/mlbplay, not /usr/bin/mlbplay.py (my mistake on that). You should be starting /usr/bin/mlbplay, not trying to invoke play.py directly. More generally, read the README.md file in the mlbstreamer package which tells you how to set up and start the program.

You also need to set your streamlink_args in $HOME/.config/mlbstreamer/config.yaml and you need to have a ffmpeg-4.0 binary in your path or identified by the --ffmpeg-ffmpeg option, and the ffmpeg-4.0 libraries in a directory appearing in /etc/ld.so.conf or set LD_LIBRARY_PATH (which is what my /usr/bin/ffmpeg40 script does).

x-9er 05-14-2018 07:25 PM

Quote:

Originally Posted by chrisVV (Post 5854818)
OK I see at least part of what you are doing wrong. The python script installed in /usr/bin is /usr/bin/mlbplay, not /usr/bin/mlbplay.py (my mistake on that). You should be starting /usr/bin/mlbplay, not trying to invoke play.py directly. More generally, read the README.md file in the mlbstreamer package which tells you how to set up and start the program.

You also need to set your streamlink_args in $HOME/.config/mlbstreamer/config.yaml and you need to have a ffmpeg-4.0 binary in your path or identified by the --ffmpeg-ffmpeg option, and the ffmpeg-4.0 libraries in a directory appearing in /etc/ld.so.conf or set LD_LIBRARY_PATH (which is what my /usr/bin/ffmpeg40 script does).

That's... exactly what I am already doing. There should not be a functional difference between editing the config file streamlink_args and doing it directly in play.py, which gets called by the linked binary anyway.

Either way, you're right in that adding

Code:

streamlink_args: '--ffmpeg-ffmpeg /usr/local/bin/ffmpeg --ffmpeg-verbose --hls-audio-select "English Radio"'
to config.yaml does result in a somewhat different output, however, --hls-audio-select "*" returns nothing at all but the bash prompt. But I could already get one alternate audio channel by putting it in play.py.

x-9er 05-14-2018 07:38 PM

OK, I see one of the problems. The Spanish language radio is titled "Radio Espaņola" in the playlist, which results in python reporting thusly

"UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 108: ordinal not in range(128)"

position 108 is the ņ...

x-9er 05-14-2018 08:49 PM

Quote:

Originally Posted by x-9er (Post 5854836)
OK, I see one of the problems. The Spanish language radio is titled "Radio Espaņola" in the playlist, which results in python reporting thusly

"UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 108: ordinal not in range(128)"

position 108 is the ņ...

Code:

streamlink_args:  '-l debug --ffmpeg-ffmpeg /usr/local/bin/ffmpeg --ffmpeg-verbose --hls-audio-select "English Radio,Natural Sound"'
Will get you TV, radio, and natural sound.

chrisVV 05-15-2018 03:33 AM

Quote:

Originally Posted by x-9er (Post 5854836)
OK, I see one of the problems. The Spanish language radio is titled "Radio Espaņola" in the playlist, which results in python reporting thusly

"UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 108: ordinal not in range(128)"

position 108 is the ņ...

There is a streamlink patch for this near the end of https://github.com/tonycpsu/mlbstreamer/issues/1 which doesn't seem to have found it's way into git . Or you could use python-3 instead of python-2.7. Or you could mux in only the english radio stream, which is what I do and which your subsequent posting does.

x-9er 05-15-2018 11:06 AM

Quote:

Originally Posted by chrisVV (Post 5854942)
There is a streamlink patch for this near the end of https://github.com/tonycpsu/mlbstreamer/issues/1 which doesn't seem to have found it's way into git . Or you could use python-3 instead of python-2.7. Or you could mux in only the english radio stream, which is what I do and which your subsequent posting does.

oh jeez i see people already went through everything i was discussing above. i feel pretty dumb for not checking that now.

x-9er 05-15-2018 12:08 PM

After re-building streamlink using python3 and with the streamlink_args of

streamlink_args: -l debug --ffmpeg-ffmpeg /usr/local/bin/ffmpeg --ffmpeg-verbose --hls-audio-select "*"

I successfully got all audio channels, however,

[mpegts @ 0x7f8b7780ac00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[aac @ 0x7f8b7b81dc00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[aac @ 0x7f8b7c019000] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[aac @ 0x7f8b7c004c00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[download][LAA.ts] Written 16.1 MB (2s @ 7.9 MB/s)

It froze after this. Will have to look into this later

chrisVV 05-15-2018 01:24 PM

Quote:

Originally Posted by x-9er (Post 5855095)
oh jeez i see people already went through everything i was discussing above. i feel pretty dumb for not checking that now.

Well it was me who reported the issue. I didn't think it was your problem here, because you said that you could only receive the TV feed. If you run up against python-2.7's difficulty with unicode, you get nothing at all: it just crashes. It doesn't bother me because I am not interested in the spanish feed.

Edit: I have never tried the patch, so I cannot comment on your freeze.

Edit2: Try it without debugging enabled. That may be the cause of the problem.

x-9er 05-15-2018 02:10 PM

Honestly after rebuilding everything to use python3 it has stopped working more or less entirely if I have any streamlink_args at all, now it just freezes. Works fine without them, though, which will have to suffice for me now.

chrisVV 05-15-2018 03:39 PM

Quote:

Originally Posted by x-9er (Post 5855156)
Honestly after rebuilding everything to use python3 it has stopped working more or less entirely if I have any streamlink_args at all, now it just freezes. Works fine without them, though, which will have to suffice for me now.

You wrote:

Code:

streamlink_args:  '-l debug --ffmpeg-ffmpeg /usr/local/bin/ffmpeg --ffmpeg-verbose --hls-audio-select "English Radio,Natural Sound"'
Try:

Code:

streamlink_args: --ffmpeg-ffmpeg /usr/local/bin/ffmpeg --ffmpeg-verbose --hls-audio-select 'English Radio,Natural Sound'
Your additional quotes may be causing a parsing error.


All times are GMT -5. The time now is 09:46 PM.