tonycpsu / streamglob

A console media browser designed to facilitate live and time-shifted viewing of online content.
GNU General Public License v3.0
34 stars 10 forks source link

Not and issue just a request on how to. #21

Open jgshier opened 5 years ago

jgshier commented 5 years ago

I asked this on the mlbstreamer, so not sure if this will work on stremglob. Is it possible to specify a tcp port for streamlink. Lets say I wanted to watch two streams at once, the issue of using the config.yaml to setup my port info, it would tell streamlink to use the same port. In mlbstreamer i updated play.py to accept -t and then add in the cmd "--player-external-http", "--player-external-http-port", "%s" %(port), Is that possible with streamglob ?

tonycpsu commented 5 years ago

You might be able to use the configuration profile functionality for this. Something like:

profiles:
    default:
    # usual stuff
    external1:
        players:
            streamlink:
                args: --player-external-http --player-external-http-port 8001
    external2:
        players:
            streamlink:
                args: --player-external-http --player-external-http-port 8002

Then you run each one with a different profile:

$ streamglob mlb/phi -p external1
$ streamglob mlb/pit -p external2

Haven't tested any of this and don't use any of these arguments, but in theory it should work.

jgshier commented 5 years ago

when running -v is there away to show the -p option so I know its really selecting it? Trying to get past this traceback, File "/usr/local/bin/streamglob", line 11, in load_entry_point('streamglob==0.0.11.dev0', 'console_scripts', 'streamglob')() File "/usr/local/lib/python3.6/dist-packages/streamglob/main.py", line 655, in main run_cli(action, provider, selection, opts) File "/usr/local/lib/python3.6/dist-packages/streamglob/main.py", line 564, in run_cli stdout=sys.stdout, stderr=sys.stderr, kwargs File "/usr/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete return future.result() File "/usr/local/lib/python3.6/dist-packages/streamglob/player.py", line 255, in play player.source = source File "/usr/local/lib/python3.6/dist-packages/streamglob/player.py", line 326, in source self.source.integrate_player(self) File "/usr/local/lib/python3.6/dist-packages/streamglob/player.py", line 633, in integrate_player self.extra_args_pre += ["--player"] + [" ".join(dst.command)]

I am guessing I would not need the --player, but I also can't confirm it's really using my -p external1. I am correct that it should be on the same level as default: in the config.yaml ?

tonycpsu commented 5 years ago

I need to see the full traceback and the relevant section(s) of your config.yaml to know what's going on.

jgshier commented 5 years ago

