2

I encode a picture following the link How does one encode a series of images into H264 using the x264 C API?, but every time x264_encoder_encode(encoder, &nals, &i_nals, &pic_in, &pic_out) returns 0.

Community
  • 1
  • 1
cmm427
  • 21
  • 1
  • 2
  • A bit vague to be answered; I suggest enabling logs in ffmpeg and checking; BTW, doesn't a return value of 0 indicate success? – vine'th Sep 06 '11 at 03:59

1 Answers1

1

What does x264_encoder_delayed_frames return? According to KillianDS's edit at the bottom, x264_encoder_encode may return 0 if there are delayed frames.

When you use other parameters there will be delayed frames, this is not the case with my parameters (mostly due to the nolatency option). If this is the case, frame_size will sometimes be zero and you'll have to call x264_encoder_encode as long as the function x264_encoder_delayed_frames does not return 0. But for this functionality you should take a deeper peek into x264.c and x264.h .

Community
  • 1
  • 1
Joshua
  • 8,112
  • 3
  • 35
  • 40