Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It's possibile to extract a raw frame from an h264 file?

I need to have a raw image from my sensor, but I have only h264 video files. Is there a way to extract a frame raw?

like image 873
JosephITA Avatar asked Aug 21 '15 14:08

JosephITA


1 Answers

You can use FFmpeg:

Extract a raw H.264 frame:

ffmpeg -i input.h264 -c:v copy -frames:v 1 -f h264 frame.h264

Extract the frame as PNG:

ffmpeg -i input.h264 -frames:v 1 -f image2 frame.png

To extract a specfic frame (25th frame):

ffmpeg -i input.h264 -c:v libx264 -filter:v "select=gte(n\,25)" -frames:v 1 -f h264 frame.h264

like image 83
aergistal Avatar answered Nov 15 '22 11:11

aergistal