Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have encoded a video from Lagarith to H.264 using x264, and I might have inadvertently forgotten to write down it's framerate. The video stream itself isn't in any container (just a h264 file), so it doesn't have any dimension or framerate headers. I can't re-encode the video as it took 4 days to encode and is 66gb.

If it helps, I know that fps = (number of frames)/duration, and I have a FLAC file that is exactly the same length, but I don't know to get the number of frames from the h264 file and the exact length of the FLAC file.

How would I go about finding the framerate of the video?

share|improve this question

You could try and wrap the .264 bitstream into a container with MP4Box:

mp4box -add input.264 -new

Then, identify the frame rate as usual with any playback tool, or MediaInfo. That, however, might not work out of the box. You can try specifying the frame rate like this:

mp4box -add input.264 -fps 30

Now, all you have to do is try different frame rates and see if they'll give you correct output. Start with these:

  • 24
  • 25
  • 29.97
  • 30
  • 50
  • 60
share|improve this answer

It turned out that the master was encoded incorrectly. Apparently Adobe Media Encoder CS6 has some issues with the Lagarith VfW codec. I played it in VirtualDub and the audio was almost an hour out of sync with the video (It's 3hrs long). So I'll have to get AME to export it to raw video(which I know works) then encode to H.264 and Lagarith.

And looking at the x264 logs in my temp folder, apparently the framerate was 5650/143 fps.

Thanks for the help anyway :)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .