Kodi Community Forum
[Release] MLBMC - a Major League Baseball (video) add-on - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: [Release] MLBMC - a Major League Baseball (video) add-on (/showthread.php?tid=104391)



RE: [Release] MLBMC - a Major League Baseball (video) add-on - Baryho - 2012-05-31

(2012-05-31, 14:14)divingmule Wrote: That is really strange. I'm not sure what to thinkHuh

If your up for editing the add-ons default.py, you may try changing these lines near the top of the file from -
Code:
try:
    import json
except:
    import simplejson as json
to -
Code:
import simplejson as json

In the future, please use a site like http://pastebin.com to copy your log to, then post the link. Wink

Hey...it helped!! Thanks a lot!!!


RE: [Release] MLBMC - a Major League Baseball (video) add-on - tmoe - 2012-05-31

(2012-05-31, 20:35)sdsnyr94 Wrote: I asked because I tried on a FAT32 flash drive and bumped against what I thought was the 4GB limit..... but now I will need to watch the file size to see if I stop ~2.5 also.... I'll let you know later.

okay, thanks sdsnyr94

I just called mlbhls manually from the shell... lets see how far it will download NYY vs. LAA from yesterday Wink

EDIT: Thats odd... Finished downloading w/o bailing out, when manually executing mlbhls target from shell:

Code:
[...]
[MLB] Get (5321): 01/19/01.ts (bw: 4500000, time: 4.62s) [Avg. D/L Rate of last 3 chunks: 7.14 Mbps]
[MLB] Get (5323): 01/19/07.ts (bw: 4500000, time: 3.95s) [Avg. D/L Rate of last 3 chunks: 7.53 Mbps]

root ~/tmp # ls -lFh                                                                                                                                      
total 7472392
-rw-r--r--    1 root     root        7.1G May 31 22:28 test.ts

Might be a problem while playing the file being downloaded at the same time?!



RE: [Release] MLBMC - a Major League Baseball (video) add-on - divingmule - 2012-06-01

If you want to test further you might try commenting the os. calls in the mlb_hls_check function of the default.py and see if the file continues to download when the player stops.
Code:
def mlb_hls_check(filename):
        addon_log( '--> playback started' )
        while (True):
            filename == get_file()
            xbmc.sleep(2000)
            if filename != get_file():
                # os.system('pkill mlbhls')
                # os.remove(filename)
                # os.rmdir(tmpdir)
                addon_log( '--> broke out of loop' )
                break



RE: [Release] MLBMC - a Major League Baseball (video) add-on - sdsnyr94 - 2012-06-01

OK, so I created a folder called MLBTemp in the /storage folder in Openelec.... then mounted an NFS share to the folder.... MLBMC-HLS can now use this folder as the Temp location. Has not affected performance...but I have only let it run for about 1/2 hr.

tmoe - I have had archived games play flawlessly in the non-HLS version of MLBMC... yet Live games stop to buffer every now and then. I had the same results with my aTV2's native MLB app... could it be something in their transmission during live games?




RE: [Release] MLBMC - a Major League Baseball (video) add-on - tmoe - 2012-06-01

(2012-06-01, 01:52)divingmule Wrote: If you want to test further you might try commenting the os. calls in the mlb_hls_check function of the default.py and see if the file continues to download when the player stops.
Code:
def mlb_hls_check(filename):
        addon_log( '--> playback started' )
        while (True):
            filename == get_file()
            xbmc.sleep(2000)
            if filename != get_file():
                # os.system('pkill mlbhls')
                # os.remove(filename)
                # os.rmdir(tmpdir)
                addon_log( '--> broke out of loop' )
                break

thanks for the hint, divingmule. will check that later tonight Smile


(2012-06-01, 03:16)sdsnyr94 Wrote: OK, so I created a folder called MLBTemp in the /storage folder in Openelec.... then mounted an NFS share to the folder.... MLBMC-HLS can now use this folder as the Temp location. Has not affected performance...but I have only let it run for about 1/2 hr.
good to know Wink

(2012-06-01, 03:16)sdsnyr94 Wrote: tmoe - I have had archived games play flawlessly in the non-HLS version of MLBMC...
me too; no problems whatsoever when not using mlbhls but rtmpdump! as mentioned, it will stop downloading/playing, if I use mlbhls.

(2012-06-01, 03:16)sdsnyr94 Wrote: yet Live games stop to buffer every now and then. I had the same results with my aTV2's native MLB app... could it be something in their transmission during live games?
again, did not have any problems on live games or archived ones when using rtmpdump @ 2400 kbps (non-hls). havnt tried live games w/ mlbhls yet; will try do see if it stops playing during live coverage. i'll give some feedback on that...



UPDATE:
When playing a game (archived) via add-on it stops downloading at ~2.4 GB, no matter what!

This time I used a share on my NAS as temp dir, which is connected via smb and its fs is ext3 (just to make sure it has nothing to do with the local fs).
The mlbhls process starts downloading the chunks just fine and xbmc begins playing the file.

mlbhls stops downloading when the file size reaches ~2.4 GB!
xbmc.Player().getPlayingFile() still delivers the correct string to mlb_hls_check(), since it hasnt reached the end of that 2.4 GB ts file; so the log
does not show '--> broke out of loop'.

Seems that the mlbhls process somehow quits downloading after a certain time/time-out or when reaching a certain amount of downloaded data
when called via Popen() in getGameURL(). The mlbhls process itself is still active and shows up in top.
If I manually call mlbhls w/ -F option from the shell the whole file gets downloaded; ~7 GB for a game that lasts like 3 hours.