with -v streamglob mlb/2019-04-15.bos -p external1 -v 2019-04-15 16:09:46 [ main:642 ] [ debug] streamglob starting 2019-04-15 16:09:46 [ bam:1671] [ debug] getting schedule: 1, None, 2019-04-15, 2019-04-15, None, None, None 2019-04-15 16:09:46 [ bam:1688] [ debug] http://statsapi.mlb.com/api/v1/schedule?sportId=1&startDate=2019-04-15&endDate=2019-04-15&gameType=&gamePk=&teamId=&hydrate=linescore,team,game(content(summary,media(epg),editorial(preview,recap),highlights(highlights(items)))) 2019-04-15 16:09:47 [ dropdown:822 ] [ debug] select: Video 2019-04-15 16:09:47 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Video') 2019-04-15 16:09:47 [ dropdown:822 ] [ debug] select: Video 2019-04-15 16:09:47 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Video') 2019-04-15 16:09:47 [ dropdown:822 ] [ debug] select: 720p 2019-04-15 16:09:47 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', '720p') 2019-04-15 16:09:47 [ dropdown:822 ] [ debug] select: 720p 2019-04-15 16:09:47 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', '720p') 2019-04-15 16:09:47 [ dropdown:822 ] [ debug] select: Live 2019-04-15 16:09:47 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Live') 2019-04-15 16:09:47 [ columns:128 ] [ debug] column start, width: given, 6 2019-04-15 16:09:47 [ columns:128 ] [ debug] column away_team_box, width: given, 16 2019-04-15 16:09:47 [ columns:128 ] [ debug] column home_team_box, width: given, 16 2019-04-15 16:09:47 [ columns:128 ] [ debug] column line, width: weight, 1 2019-04-15 16:09:47 [ columns:128 ] [ debug] column media_available, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column game_id, width: weight, 1 2019-04-15 16:09:47 [ datatable:1295] [ debug] refresh: False 2019-04-15 16:09:47 [ datatable:1245] [ debug] requery: None, 0 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 565809 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 565032 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 567068 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 567369 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 566968 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 567559 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 566772 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 567269 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 566381 2019-04-15 16:09:47 [ columns:128 ] [ debug] column team, width: given, 10 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 1, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 2, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 3, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 4, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 5, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 6, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 7, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 8, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column 9, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column runs, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column hits, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column errors, width: given, 3 2019-04-15 16:09:47 [ columns:128 ] [ debug] column index, width: weight, 1 2019-04-15 16:09:47 [ bam:955 ] [ debug] geting media for game 566282 2019-04-15 16:09:47 [ session:153 ] [ debug] getting cached response for http://statsapi.mlb.com/api/v1/sports 2019-04-15 16:09:47 [ session:165 ] [ debug] using cached response for http://statsapi.mlb.com/api/v1/sports 2019-04-15 16:09:47 [ session:153 ] [ debug] getting cached response for http://statsapi.mlb.com/api/v1/teams?sportId=1&2019 2019-04-15 16:09:47 [ session:165 ] [ debug] using cached response for http://statsapi.mlb.com/api/v1/teams?sportId=1&2019 2019-04-15 16:09:47 [ bam:1671] [ debug] getting schedule: 1, None, 2019-04-15, 2019-04-15, None, 111, None 2019-04-15 16:09:47 [ bam:1688] [ debug] http://statsapi.mlb.com/api/v1/schedule?sportId=1&startDate=2019-04-15&endDate=2019-04-15&gameType=&gamePk=&teamId=111&hydrate=linescore,team,game(content(summary,media(epg),editorial(preview,recap),highlights(highlights(items)))) 2019-04-15 16:09:47 [ selector_events:65 ] [ debug] Using selector: EpollSelector 2019-04-15 16:09:47 [ tasks:70 ] [ debug] task_manager starting 2019-04-15 16:09:47 [ player:215 ] [ debug] source: [MLBMediaSource(provider_id='mlb', url=None, media_type='video', game_id=565032, media_id='733ced5a-ba8d-4132-a570-85a1f291a4d6', title='', description='', state='live', call_letters='NESN', language='', feed_type='HOME', free=True, playbacks=[])], player: {'media_types': {'video'}}, helper: streamlink 2019-04-15 16:09:47 [ mlb:630 ] [ debug] getting stream https://edge.svcs.mlb.com/media/733ced5a-ba8d-4132-a570-85a1f291a4d6/scenarios/browser~csai 2019-04-15 16:09:47 [ mlb:635 ] [ debug] stream response: {'stream': {'complete': 'https://hlslive-akc-ewr1.media.mlb.com/hdnts=exp=1555430987~acl=/*~id=00u7q9innk8slCofd356~data=733ced5a-ba8d-4132-a570-85a1f291a4d6~hmac=ec1b472003c71e42ecc756950f03a88046d4c239b60a93647e7b36e5221b0370/e809760cf25e34ae2434503646390fc3/ls01/mlb/2019/04/15/Home_VIDEO_eng_Baltimore_Orioles_Boston__20190415_1555333521024/master_desktop_complete.m3u8', 'variants': [], 'renditions': {'audio': [], 'subtitles': []}, 'attributes': {'drms': [], 'encryptionType': 'AES-128', 'audioSegmentTypes': ['PACKED_AUDIO'], 'videoSegmentTypes': ['TS']}}, 'tracking': {'conviva': {'med': 'video', 'state': 'ON', 'productType': 'LIVE', 'locationName': 'EWR1_AKAMAI-SECURE', 'cdnName': 'AKAMAI-SECURE', 'pbs': 'browser~csai', 'fguid': 'ec04b43c-dfd3-4745-beb4-8ba06939a6b1', 'prt': 'mlbtv', 'conid': '733ced5a-ba8d-4132-a570-85a1f291a4d6', 'userid': '00u7q9innk8slCofd356', 'assetName': '733ced5a-ba8d-4132-a570-85a1f291a4d6', 'plt': 'browser'}, 'telemetry': {'fguid': 'ec04b43c-dfd3-4745-beb4-8ba06939a6b1', 'mediaId': '733ced5a-ba8d-4132-a570-85a1f291a4d6'}, 'adEngine': {'cdn': 'AKAMAI-SECURE', 'corigin': 'EWR1', 'fguid': 'ec04b43c-dfd3-4745-beb4-8ba06939a6b1'}}} Traceback (most recent call last): File "/usr/local/bin/streamglob", line 11, in load_entry_point('streamglob==0.0.11.dev0', 'console_scripts', 'streamglob')() File "/usr/local/lib/python3.6/dist-packages/streamglob/main.py", line 655, in main run_cli(action, provider, selection, opts) File "/usr/local/lib/python3.6/dist-packages/streamglob/main.py", line 564, in run_cli stdout=sys.stdout, stderr=sys.stderr, kwargs File "/usr/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete return future.result() File "/usr/local/lib/python3.6/dist-packages/streamglob/player.py", line 255, in play player.source = source File "/usr/local/lib/python3.6/dist-packages/streamglob/player.py", line 326, in source self.source.integrate_player(self) File "/usr/local/lib/python3.6/dist-packages/streamglob/player.py", line 633, in integrate_player self.extra_args_pre += ["--player"] + [" ".join(dst.command)] TypeError: sequence item 0: expected str instance, NoneType found

