Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to grab a frame from a video?

Tags:

c#

.net

image

video

I have searched for this issue, for at least one week and I did not find something helpful.

The question is that I want to grab a frame from a video uploaded using C#. I used some APIs but they only grab frame from avi, mpeg and mpg files but when the client uploads an m4v, 3gp, mov, m2v or mp4 file, the respective APIs found on the web do not support retrieving the frames from these types of videos.

Am I missing something or is there an API that can handle retrieving frames from all types of videos in C#.

Thanks in advance

like image 946
Khaldoun Avatar asked Oct 10 '22 06:10

Khaldoun


1 Answers

Solutions to this will vary per video encoding type. You will be hard-pressed to find one system to support them all.

You might consider executing a call to ffmpeg to generate the output you desire as it supports a very large variety of formats. See this question for a few .NET-based ffmpeg wrappers that may be helpful.

like image 81
Nathan Taylor Avatar answered Oct 13 '22 01:10

Nathan Taylor