strange world Huh




RE: [Release] MLBMC - a Major League Baseball (video) add-on - sdsnyr94 - 2012-06-02

Just want to support tmoe's findings.... Last night I put on the Bos-Det game.... last I had checked the file it was 2.1Gb in size... about 5-10 minutes later the feed dropped.

Tonight I was watching the Mets-Cards game.... when I checked the file size it was again 2.1 Gb.... about 5-10 minutes later the feed dropped.
Restarted and a little over an hour later checked the size... about 2.5 .... dropped shortly after.




RE: [Release] MLBMC - a Major League Baseball (video) add-on - divingmule - 2012-06-03

Yeah, something Huh is causing mlbhls to pause, it's status switches to "pipe_wait". When using the file-in/file-out method, you would see this when pausing the player or if there were network issues.


RE: [Release] MLBMC - a Major League Baseball (video) add-on - sdsnyr94 - 2012-06-04

Could we just be burning through that little buffer (I set mine at 45 seconds) due to changes in transmission speeds on their end?

I may try setting the buffer at 5 minutes just to see if the file gets past the 2.4 GB "limit".


RE: [Release] MLBMC - a Major League Baseball (video) add-on - tmoe - 2012-06-04

(2012-06-03, 16:47)divingmule Wrote: Yeah, something Huh is causing mlbhls to pause, it's status switches to "pipe_wait". When using the file-in/file-out method, you would see this when pausing the player or if there were network issues.

Yupp, my guess is that something causes the communication between the mlbhls child process and the calling process to drop out when dealing with such huge files. Maybe we could play around with the Popen() call to see if it makes a difference, e.g alter i/o streams (sdin, stdout, stderr) parameters.

(2012-06-04, 18:38)sdsnyr94 Wrote: Could we just be burning through that little buffer (I set mine at 45 seconds) due to changes in transmission speeds on their end?

I may try setting the buffer at 5 minutes just to see if the file gets past the 2.4 GB "limit".

u could try, but I guess that wont help here.




RE: [Release] MLBMC - a Major League Baseball (video) add-on - gnrtool82 - 2012-06-05

Just made a post about something not working.

Best add-on there is!


RE: [Release] MLBMC - a Major League Baseball (video) add-on - tmoe - 2012-06-06

(2012-06-05, 05:02)gnrtool82 Wrote: Just made a post about something not working.

where did you make that post?

(2012-06-05, 05:02)gnrtool82 Wrote: Best add-on there is!

cant live w/o it Wink





RE: [Release] MLBMC - a Major League Baseball (video) add-on - divingmule - 2012-06-06

(2012-06-04, 19:45)tmoe Wrote: Yupp, my guess is that something causes the communication between the mlbhls child process and the calling process to drop out when dealing with such huge files. Maybe we could play around with the Popen() call to see if it makes a difference, e.g alter i/o streams (sdin, stdout, stderr) parameters.

That's what I was thinking also, tried a few things but haven't had any luck...

In the mean while I've rewritten how we get the innings start time so that the coverage directory doesn't have to be reloaded to get updated innings.


RE: [Release] MLBMC - a Major League Baseball (video) add-on - sdsnyr94 - 2012-06-06

I am going to go out on a limb here.... and I am sure this will not work but I am throwing it out there anyway.

Can you get the start time of each inning on the fly (while video is playing), and is there a stop time for the end of each inning? Is there a way, using this information, that you could stop/start mlbhls so that it creates a new file every inning (or every couple of innings) to prevent the file size from getting so large?


RE: [Release] MLBMC - a Major League Baseball (video) add-on - tmoe - 2012-06-06

(2012-06-06, 18:43)divingmule Wrote:
(2012-06-04, 19:45)tmoe Wrote: Yupp, my guess is that something causes the communication between the mlbhls child process and the calling process to drop out when dealing with such huge files. Maybe we could play around with the Popen() call to see if it makes a difference, e.g alter i/o streams (sdin, stdout, stderr) parameters.

That's what I was thinking also, tried a few things but haven't had any luck...

maybe I find time to do some testing... i was thinking about calling some other function to fire up mlbhls; so in a way that these two processes arent linked and run independently/asynchronous (fire-and-forget)?! something like shell_exec(), exec(), whatsoever. Does that make sense?!

(2012-06-06, 20:07)sdsnyr94 Wrote: Can you get the start time of each inning on the fly (while video is playing), and is there a stop time for the end of each inning? Is there a way, using this information, that you could stop/start mlbhls so that it creates a new file every inning (or every couple of innings) to prevent the file size from getting so large?

nice idea Wink that would mean that we kill the running mlbhls process, remember the last played inning and then exec another mlbhls process right after starting from inning + 1. i dont know if that is doable and didnt cause trouble since from my understanding u have to login again, get the stream again, etc... but nice thought Smile




RE: [Release] MLBMC - a Major League Baseball (video) add-on - divingmule - 2012-06-07

(2012-06-06, 21:35)tmoe Wrote: maybe I find time to do some testing... i was thinking about calling some other function to fire up mlbhls; so in a way that these two processes arent linked and run independently/asynchronous (fire-and-forget)?! something like shell_exec(), exec(), whatsoever. Does that make sense?!

Sure, I'm busy with other things and, with my sometimes* flaky dsl, I have a hard time testing.

@sdsnyr94, that may likely work except I don't think* there is a way to stop mlbhls at a given time Huh