Log in

View Full Version : Parameters for low frame rate?


dace1234
21st May 2013, 22:48
I am trying to encode video with an extremely low frame rate (about 1-2 fps) and I'm having a lot of difficulties playing it in many players (VLC, windows media player, etc). I am using the libx264 API with ffmpeg.

I was just wondering if anyone knew a good combination of preset/tune and other parameters to use for this. I have even tried just keeping 30fps but duplicating the images, but even then I have some problems in certain players. Players will skip frames, pause for like 5 seconds or more, or the video will look blurry and corrupted. But as soon as I speed things up the problems disappear.

Thanks!

filler56789
22nd May 2013, 01:10
Even though the actual problem must be in the players you've chosen :sly: , and not in the x264 encoder :) , my suggestion is disable B-frames, or even set the GOP length to 1, since the framerate is so low.

LoRd_MuldeR
22nd May 2013, 01:16
If the players, for whatever reason, cannot deal well with those ultra-low frame rates, you can just duplicate each frame like 10x to get 10 fps to 20 fps, as a workaround.

Exact duplicates should be very cheap to encode...

dace1234
22nd May 2013, 18:44
Sorry this may be a newbie question, but what is the parameter in the x264 API for disabling b frames? And also for setting the gop size? I did a search in x264.h, and I found the following definitions, but I don't which variable to assign them to:

#define X264_B_ADAPT_NONE 0
#define X264_B_ADAPT_FAST 1
#define X264_B_ADAPT_TRELLIS 2


#define X264_OPEN_GOP_NONE 0
#define X264_OPEN_GOP_NORMAL 1
#define X264_OPEN_GOP_BLURAY 2

Is this even what I would use?

Thanks!

poisondeathray
22nd May 2013, 19:11
I am using the libx264 API with ffmpeg.

.
.
Sorry this may be a newbie question, but what is the parameter in the x264 API for disabling b frames? And also for setting the gop size? I did a search in x264.h, and I found the following definitions, but I don't which variable to assign them to:


In ffmpeg libx264

-bf 0 to disable b frames
-g for gop size

poisondeathray
22nd May 2013, 19:13
Even though the actual problem must be in the players you've chosen :sly: , and not in the x264 encoder :)

Exactly ; I've used 1 FPS no problems in many players before


@ dace1234 - this is probably a playback or configuration issue, can you be more specific about what players , decoders and/or conditions this occurs under ?

J_Darnley
22nd May 2013, 22:14
Sorry this may be a newbie question, but what is the parameter in the x264 API for disabling b frames? And also for setting the gop size? I did a search in x264.h, and I found the following definitions, but I don't which variable to assign them to:

#define X264_B_ADAPT_NONE 0
#define X264_B_ADAPT_FAST 1
#define X264_B_ADAPT_TRELLIS 2


#define X264_OPEN_GOP_NONE 0
#define X264_OPEN_GOP_NORMAL 1
#define X264_OPEN_GOP_BLURAY 2

Is this even what I would use?

Thanks!

No, you would set the number of B-frames to 0 (zero), i_bframes or similar. As for the GOP size, i_keyint_max, or similar. Try reading the comments for the x264_param_t structure.