File is open in Shell Infrastructure Host after Editing Videos via build in Windows Editing App.
Microsoft provides build in video editing app that supports image editing and video editing advanced tools. Many Windows users and developers face a error while trimming and editing videos.
If you have used the Photos app to quickly edit video clips for some time. Since updating to Windows 10 version 2004 a couple months ago, randomly encounter this error message when attempting to delete a clip I have edited, even after closing Photos and other open programs.
If this error arise in your system during editing or saving or at closing time, that means you must have to fix it until unless allow you to perform editing operations. Some task related to Microsoft Video App is running on background in system memory that is not visible to us and stopping us to perform other operation.
Example:
Edited (trimmed) an .mp4 video file in Windows' built-in Photos* app. Your only option for saving your changes is to "Save a Copy..." (i.e., you can't save the changes using the same file and filename that you're editing). After Saving a Copy, I now have the original (untrimmed) file in a folder from whence I can neither rename it nor delete it because the "File In Use" error appears ("...because the file is open in Shell Infrastructure Host"). It seems like just waiting doesn't eventually cause the system to relinquish control.
How to fix "file is open in Shell Infrastructure" error.
Option 1.)
The only way to delete it is to restart the system or end Shell Infrastructure Host in the Task Manager, after which it automatically restarts. This error can avoided once after shutdown the system but may be possible that come again when doing same thing .
After this execution system will killed all the task forcefully, all unsaved work will lost as well. Then after visiting Windows video editing App you can perform operations.
Option 2.) Make a new folder then delete the video .
To fix it, I made a new folder, dragged the file into it and then deleted it from in there. If you are facing continuously same problem when delete the processed video and images, so try to make a new folder in your directory and move the content on the new created folder after that again try to delete the content from the new folder.
You have to try update the system version with latest one that may have a chance to solve your problem
How to Edit or open content on Microsoft build in video App:
there are two options to opening/editing videos in Photos!
(a) right click the video file, open with Photos, 'Edit & Create', Trim (or other stuff).
(b) (which I think gives you more options/control) open Photos, click 'Video Editor', click 'New video project', name your 'New video' (or 'Skip' if you don't want to), click '+ Add' & choose source (or just drag it from the folder the video you want to edit is in), drag down to the Storyboard, and off you go.
You can export ('Finish video', top right) wherever you want to and replace pre-existing video if that's what you want to do.