[FFmpeg-devel] [PATCH 1/2] v2 SCTE extraction from mpegts

Carlos Fernandez Sanz carlos at ccextractor.org
Tue Jul 26 22:03:00 EEST 2016

On Mon, Jul 25, 2016 at 5:41 PM, Michael Niedermayer
<michael at niedermayer.cc> wrote:

> This breaks http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket1827/vc1_dts_mplayerAudioProblem_sb41_cut.m2ts

I need some help with this. HDMV audio is not detected correctly,
since we are giving priority to ISO based stream_type

817     mpegts_find_stream_type(st, pes->stream_type, ISO_types);
818     if (pes->stream_type == 4)
819         st->request_probe = 50;
820     if ((prog_reg_desc == AV_RL32("HDMV") ||
821          prog_reg_desc == AV_RL32("HDPR")) &&
822         st->codecpar->codec_id == AV_CODEC_ID_NONE) {
823         mpegts_find_stream_type(st, pes->stream_type, HDMV_types);

In the code above we are first giving priority to ISO_types, if ffmpeg
does not find any matching stream_type in ISO_types then it goes for
HDMV standard.

Possible solutions:
a) Give more priority to HDMV and HDPR then ISO_type,
b) Remove SCTE_35 codec id from ISO_type and put in MISC type

a) Is correct according to the standard but there must be some reason
for ISO_type being placed before HDMV.

More information about the ffmpeg-devel mailing list