I want to ask that there are application available in which user can connect USB to Android via OTG cable device and play the media (specially videos) contained by it.
i
Dividing the video in multiple sub videos may work for you.
What I suggest : instead of saving full video in one temp path, divide that video in multiple sub videos and then replaced AVPlayerItem property of AVPlayer accordingly.
So now functionality is working same as video streaming . :)
You can also convert the CMSampleBuffer that the AVAssetReader returns into a CGImage and then a UIImage and display that in a UIImageView, to render the frames as they are pulled out of the original video file.
There is example code inside the AVFoundation Programming Guide that shows how to do this conversion.
After researches of many days i have found the solution
https://github.com/1hakr/AnExplorer