video-thumbnails

iOS - How to get thumbnail from video without play?

佐手、 提交于 2019-11-30 03:19:13
问题 I'm trying to get thumbnail from video and show it in my tableview. Here is my code: - (UIImage *)imageFromVideoURL:(NSURL *)contentURL { AVAsset *asset = [AVAsset assetWithURL:contentURL]; // Get thumbnail at the very start of the video CMTime thumbnailTime = [asset duration]; thumbnailTime.value = 25; // Get image from the video at the given time AVAssetImageGenerator *imageGenerator = [[AVAssetImageGenerator alloc] initWithAsset:asset]; CGImageRef imageRef = [imageGenerator

How to generate the Thumbnail of video URL flv format?

北城以北 提交于 2019-11-29 12:43:43
How can i get the Thumbnail of URL my video url like below http://ServerDomain/streams/16476084045/3d4659d8e93bdfbdb3619a4a684c93be.flv I am using this below code AVURLAsset *asset1 = [[AVURLAsset alloc] initWithURL:url options:nil]; AVAssetImageGenerator *generator = [[AVAssetImageGenerator alloc] initWithAsset:asset1]; generator.appliesPreferredTrackTransform = YES; //Set the time and size of thumbnail for image NSError *err = NULL; CMTime thumbTime = CMTimeMakeWithSeconds(0,30); CGSize maxSize = CGSizeMake(425,355); generator.maximumSize = maxSize; CGImageRef imgRef = [generator

It is possible to display a video thumbnail from a URL on Android 4 and above?

主宰稳场 提交于 2019-11-29 07:52:41
问题 Both of the below works fine on the emulator (2.3.3), but on a real device (Nexus S with 4.1.2) no image is shown for the thumbnail. I will also try to run it on an Android 4 Emulator . If I set a default android:src for the ImageView , it is not shown anymore then. This makes me think that it is replaced, but the ImageView is empty. public class MainActivity extends Activity { ImageView img; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

Getting same Video Thumbnail Image every time from the Url in Swift iOS

℡╲_俬逩灬. 提交于 2019-11-28 12:23:50
问题 I am developing a video based Application in Swift3. Where I have one video url and a Range Slider according to the video duration and user can select any minimum and maximum value from slider. If suppose user has selected min value 3 Sec and Max Value 7 Sec, So for this duration I need to generate a Video Thumbnail Image. For this I am using AVAssetImageGenerator to generate this, I tried below both code to achieve this : func createThumbnailOfVideoFromFileURL(_ strVideoURL: URL) -> UIImage?

How to generate the Thumbnail of video URL flv format?

感情迁移 提交于 2019-11-28 06:12:24
问题 How can i get the Thumbnail of URL my video url like below http://ServerDomain/streams/16476084045/3d4659d8e93bdfbdb3619a4a684c93be.flv I am using this below code AVURLAsset *asset1 = [[AVURLAsset alloc] initWithURL:url options:nil]; AVAssetImageGenerator *generator = [[AVAssetImageGenerator alloc] initWithAsset:asset1]; generator.appliesPreferredTrackTransform = YES; //Set the time and size of thumbnail for image NSError *err = NULL; CMTime thumbTime = CMTimeMakeWithSeconds(0,30); CGSize

Getting a thumbnail of a *.mov video IOS

≡放荡痞女 提交于 2019-11-28 05:35:01
I want to get a thumbnail of videos (*.mov) which taken with iPhone/iPAD. I am trying to use AVFoundation library for this and getting this error: couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11822 "Cannot Open" UserInfo=0x15d90a30 {NSLocalizedDescription=Cannot Open, NSLocalizedFailureReason=This media format is not supported.} Code: NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentDir=[paths objectAtIndex:0]; NSString *videoPath=[documentDir stringByAppendingPathComponent:[NSString

Creating Thumbnail for Video in iOS

主宰稳场 提交于 2019-11-28 05:27:10
I have an application that I am developing for the iPhone. What it does is, it captures the video from the camera and stores the video file onto the File System. I need to create a Thumbnail Image of this video file before I save the Image to the File System. My motive is to show a list of thumbnails of the created video so that the user can select a specific thumbnail to play the desired file. Could someone please advise on how I can create a Thumbnail image of a video file that has been captured by the Camera. Also, can you please advise if I can create a Thumbnail of an existing video file

Create thumbnail from video file via file input

痞子三分冷 提交于 2019-11-28 04:41:08
I am attempting to create a thumbnail preview from a video file (mp4,3gp) from a form input type='file' . Many have said that this can be done server side only. I find this hard to believe since I just recently came across this Fiddle using HTML5 Canvas and Javascript. Thumbnail Fiddle The only problem is this requires the video to be present and the user to click play before they click a button to capture the thumbnail. I am wondering if there is a way to get the same results without the player being present and user clicking the button. For example: User click on file upload and selects

How to create a video thumbnail from a video file path in Android?

丶灬走出姿态 提交于 2019-11-27 21:38:47
问题 I want to create a thumbnail of a video from the SD card path. How can I do that? 回答1: You can use ThumbnailUtils class to get Video thumbnail of Video file. createVideoThumbnail() is method which return Bitmap (thumbnail) of video from video file path. From Android Docs: public static Bitmap createVideoThumbnail (String filePath, int kind) Create a video thumbnail for a video. May return null if the video is corrupt or the format is not supported. You can create VideoThumbnail from sdcard

Create thumbnail from video file via file input

假装没事ソ 提交于 2019-11-27 19:17:53
问题 I am attempting to create a thumbnail preview from a video file (mp4,3gp) from a form input type='file' . Many have said that this can be done server side only. I find this hard to believe since I just recently came across this Fiddle using HTML5 Canvas and Javascript. Thumbnail Fiddle The only problem is this requires the video to be present and the user to click play before they click a button to capture the thumbnail. I am wondering if there is a way to get the same results without the