[FFmpeg-user] Why does '-c:v copy' decode video frames?
ffmpeg at gyani.pro
Wed Feb 20 10:54:43 EET 2019
On 20-02-2019 11:58 AM, Yukun Guo wrote:
> 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?
FFmpeg opens the decoder to decode the codec config and populate stream
parameters. Muxers, in general, read these parameters, to generate headers.
More information about the ffmpeg-user