2

first time here. Please be gentle. let me know what I missed out on and I will correct it.

my question is similar to this. So, I am hoping to get an answer for my specific query too.

How can I convert .264 file to .mp4

I have an entire directory with frames in .h264 format. These are generated from WebRTC for a single video.

I am able to convert the very first frame to image. However, when I am trying it for the subsequent frames, I am getting an error with ffmpeg. I am assuming there might be some dependency on the prior frames because of which I am getting this error.

How can I convert all the frames in that directory to images (jpeg or png)

2 Answers2

2

Typical H.264 frames are interdependent, so most frames can't be decoded individually.

Use cat to combine them all and pipe to ffmpeg:

cat *.h264 | ffmpeg -i - frame-%04d.png
llogan
  • 12,348
0

You could try to use handbrake.

$ HandBrakeCLI -Z Universal -i myinputfile -o myoutputfile

I found it here. Maybe it'll help.

And pleases also provide the error message, so we can help you more effectively.

Ottega
  • 1