- I have version 0.73.4, running as service, scanning directories automatically every 10 minutes. The checkbox media-resources/scanning/read file properties of new files when scanning is checked.
- The UI is not running
- I have a sony bravia 32ex700.
- I put a new file (a .mts file from my camcorder) in one of the watch folders. It appeared on the TV and was playable. So far so good. However, I noticed the duration was unknown, skipping and fastforward did not work.
- So I looked on my server and started the UI. After the program scanned the directories on startup, I could see the file properties were unknown. So I manually clicked 'load file properties', which worked.
It appears there is a bug causing the file properties of the new file not to be read at that time. Perhaps the scanning routine should not mark files as already scanned when it has not read the file properties succesfully.
bug reading file properties of new files
Re: bug reading file properties of new files
I could not repeat this problem, the server does not include files (open for writing) to the library.ajuga wrote:- I have version 0.73.4, running as service, scanning directories automatically every 10 minutes. The checkbox media-resources/scanning/read file properties of new files when scanning is checked.
- The UI is not running
- I have a sony bravia 32ex700.
- I put a new file (a .mts file from my camcorder) in one of the watch folders. It appeared on the TV and was playable. So far so good. However, I noticed the duration was unknown, skipping and fastforward did not work.
- So I looked on my server and started the UI. After the program scanned the directories on startup, I could see the file properties were unknown. So I manually clicked 'load file properties', which worked.
It appears there is a bug causing the file properties of the new file not to be read at that time. Perhaps the scanning routine should not mark files as already scanned when it has not read the file properties succesfully.
Re: bug reading file properties of new files
Perhaps the following will help.
I added some more camcorder files. After adding the files I immediately watched the .mts fragments on my other TV, connected to the same computer via hdmi, using mediaportal. Then later that evening I watched them on my Sony, connected via LAN to WMS. Of the files I watched using mediaportal the file properties missed. Only one file, which I didn't watch immediately had file properties. So I do think its some kind of file locking isssue. Apparently WMS can open it for reading but the file properties tool can not (at that time), because it uses a different open mode.
I added some more camcorder files. After adding the files I immediately watched the .mts fragments on my other TV, connected to the same computer via hdmi, using mediaportal. Then later that evening I watched them on my Sony, connected via LAN to WMS. Of the files I watched using mediaportal the file properties missed. Only one file, which I didn't watch immediately had file properties. So I do think its some kind of file locking isssue. Apparently WMS can open it for reading but the file properties tool can not (at that time), because it uses a different open mode.
Re: bug reading file properties of new files
I could not repeat this problem, but you can use the script processing media resources to read the propertiesajuga wrote:Perhaps the following will help.
I added some more camcorder files. After adding the files I immediately watched the .mts fragments on my other TV, connected to the same computer via hdmi, using mediaportal. Then later that evening I watched them on my Sony, connected via LAN to WMS. Of the files I watched using mediaportal the file properties missed. Only one file, which I didn't watch immediately had file properties. So I do think its some kind of file locking isssue. Apparently WMS can open it for reading but the file properties tool can not (at that time), because it uses a different open mode.
Settings-Processing-Add
Name - Read Properties
Script:
Code: Select all
var
i: Integer;
AllVideoFolder: TWmsScriptMediaItem;
begin
AllVideoFolder := WmsFindMediaFolder(mfVideoAllMoviesItemID);
if (AllVideoFolder <> nil) and (AllVideoFolder.ChildCount > 0) then
for i := 0 to AllVideoFolder.ChildCount - 1 do
if VarToStr(AllVideoFolder.ChildItems[i].Properties[mpiVideoCodec]) = '' then try
AllVideoFolder.ChildItems[i].RetrieveProperties;
except end;
WmsDatabaseAutoSave;
ProcessMediaResult := True
end.
Re: bug reading file properties of new files
Thanks Eugene! I was searching for a Wms-function but couldn't find it. It didn't occur to me to look at the classes.
Could you nevertheless (in some future version) write debug information of the call to mediainfo.dll to wms.log.
Could you nevertheless (in some future version) write debug information of the call to mediainfo.dll to wms.log.
Re: bug reading file properties of new files
You can try wmsmpeg.exe -i "filename", during watching a movie in MediaPortalajuga wrote:Thanks Eugene! I was searching for a Wms-function but couldn't find it. It didn't occur to me to look at the classes.
Could you nevertheless (in some future version) write debug information of the call to mediainfo.dll to wms.log.
Re: bug reading file properties of new files
I've implemented the script but I had to change Properties[mpiVideoCodec] in Properties[mpiTimeLength] to make it work correctly.
Apparently sometimes on a first call to mediainfo.dll the video codec can be identified but the duration can not. Maybe because the file was still being written. This is also what makes it so hard to reproduce.
Mediaportal had nothing to do with it.
Apparently sometimes on a first call to mediainfo.dll the video codec can be identified but the duration can not. Maybe because the file was still being written. This is also what makes it so hard to reproduce.
Mediaportal had nothing to do with it.
Re: bug reading file properties of new files
Just for information, WMS does not use mediainfo.dll for read properties.ajuga wrote:I've implemented the script but I had to change Properties[mpiVideoCodec] in Properties[mpiTimeLength] to make it work correctly.
Apparently sometimes on a first call to mediainfo.dll the video codec can be identified but the duration can not. Maybe because the file was still being written. This is also what makes it so hard to reproduce.
Mediaportal had nothing to do with it.