Jump to content

Bug in caching Path variable for recordings vs. updating them? (which leads to issues in transcode vs. direct play)


LehighBri
 Share

Go to solution Solved by LehighBri,

Recommended Posts

LehighBri
@@krustyreturns and I have been doing some testing on the new transcoding feature as seen here and are having issues where MBS is not updating the Path to a recording, and if the Path isn't correct, transcoding is used instead of Direct Play which is not what is desired since my recordings and clients are all on the same network.
 
In our testing w/ serverwmc and MBS, we double confirmed that ServerWMC has the correct UNC path for my recorded TV, but for some reason MBS is still storing the local recording path in the Json data's "Path" variable.  Is MBS caching the Path's and not updating them for some reason each time it "rescans" for recordings?
 
Additionally, I just created a new recording, and when I look at the json data after the recording completes and I reboot MBS completely, it does not have a Path variable at all (and it says LocationType is Remote instead of saying FileSystem) as you can see below!
14:50:10 T:6040  NOTICE: Play jsonData: {"Name":"American Dad","Id":"67f387cc76c172b089bd430750adb99c","DateCreated":"2014-08-01T18:15:24.3459065Z","IsUnidentified":false,"SortName":"american dad","ExternalUrls":[],"MediaSources":[{"Protocol":"Http","Id":"67f387cc76c172b089bd430750adb99c","Type":"Default","Name":"","VideoType":"VideoFile","MediaStreams":[],"PlayableStreamFileNames":[],"Formats":[],"RequiredHttpHeaders":{}}],"Taglines":[],"Genres":[],"PlayAccess":"Full","IsPlaceHolder":false,"RemoteTrailers":[],"ProviderIds":{},"IsHD":false,"IsFolder":false,"Type":"Recording","People":[],"Studios":[],"UserData":{"PlaybackPositionTicks":0,"PlayCount":4,"IsFavorite":false,"LastPlayedDate":"2014-08-01T18:41:17.7177465Z","Played":true,"Key":"Recording-29848314-56576"},"DisplayPreferencesId":"6f93e109f7c77df02733202779c82777","Tags":[],"Keywords":[],"PrimaryImageAspectRatio":1.335,"OriginalPrimaryImageAspectRatio":1.335,"MediaStreams":[],"VideoType":"VideoFile","PartCount":1,"MediaSourceCount":1,"ImageTags":{"Primary":"19766519a73b2cab72726781fb7064b3"},"BackdropImageTags":[],"ScreenshotImageTags":[],"Chapters":[],"LocationType":"Remote","MediaType":"Video","ProductionLocations":[],"LockedFields":[],"LockData":false}
So two questions for MBS devs:
1. Where does MBS get its Path attribute from when interacting with live TV plugins like ServerWMC?  And does it get updated or not are updates ignored (which I don't think they should be)?
2. Why after a recording completes (example above) does MBS not have a Path variable at all?
 
In both cases, ServerWMC can provide the UNC path, but would like to know how things are working on MBS's side in terms of how it pulls the path info and how it stores and/or updates it.  That's the key to solving this issue.  And I am running MBS 3.0.5309.26857 on windows (on the same machine as WMC).
 
EDIT: I also just tried this on the new MBS  3.0.5326.13255 server version and I get the same results.
 
EDIT 2: I did a quick look in the MBS server log when it hits transcoding for the situation above where there is no Path attribute returned via json (which is what XBMB3C uses), that MBS does definitely have the correct filename and path info, but for some reason, when json asks for it it doesn't exist or send back the correct path.
2014-08-01 15:06:49.6625 Info - App: C:\Users\ERICA\AppData\Roaming\MediaBrowser-Server\ffmpeg\20140612\ffmpeg.exe -fflags +genpts -async 1 -vsync -1 -i file:"\\ERICA-PC\Recorded TV\American Dad_TBSHD_2014_08_01_14_14_41.wtv" -map_metadata -1 -threads 2 -sn -codec:v:0 libx264 -preset superfast -crf 23 -maxrate 40000000 -bufsize 80000000 -vsync vfr -force_key_frames expr:gte(t,n_forced*7) -sc_threshold 0 -codec:a:0 aac -strict experimental -af "adelay=1,aresample=async=1000" -hls_time 7 -start_number 0 -hls_list_size 1440 -hls_base_url "hls/8734131142c2cae36d569213bec4b75b/" -y "C:\Users\ERICA\AppData\Roaming\MediaBrowser-Server\transcoding-temp\8734131142c2cae36d569213bec4b75b.m3u8"

 

Link to comment
Share on other sites

LehighBri

it's the path that is given to us by the live tv provider.

 

Right.  In my case I use serverwmc, and there's two scenarios we are seeing where MBS is not behaving as we expect:

 

1. Let's say MBS pulls in my list of recordings, then I change my WMC recording path to be a different path; when I restart MBS, while serverwmc does indeed send the updated/new recording path to MBS, MBS does NOT update it's path information and still uses the old path when I would think the path should be updated

 

2. In my example above, for some reason my path variable doesn't exist.  Same story... serverwmc definitely is providing the right path info to MBS, but MBS isn't taking it for some reason.

 

Thoughts?

Link to comment
Share on other sites

krustyreturns

@@Luke, just to recap my experience: Initially when @@LehighBri and other users use the 'play to' xbmc feature, the xbmc MBS addon complained that the paths were local paths.  So I fixed this in serverwmc, so that the user can configure it to send only UNC paths.  However MBS still uses the old local paths that were sent previously for the recordings, even though serverwmc is now sending UNC paths.  Even restarting MBS didn't make a difference.  The only way I could get MBS to start using the new UNC paths was to remove the recordings, refresh MBS so that it no longer saw the recordings, then put the recordings back.

 

It does seem like once MBS gets a path for a recording, then is no way to update that path later with a new value.

Link to comment
Share on other sites

  • Solution
LehighBri

I just saw the blog the Media Browser Server 3.0.5336 Beta Released blog post and noticed that it includes the following fix "Live TV recording paths not updating".  Sounds like this will fix the issue in this thread?  Great news if so!

 

I'm using stable releases so won't test this yet, but look forward to trying it out once the stable version is released.

Edited by LehighBri
Link to comment
Share on other sites

mini__me

Recordings now direct play :)

 

Live TV still transcodes, is this something that can be also played directly without transcoding as well?

Link to comment
Share on other sites

  • 3 weeks later...
LehighBri

Recordings now direct play :)

 

Live TV still transcodes, is this something that can be also played directly without transcoding as well?

 

I would think so.  Ultimately Live TV is still playing back from a file so I don't think transcoding should be used.  Can you maybe start another post about this with some logs?  Seems like a potential bug in the transcoding logic.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...