Moving Pictures breaks my MP! (1 Viewer)

fforde

Community Plugin Dev
June 7, 2007
2,667
1,702
44
Texas
Home Country
United States of America United States of America
I swear it sometimes feels like 90% of bug reports for Moving Pictures are related to Media Info. :(
 

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    About the media scanning - I would assume it is done with smaller priority than normal threads, so it should hog resources only when it comes to disk access or network transfers.

    fforde, would it be possible to do the background scanning only when there is no video playback active?
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    New codec settings and codec versions are released constantly. MediaInfo sometimes requires an update to be compatible with that. They are now up to v0.7.50 on their website and you can download the DLL yourself and replace the one that MediaPortal uses. Both MediaPortal and MovingPictures use this DLL, where MovPic uses it during import and to rescan files that are still missing info, and MediaInfo uses it before every playback starts.

    Before you update the DLL, always make a backup of the file you are replacing, incase problems arise from the new version, but personally I've upgraded MediaInfo each time a new version was released and never experienced any issues from doing so.

    And scraper-debug mode helps me solve any issues on the IMDb+ scraper, as I'm unable to experience sometimes what you are seeing, but once issue is solved the idea is to then disable it again :D

    I had a problem with MediaInfo myself, it would xfer the entire media file first via LAN before it would start playback, so instead of stuttering, I would be faced with a start delay of a few minutes. Only noticed it when the file was on a WiFi share, as my Gigabit LAN network and local files copied the data over quick enough to never really bother me. This was fixed in v0.7.32, but new bugs constantly creep up, so I tend to keep that DLL updated whenever I remember to check.

    Thanks. I updated to 0.7.50 (I used the 32bit one which I assume is correct?) but TV is still stuttering with MediaInfo scanning enabled in MovPics. I didn't notice any problems with the GUI this time, so perhaps it's fixed that although I've only done one test so perhaps a bit early to say for sure. The attached log is with the new dll.

    P.S. I remember some time ago that MediaInfo caused major delays when just right-clicking on files and also remember the problem with accessing files on my LAN. I've got all my media on the same PC as MP now though, which makes life easier :)
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    OK, I think I've fixed it :)

    I noticed that the MovingPictures.log showed it was having some problems with my Sergei Eisenstein films so I moved them out of my scanned folder. I also noticed the IMDB+ was still enabled for Cover Art data sources (although not prioritised, in fact at the bottom of the list) so I disabled that as well.

    After that, everything seemed OK (see first attached logs), so then I tried again after re-enabling IMDB+ as a Cover Art data source and it was still OK (second logs). Then I moved the Sergei Eisenstein films back into my scanned folder and in MovingPictures, pointed them to the imdb page manually and it still seems to be OK and the MovingPictures.log doesn't refer to them any more (third logs).

    I've also now re-enabled and prioritied IMDB+ for Movie Details and everything still seems OK (fourth logs). :D
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    44
    Texas
    Home Country
    United States of America United States of America
    About the media scanning - I would assume it is done with smaller priority than normal threads, so it should hog resources only when it comes to disk access or network transfers.

    fforde, would it be possible to do the background scanning only when there is no video playback active?

    The background processing only occurs on startup or when a new movie was actively placed in a watch folder. So scanning really should not be occurring during playback as it is. I am not really sure what was going on there.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    OK, I think I've fixed it :)

    Congrats :cool:

    If you launch MediaPortal and let it just sit idle for a while, then you will notice that MovingPictures is busy in the background trying to find missing info. It will rescan media files that missed info with MediaInfo, retrieve missing artwork and if enabled communicate with Follw.it to do stuff as well.

    On a large collection with lot of incomplete entries, this entire process can take quite some time and easaly overlap with the time it takes to find and start playing a movie.

    However the log file is your friend here. For example the MediaInfo re-scans on existing collection is shown to be finished in movingpictures.log via:

    (date) (time) Info [MediaInfoUpdateProce]: Background media info update process complete.​

    The other processes are marked as well when they finish, such as:


    (date) (time) Info [ FollwitConnector]: follw.it synchronization complete...
    (date) (time) Info [ FileSyncProcess]: File maintenance finished. (XX seconds)
    (date) (time) Info [UpdateArtworkProcess]: Background artwork updater process complete.

    As far as the MediaInfo scans, they require debug mode to be enabled and are marked via:


    (date) (time) Debug [ DBLocalMedia]: Updating media info for '(path+filename of media file)'
    (date) (time) Debug [ MediaInfoWrapper]: MediaInfoWrapper: inspecting media : '(path+filename of media file)'

    And once prociess is done, you will see:


    (date) (time) Debug [ DatabaseManager]: UPDATING: "just the movie title"

    Also before playback starts, the mediaportal.log file will show you that another MediaInfo scan was done.

    (date) (time) [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: DLL Version : MediaInfoLib - (version)
    (date) (time) [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: Inspecting media : (path+filename)
    (date) (time) [Info.][MPMain(1)]: MediaInfoWrapper.MediaInfoWrapper: (media info)
    (date) (time) [Info.][MPMain(1)]: RefreshRateChanger.AdaptRefreshRate: 'auto refreshrate changer' disabled
    (date) (time) [Info.][MPMain(1)]: g_Player.Play((path+file) Video)

    The reason it does this is so the 'RefreshRateChanger' can be correctly used when enabled (and I'm sure there are other reasons as well). Normally MediaInfo.DLL will do this process extremly fast, because it only has to read the header of the mediafile. But with headers changing all the time, and corrupted files caused by bad sectors or other causes, it can create serious problems.

    Take a look at the MediaInfo Changelog and you will see for example that v0.7.49 fixes a crash on 4-character filenames. Now not many users are going to have files like that, but I'm sure there is some user out there who has just "2012.avi" for the movie "2012 (2009)".

    Actually do a 'Search' (CTRL+F) on the changelog page for the word "crash" and you will notice 24 matches, a lot of which are actually fixed after v0.7.35. Now if MediaInfo crashes properly, then MediaPortal will not be bothered by it, and will accept the crash results as if the movie was a 0-byte test-file. But it could also lead to unexpected results which can then resurface as stuttering, delays or other issues when you are playing media via the GUI.

    So in closing, use the log file to find out which files are constantly rescanned for MediaInfo, missing artwork, etc and correct them. There are a gazillion tools available to correct header mistakes on media files (mkvmerge, AVI Mux GUI, etc), so that MediaInfo can scan them corectly. You can also use the MediaInfo GUI tool to debug where it goes wrong and via SourceForce assist the developer of MediaInfo to correct the problem (that's what I did for my delay problem, and it was fixed shortly after). Missing covers you can solve via MovPic config, or to solve both covers and fanarts; sign up at TheMoviedB and start contributing to the community.

    :D
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    The background processing only occurs on startup or when a new movie was actively placed in a watch folder. So scanning really should not be occurring during playback as it is. I am not really sure what was going on there.

    What happens if a server share has new video downloaded and there is a movie / live tv playing? I think it is quite common scenario - it could be download or someone in network ripping a movie for example.
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    44
    Texas
    Home Country
    United States of America United States of America
    The background processing only occurs on startup or when a new movie was actively placed in a watch folder. So scanning really should not be occurring during playback as it is. I am not really sure what was going on there.

    What happens if a server share has new video downloaded and there is a movie / live tv playing? I think it is quite common scenario - it could be download or someone in network ripping a movie for example.

    If a new movie shows up then it would be imported. Importing during video playback is allowed.
     

    doveman

    Portal Pro
    February 12, 2008
    2,326
    178
    Home Country
    United Kingdom United Kingdom
    OK, I think I've fixed it :)

    Congrats :cool:

    If you launch MediaPortal and let it just sit idle for a while, then you will notice that MovingPictures is busy in the background trying to find missing info. It will rescan media files that missed info with MediaInfo, retrieve missing artwork and if enabled communicate with Follw.it to do stuff as well.

    Thanks for the detailed info. It will come in very handy in future no doubt :)
     

    Users who are viewing this thread

    Top Bottom