[FFmpeg-devel] [FFMPEG DEVEL] [PATCH v2] fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)
Marton Balint
cus at passwd.hu
Sat May 18 19:20:43 EEST 2019
On Fri, 17 May 2019, Antonin Gouzer wrote:
> Thanks in advance.
> ---
> fftools/ffprobe.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> index dea489d02e..4763ce6d98 100644
> --- a/fftools/ffprobe.c
> +++ b/fftools/ffprobe.c
> @@ -2199,6 +2199,14 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
> char tcbuf[AV_TIMECODE_STR_SIZE];
> av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data));
> print_str("timecode", tcbuf);
> + } else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size >= 8) {
> + uint32_t *tc = (uint32_t*)sd->data;
> + for (int j = 1; j <= tc[0]; j++) {
> + char tcbuf[AV_TIMECODE_STR_SIZE];
> + av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0);
> + print_str("timecode", tcbuf);
> + }
> + break;
A frame can have GOP_TIMECODE and S12M_TIMECODE side data at the same
time, a separate name (e.g. s12m_timecode) should be used and the ffprobe
xsd should be extended accordingly.
Regards,
Marton
More information about the ffmpeg-devel
mailing list