user1090249
user1090249

Reputation:

libx264 - Setting up AVCodecContext for HD & SD capturing

I'm trying to configure the AVCodecContext properly in order to capture HD in real-time (1080i) and SD (720 x 576) - also interlaced. I'm using libx264 with the ffmpeg static lib on Windows OS. If anybody can help with flags, gop_size, max_b_frames and all other AVCodecContext's members...

For example, I guess I should have CODEC_FLAG_INTERLACED_ME | CODEC_FLAG_INTERLACED_DCT flags set. However, what I need is the whole story on how to set all this up.

Upvotes: 0

Views: 360

Answers (2)

Dundar
Dundar

Reputation: 1249

If you are aiming for real time encoding, just use:

x264_param_default_preset(&param, "ultrafast", "zerolatency");

This will set what you need. You may want to set VBV parameters on top of this if you have bandwidth requirements.

Upvotes: 1

alex strange
alex strange

Reputation: 1249

Don't set any options unless you know they're already not right for you. libav 0.8 sets everything correctly by default.

Upvotes: 0

Related Questions