config

cat config.yaml profiles: default: providers: mlb: credentials: username: x password: x output: path: . template: "{provider_id}.{start_date_time}.{away_abbrev}@{home_abbrev}.{ext}"

if you'd like to hide scores, etc. for certain teams

            teams:
                favorite:
                    - LAD
                hide_spoilers: favorite
            defaults:
                resolution: 720p
                media: video
            formats:
                streams:
                    - hlsCloud
                    - mp4Avc
                    - HTTP_CLOUD_WIRED_60
                highlights:
                    - mp4Avc
                    - hlsCloud
                    - HTTP_CLOUD_WIRED_60
            listings:
                teams:
                    # here, "colors" can be set to
                    #    false: no color
                    #    one of the following strings:
                    #        primary: fg = team's primary color
                    #        alternate: fg = team's alternate color
                    #        full: bg = primary color, fg = alternate color
                    #        inverse; bg = alternate color, fg = primary
                    #        color
                    #    a list with three elements, each of which is a
                    #    string as above.  The first item applies to the
                    #    team box background, the 2nd to the city name, and
                    #    the third to the team name
                    colors: [full, full, inverse]
                    # colors: standard
                    # colors: false
                line:
                    style: standard
                    # style: "compact"
                    # see above for description of the values allowed here
                    colors: "full"
                    # colors: standard
                    # colors: false
            attributes:
                teams:
                    none: {fg: '#333333', bg: '#aaaaaa'}
                    ari: {fg: '#e3d4ad', bg: '#a71930'}
                    atl: {fg: '#1a366f', bg: '#ce1141'}
                    bal: {fg: '#000000', bg: '#df4601'}
                    bos: {fg: '#123460', bg: '#bd3039'}
                    chc: {fg: '#cc3433', bg: '#0e3386'}
                    cin: {fg: '#ffffff', bg: '#c6011f'}
                    cle: {fg: '#123460', bg: '#e31937'}
                    col: {fg: '#c4ced4', bg: '#41008f'}
                    cws: {fg: '#474338', bg: '#c4ced4'}
                    det: {fg: '#123460', bg: '#fa4616'}
                    hou: {fg: '#eb6e1f', bg: '#003b82'}
                    kc: {fg: '#bd9b60', bg: '#004687'}
                    laa: {fg: '#004283', bg: '#ba0021'}
                    lad: {fg: '#ffffff', bg: '#005a9c'}
                    mia: {fg: '#00a3e0', bg: '#ef3340'}
                    mil: {fg: '#b6922e', bg: '#0d3071'}
                    min: {fg: '#00397c', bg: '#d31145'}
                    nym: {fg: '#ff5910', bg: '#003992'}
                    nyy: {fg: '#1b3468', bg: '#c4ced3'}
                    oak: {fg: '#00584d', bg: '#efb21e'}
                    phi: {fg: '#003992', bg: '#e81828'}
                    pit: {fg: '#474338', bg: '#fdb827'}
                    sd: {fg: '#a0aab2', bg: '#003b82'}
                    sea: {fg: '#103c76', bg: '#005c5c'}
                    sf: {fg: '#474338', bg: '#fd5a1e'}
                    stl: {fg: '#123460', bg: '#c41e3a'}
                    tb: {fg: '#0c3b7c', bg: '#8fbce6'}
                    tex: {fg: '#c0111f', bg: '#003f98'}
                    tor: {fg: '#e8291c', bg: '#134a8e'}
                    wsh: {fg: '#1b2e7a', bg: '#ab0003'}

        nhl:
            credentials:
                username: changeme
                password: CHANGEME
            output:
                path: .
                template: "{provider_id}.{start_date_time}.{away_abbrev}@{home_abbrev}.{ext}"
            attributes:
                teams:
                    none: {fg: '#333333', bg: '#aaaaaa'}
                    ana: {fg: '#c4ced4', bg: '#f47a38'}
                    ari: {fg: '#e2d6b5', bg: '#8c2633'}
                    bos: {fg: '#000000', bg: '#ffb81c'}
                    buf: {fg: '#003474', bg: '#fcb514'}
                    car: {fg: '#313131', bg: '#cc0000'}
                    cbj: {fg: '#003474', bg: '#c8102e'}
                    cgy: {fg: '#f1be48', bg: '#c8102e'}
                    chi: {fg: '#ff671b', bg: '#cf0a2c'}
                    col: {fg: '#236192', bg: '#6f263d'}
                    dal: {fg: '#8f8f8c', bg: '#006847'}
                    det: {fg: '#ffffff', bg: '#ce1126'}
                    edm: {fg: '#052c62', bg: '#ff4c00'}
                    fla: {fg: '#052c62', bg: '#c8102e'}
                    lak: {fg: '#313131', bg: '#a2aaad'}
                    min: {fg: '#eaaa00', bg: '#a6192e'}
                    mtl: {fg: '#202b88', bg: '#af1e2d'}
                    njd: {fg: '#000000', bg: '#ce1126'}
                    nsh: {fg: '#052c62', bg: '#ffb81c'}
                    nyi: {fg: '#f47d30', bg: '#00539b'}
                    nyr: {fg: '#ce1126', bg: '#0038a8'}
                    ott: {fg: '#cba044', bg: '#e31837'}
                    phi: {fg: '#000000', bg: '#f74902'}
                    pit: {fg: '#000000', bg: '#cfc493'}
                    sjs: {fg: '#ea7200', bg: '#006272'}
                    stl: {fg: '#fcb514', bg: '#002f87'}
                    tbl: {fg: '#ffffff', bg: '#003488'}
                    tor: {fg: '#ffffff', bg: '#004d9e'}
                    van: {fg: '#00297b', bg: '#00843d'}
                    vgk: {fg: '#4b5d62', bg: '#b4975a'}
                    wpg: {fg: '#052c62', bg: '#004c97'}
                    wsh: {fg: '#052c62', bg: '#c8102e'}

            listings:
                teams:
                    colors: [full, full, inverse]
                line:
                    style: "standard"
                    colors: primary

        youtube:
            # feeds in name: url format
            feeds:
                MLB: https://www.youtube.com/mlb
                NHL: https://www.youtube.com/nhl
            limit: 25
            output:
                template: "%(title)s.%(upload_date)s.%(resolution)s.%(channel_id)s.%(id)s.%(ext)s"
                format: 22
        instagram:
            # list of users
            feeds:
                - "@mlb"
                - "@nhl"
            output:
                template: "{feed_name}.{title}.{timestamp}{index}.{ext}"
        rss:
            # feeds in name:url format
            feeds:
                MLB.com Cut4cast: http://mlb.mlb.com/feed/podcast/cut4_podcast_rss.xml
            rules:
                label:
                    baseball: medium
            output:
                template: "{feed_name}.{title}.{timestamp}.{ext}"
        periscope:
            # feeds in name:url format
            feeds:
                - mlb
                - nhl
            helpers:
                null: youtube-dl
                mpv: null
        twitch:
            # list of usernames
            channels:
                - sporer

    players:
        streamlink:
            path: feh
            args: >
                --player-external-http --player-external-http-port 8001
        feh:
            # path: feh
            args:
                -d -Z -F -z --draw-tinted
        mpv:
            # disabled: true
            # path: /usr/local/bin/mpv
            args: >
                --no-border --osd-level=0 --force-window=yes
                --force-seekable --hr-seek=yes --hr-seek-framedrop=yes
                --keep-open=yes --keep-open-pause=no --no-window-dragging
                --cache=2048 --cache-backbuffer=8192
                --demuxer-seekable-cache=yes
                --image-display-duration=inf
            # exclude_types:
            #     - image
        vlc:
            # path: /usr/local/bin/vlc
            # exclude_types:
            #     - image
    helpers:
        youtube-dl:
            path: youtube-dl
        streamlink:
            path: streamlink
            no_progress: True
            # args: --hls-audio-select *
    rules:
        label:
            pitch: high
            game: low
        # download:
        #     - high

    labels:
        high: red
        medium: yellow
        low: blue

    attributes:
        normal:
            light gray
        anchor:
            white,bold
        link:
            white,bold
        bold:
            white,bold
        title:
            white,bold
        highlight:
            yellow
        dim:
            {"lo": "dark gray", "hi": "g23"}
        yellow:
            yellow
        red:
            light red
        blue:
            light blue

    output:
        path: .
        strip_emoji: true
    tables:
        limit: 25
    cache:
        min_items: 10
        max_items: 500
        max_age: 90
    time_zone: America/New_York
    time_format: 12h # or "24h", or any valid strftime format string
    default_resolution: 720p_alt

540p:
    mlb:
        defaults:
            resolution: 540p

external1:
    players:
        streamlink:
            args: >
                --player-external-http --player-external-http-port 8001

tasks: max: 10

leiaaloha commented 5 years ago

I too am having issues with this, is there an example of valid working profile? Will it work with just streamlink?

jgshier commented 5 years ago

no , i haven't got it working.

jgshier commented 5 years ago

Just playing around to try to make one of the default players work with just streamlink is not working ether. the player requires the path. also this line

def integrate_player(self, dst):
    self.extra_args_pre += ["--player"] + [" ".join(dst.command)]

the --player is not required. is it possible to maybe have it check if its needed?

My profile is like 540p: mlb: defaults: resolution: 540p external1: players: streamlink: args: > --player-external-http --player-external-http-port 8001

I added web-pdb and don't see the profile ever being set.