2

I'm developing on using VS2010 with ffmpeg and tried the code from here. But VS says that it cannot find

  1. CODEC_FLAG2_BPYRAMID+CODEC_FLAG2_MIXED_REFS+CODEC_FLAG2_WPRED+CODEC_FLAG2_8X8DCT+CODEC_FLAG2_FASTPSKIP; // flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip
  2. X264_PART_I8X8+X264_PART_I4X4+X264_PART_P8X8+X264_PART_B8X8
  3. avCodecContext.crf

Where are they located?

Community
  • 1
  • 1
theateist
  • 13,879
  • 17
  • 69
  • 109
  • They are in `libavcodec\avcodec.h` and other FFmpeg files you are supposed to include to access the constants and other declarations. – Roman R. Nov 25 '12 at 16:12
  • I downloaded the source from http://ffmpeg.zeranoe.com/builds/. I searched in WHOLE source directory and didn't find any CODEC_FLAG2_BPYRAMID. Even not in`libavcodec\avcodec.h`. What I'm missing? – theateist Nov 25 '12 at 16:28
  • 2
    This particular flag is [deprecated](http://ffmpeg.mplayerhq.hu/doxygen/trunk/group__deprecated__flags.html). You are supposed to used named option `b-pyramid` instead. – Roman R. Nov 25 '12 at 16:46
  • @RomanR. the reason I ask is because I has fps issues when transcoding from avi to h264/mp4 (http://libav-users.943685.n4.nabble.com/Libav-user-fps-porblem-when-saving-video-in-mp4-container-td4656102.html) I think my params in code are wrong, so I checked which params the ffmpeg application itself uses in order to convert from avi to mp4 and I thought to map them to params in **code**, but I couldn't map many of them. I'll be glad for some help. If I need to open different post I'll do it. – theateist Nov 26 '12 at 07:37
  • I saw your question on FFmpeg mailing list, maybe someone there will respond to you with a code snippet or anything better than my reference to documentation and source code. My understanding is that you need to use named options, and the code you found was for older version of `libav*`. – Roman R. Nov 26 '12 at 07:43
  • Yes, thank you. The problem that I've posted my issue in many forums and still no one gave me solution:( – theateist Nov 26 '12 at 08:53

1 Answers1

2

As @RomanR said, some flags and params were deprecated. But, we can still set them using av_opt_set function. For example, to set crf=23 we use av_opt_set(outStream->codec->priv_data, "crf", "23", 0);

theateist
  • 13,879
  • 17
  • 69
  • 109