I am using mediainfo cli to get information about video. I call cli program using Process.Runtime. Now I want to use the same thing to grab the first frame from video using the mediainfo cli or any other solution which is base on this library and in java. I actually want to get info and frame from the video stored in s3 bucket. I get info of that video right now using the way calling cli program in java, but I want first frame from it also.
Asked
Active
Viewed 337 times
1
-
What do you mean "I want first frame"? The content itself i.e. the frame as it is encoded in the file? Not really the purpose of MediaInfo but doable, but if it is MP4, it would not be so easy for you, you also need the decoder config part and you have to manage both (config and frame)... – Jérôme Martinez Dec 15 '17 at 07:56
-
mine simple purpose is to create thumbnail of the video. So I am asking fore the first frame of video. I want to show first frame as image of the video – Dhaval Bhoot Dec 15 '17 at 08:18
-
1/ first frame of video is often a black frame, not sure it is relevant for your goal 2/ MediaInfo can analyze and also extract a frame, but will not decode then resize then encode, so you know how you'll do with the demuxed frame, right? else MediaInfo is not the right tool, you may prefer e.g. FFmpeg for this goal. Note: using MediaInfo for the demux part then FFmpeg library for encoding is possible, but not out of the box (means $ if you don't know how to do yourself). – Jérôme Martinez Dec 15 '17 at 08:29
-
I don't have much knowledge about encode decode of video or what is frame. My simple purpose is, can I get the .jpg file from video which is thumbnail of video using mediainfo? – Dhaval Bhoot Dec 15 '17 at 08:36
-
I simply want height, width of video, and a thumbnail image. I get height and width of video using mediainfo, but not found any example to extract .jpg file for thumbnail from video. – Dhaval Bhoot Dec 15 '17 at 08:39
-
@Jérôme Martinez Thank you for your help – Dhaval Bhoot Dec 15 '17 at 08:46
-
Your request becomes unclear: "thumbnail image" is not "frame from the video". Please clarify: do you want to extract the "thumbnail image" or the "first frame from the video"? – Jérôme Martinez Dec 15 '17 at 09:59
-
I want thumbnail image from video – Dhaval Bhoot Dec 15 '17 at 11:31
-
So we are back to the initial comment (i.e. not available out of the box with MediaInfo alone, development to do with FFmpeg alone if S3 is supported or MediaInfo for read and demux then FFmpeg) – Jérôme Martinez Dec 15 '17 at 15:01
-
yes we can consider FFmpeg alone if it is possible to use with s3. That is I have presigned url of video, or we can consider MediaInfo for read and demux then FFmpeg – Dhaval Bhoot Dec 16 '17 at 05:10