[FFmpeg-devel] [PATCH] libavformat/qsvenc: repeat mpeg2 missing headers [v2]

Li, Zhong zhong.li at intel.com
Thu May 30 09:06:37 EEST 2019


> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Andreas HÃ¥kon
> Sent: Tuesday, May 28, 2019 6:48 PM
> To: FFmpeg development discussions and patches
> <ffmpeg-devel at ffmpeg.org>
> Subject: [FFmpeg-devel] [PATCH] libavformat/qsvenc: repeat mpeg2 missing
> headers [v2]
> 
> Hi,
> 
> This patch supersedes #13105 (https://patchwork.ffmpeg.org/patch/13105/)
> 
> A new (simpler and more robust) implementationof of the reinsertion of the
> missing headers in the MPEG-2 bitstream from the HW QSV encoder.
> 
> The problem is quite simple: The bitstream generated by the MPEG-2 QSV
> encoder only incorporates the SEQ_START_CODE and EXT_START_CODE
> headers in the first GOP. This generates a result that is not suitable for
> streaming or broadcasting.
> With this patch the "mpeg2_qsv" encoder is at the same level as the
> "mpeg2video", as the software implementation repeats these headers by
> default in each GOP.
> 
> Regards.
> A.H.

1. Doesn't dump_extra filter to add extradata to all key packets work well?
2. You always insert such a repeat header without any option to turn it off, thus should not be default behavior IMHO. 



More information about the ffmpeg-devel mailing list