キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Convert MPEG to multiple JPEGs

解決済み
解決策を見る

Hello everyone,

 

I have been working on a project in which I have to analyze individual frames in jpeg format.  The problem is that I am given these frames in an mpeg clip of approximately 30 seconds.  I was wondering if anyone knows a way, or has any suggestions as to how I could extract the individual frames from the mpeg file and save all of them using the jpeg format.

 

Thanks in advance,

Justin

メッセージ1/6
5,665件の閲覧回数

Don't know if the Vision Module software can do that, but I'd guess your best option is just to Google for a tool to do this.

0 件の賞賛
メッセージ2/6
5,647件の閲覧回数

Maybe you can try to use VLC with command line option ("System Exec.vi" with LabVIEW).

In this way you can extract a JPG file for every frame. After this you can analyze these single JPG frame.

 

Regards

Golziante

0 件の賞賛
メッセージ3/6
5,639件の閲覧回数
解決策
受理者 jutayo23

Hi,

 

There are two possible ways to do this.

 

First way - just "stand alone" solution (without LabVIEW) as mentioned above. You can use ffmpeg  for conversion, something like that:

 

ffmpeg -i TEST.MP4 -r 1 -s 1280x720 -f image2 foo-%03d.jpeg

 

Another way - If you want to do this in LabVIEW, then first you have to convert your MPEG video to RAW video (as far as I remember, NI VIsion AVI functions have troubles with MPEG files, at least with my files).

You can convert your video with mencoder something like that:

 

mencoder TEST.MP4 -ovc raw -oac copy  -vf format=yv12 -o out.avi

 

Then you should be able to read this video with AVI functions with VDM (these functions have troubles with large HD videos) or ADV into IMAQ Image and saving images in JPEG format.

 

Best regards,

 

Andrey.

 

メッセージ4/6
5,606件の閲覧回数

Thank you for your help everyone.

 

The solution I decided to go with was to convert the mpeg file to an avi using command line, then access the files through labview and separate the individual frames to analyze.

 

Thanks again,

Justin Yost

0 件の賞賛
メッセージ5/6
5,561件の閲覧回数

Hi Justin, hope you're still out there six years later.

What did you actually use to convert the files using the command line, mencoder?

Thanks,

BG

0 件の賞賛
メッセージ6/6
4,297件の閲覧回数