home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
Featured Plugins
MP2Extended
Plugin: MP2Extended
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="henso" data-source="post: 1158227" data-attributes="member: 119106"><p>The TranscodingService metadata extractors uses the MediaAnalyzer which again uses the following code:</p><p>[CODE=C#]ProcessExecutionResult executionResult;</p><p>lock (FFPROBE_THROTTLE_LOCK)</p><p> executionResult = FFMpegBinary.FFProbeExecuteWithResourceAccessAsync(lfsra, arguments, ProcessPriorityClass.Idle, AnalyzerTimeout).Result;[/CODE]</p><p>Looks familiar? Only difference is FFProbe vs FFMpeg, so that should not cause the problem right? </p><p>MediaAnalyzer also additionally accesses the file if the codec is H264 or the container is MPEG2 TS. I can see from the log that it is MPEG2 TS containers so that could be the problem, but the call is like:</p><p>[CODE=C#]FileStream raf = null;</p><p>ILocalFsResourceAccessor lfsra = (ILocalFsResourceAccessor)info.Metadata.Source;</p><p>try</p><p>{</p><p> // Impersonation</p><p> using (ServiceRegistration.Get<IImpersonationService>().CheckImpersonationFor(lfsra.CanonicalLocalResourcePath))</p><p> {</p><p> raf = File.OpenRead(lfsra.LocalFileSystemPath);</p><p> byte[] packetBuffer = new byte[193];</p><p> raf.Read(packetBuffer, 0, packetBuffer.Length);</p><p> ....</p><p> }</p><p>}</p><p>finally</p><p>{</p><p> if (raf != null) raf.Close();</p><p>}[/CODE]</p><p>Which should be OK, right? Only thing I can see is that the FileStream is closed outside the scope of the impersonation, so I moved it inside. </p><p>Could that be the cause?</p></blockquote><p></p>
[QUOTE="henso, post: 1158227, member: 119106"] The TranscodingService metadata extractors uses the MediaAnalyzer which again uses the following code: [CODE=C#]ProcessExecutionResult executionResult; lock (FFPROBE_THROTTLE_LOCK) executionResult = FFMpegBinary.FFProbeExecuteWithResourceAccessAsync(lfsra, arguments, ProcessPriorityClass.Idle, AnalyzerTimeout).Result;[/CODE] Looks familiar? Only difference is FFProbe vs FFMpeg, so that should not cause the problem right? MediaAnalyzer also additionally accesses the file if the codec is H264 or the container is MPEG2 TS. I can see from the log that it is MPEG2 TS containers so that could be the problem, but the call is like: [CODE=C#]FileStream raf = null; ILocalFsResourceAccessor lfsra = (ILocalFsResourceAccessor)info.Metadata.Source; try { // Impersonation using (ServiceRegistration.Get<IImpersonationService>().CheckImpersonationFor(lfsra.CanonicalLocalResourcePath)) { raf = File.OpenRead(lfsra.LocalFileSystemPath); byte[] packetBuffer = new byte[193]; raf.Read(packetBuffer, 0, packetBuffer.Length); .... } } finally { if (raf != null) raf.Close(); }[/CODE] Which should be OK, right? Only thing I can see is that the FileStream is closed outside the scope of the impersonation, so I moved it inside. Could that be the cause? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Featured Plugins
MP2Extended
Plugin: MP2Extended
Contact us
RSS
Top
Bottom