Page 1 of 1
bug reading file properties of new files
Posted: Wed Apr 28, 2010 7:56 pm
by ajuga
- 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
Posted: Thu Apr 29, 2010 10:50 am
by Eugene
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.
I could not repeat this problem, the server does not include files (open for writing) to the library.
Re: bug reading file properties of new files
Posted: Thu Apr 29, 2010 8:45 pm
by ajuga
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.
Re: bug reading file properties of new files
Posted: Fri Apr 30, 2010 2:58 pm
by Eugene
ajuga 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.
I could not repeat this problem, but you can use the script processing media resources to read the properties
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.
Setup schedule
Re: bug reading file properties of new files
Posted: Fri Apr 30, 2010 3:27 pm
by ajuga
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
Posted: Sat May 01, 2010 4:46 am
by Eugene
ajuga 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.
You can try wmsmpeg.exe -i "filename", during watching a movie in MediaPortal
Re: bug reading file properties of new files
Posted: Mon May 10, 2010 7:49 am
by ajuga
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.
Re: bug reading file properties of new files
Posted: Mon May 10, 2010 8:14 am
by Eugene
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.
Just for information, WMS does not use mediainfo.dll for read properties.