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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With