[FFmpeg-user] Why does '-c:v copy' decode video frames?

Yukun Guo gyk.net at gmail.com
Wed Feb 20 08:28:12 EET 2019


I'm trying to transmux an H.264 movie in FLV container into raw H.264 in
Annex.B format:

    ffmpeg -i movie.flv -c:v copy -an -bsf:v h264_mp4toannexb movie.264

The original video seems problematic, so FFmpeg outputs several lines of
"co located POCs
unavailable" error. The error message is printed in
which is further called by `h264dec.c/h264_decode_frame`. What confuses me
is why does the copy
codec still try to decode H.264 frames and even do motion vector
prediction? If I understand
correctly, FFmpeg can simply extract SPS/PPS from
AVCDecoderConfigurationRecord and copy slice data
verbatim. Besides that, I find `h264_decode_frame` is only called sparsely,
not as many as the
actual frame number.

Could any FFmpeg experts explain why this occurs?

More information about the ffmpeg-user mailing list