[FFmpeg-user] first frame is no keyframe

Robert Krüger krueger at lesspain.de
Fri Aug 3 08:03:58 CEST 2012


On Thu, Aug 2, 2012 at 8:09 PM, Roger Pack <rogerdpack2 at gmail.com> wrote:
>> I am using ffmpeg version 0.11.1 on my mac.  Basically I want to be able to
>> take XD Cam Ex.MOV's recorded at 18mbps transcode them with ffmpeg to
>> h.264.mp4's to play on an an fms server.  but whenever I do any of this
>> transcoding with ffmpeg, I get the warning "[mpeg2video @ 0x1a2e3360]
>> warning: first frame is no keyframe" and the audio is 6 frames or so early
>> because the fms server won't start playing the video until it sees a
>> keyframe.
>
> what codec is input.mov? mpeg2?
> Is the first frame a keyframe? (ffprobe -show_packets I think should
> tell you...)
>
> I think this is related to a question I asked earlier but received no
> answer...[1]
>
> [1] https://lists.ffmpeg.org/pipermail/ffmpeg-user/2012-July/007925.html
> It appears to also have been discussed in some detail in this thread:
> http://ffmpeg.org/pipermail/libav-user/2012-July/002510.html
> I'll probably add to that discussion...
> -r
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

All XDCAM files I have seen (exported by Final Cut Pro or directly
written by Sony Cameras) start with a B-frame that is completely
intact. This might seem strange but AFAICS the spec allows B-frames to
only have a forward reference, which is probably the case in those
files since the frame decodes and looks fine in all samples I have
looked at with ffmpeg. I think it was Baptiste who once said the
message was bogus and I tend to agree. However, ffmpeg reports an
incorrect start time for the video stream of these files
(http://ffmpeg.org/trac/ffmpeg/ticket/479) which might be related to
it starting with B-frames as ffmpeg seems to incorrecly use the pts of
the first I-Frame as the first pts of the stream (definition of start
time for a stream, see docs). No idea in what places this might cause
errors like A/V shift. I haven't tested that thoroughly.

Hope this helps somewhat.

Regards,

Robert


More information about the ffmpeg-user mailing list