Add extradata to the beginning of the filtered packets except when said packets already exactly begin with the extradata that is intended to be added.
- freq
-
The additional argument specifies which packets should be filtered. It accepts the values:
- k, keyframe
-
add extradata to all key packets
- e, all
-
add extradata to all packets
If not specified it is assumed k.
For example the following ffmpeg command forces a global
header (thus disabling individual packet headers) in the H.264 packets
generated by the libx264 encoder, but corrects them by adding
the header stored in extradata to the key packets:
ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts