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

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Feb 21 01:21:42 EET 2019

2019-02-20 10:32 GMT+01:00, Ted Park <kumowoon1025 at gmail.com>:
>> The original video seems problematic, so FFmpeg outputs
>> several lines of "co located POCs unavailable" error. The
>> error message is printed in `h264_direct.c/ff_h264_direct_ref_list_init`,
>> 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?
> It doesn’t.

I may misunderstand this but in any case as Moritz explained
libavformat will use the decoder to know the properties of the
stream (you cannot avoid this), the properties are typically
necessary for the muxer to actually implement "-c copy" (even
if not needed in all cases).
Not all frames are decoded but some frames in the
beginning of the stream (for some codecs).

Carl Eugen

More information about the ffmpeg-user mailing list