On Tue, Apr 20, 2021 at 12:44 AM Mao Hata <xt4...@gmail.com> wrote: > > The reason I created the patch was to fix the problem: when I transcode > a transport stream based on ARIB-STD-B24, the PTS/DTS is removed from > private_stream_1 streams, and, conversely, it is added to private_stream_2. > "ISO/IEC 13818-1 Table 2-17 - PES packet" (sorry, the table number may > have been shifted) defines the conditions under which PTS/DTS can exist > as follows: > > >if (stream_id != program_stream_map > > && stream_id != padding_stream > > && stream_id != private_stream_2 > > && stream_id != ECM > > && stream_id != EMM > > && stream_id != program_stream_directory > > && stream_id != DSMCC_stream > > && stream_id != ITU-T Rec. H.222.1 type E stream) { > > So, private_stream_2 can not insert PTS/DTS. In addition, "ARIB-STD-B24, > VOLUME3, Chapter5" defines private_stream_1 as "Synchronized PES" > (mainly used for subtitles, with PTS/DTS inserted) and > private_stream_2 as "Asynchronous PES" (mainly used for superinpose, no > PTS/DTS inserted).
I'm working on ARIB related patches for mpegtsenc.c and later I would like to provide a patch to fix the bug of private_stream_2. In current situation, mpegts_write_pes() incorrectly writes private_stream_2 with actually a private_stream_1-like PES header that shouldn't appear according to the ISO/IEC 13818-1 standard. Regards, zheng > From these things, I misunderstood like that " PTS/DTS is generally > inserted for private_stream_1, so the `if (stream_id == > STREAM_ID_PRIVATE_STREAM_1)` statement (I patched) must be a mistake! " ... > > Anyway, as I read the related code, I now understand that the problem > should be solved specifically for ARIB-based transport stream (at > "mpegts.c" or so.). > Thank you again. > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".