[FFmpeg-devel] BUG in use of extradata and extradata_size with dvb subtitles and teletext
joolzg at btinternet.com
Mon Dec 30 18:06:56 CET 2013
----- Original Message -----
> From: Andriy Lysnevych <andriy.lysnevych at gmail.com>
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Cc: "serhii.marchuk at gmail.com" <serhii.marchuk at gmail.com>
> Sent: Monday, 30 December 2013, 17:47
> Subject: Re: [FFmpeg-devel] BUG in use of extradata and extradata_size with dvb subtitles and teletext
> Copy does not work because of different formats AVPacket payload for DVB
> subtitles. I described the issue here: https://trac.ffmpeg.org/ticket/2989
> Patch for DVB subtitles attached. Please review it. After accepting it we
> will create patch to fix Teletext issues.
> The patch does the following:
> 1) Uses the same AVPacket payload for DVB subtitles across all FFmpeg
> (Fixed: DVB subtitles parser, DVB subtitles encoder, DVB subtitles encoder,
> MPEGTS muxer)
> 2) Binary extradata moved to metadata fields. Now it is easy for developers
> that use FFmpeg libraries to manipulate this metadata.
> 3) MPEG-TS muxing will work without need to copy data (extradata or
> metadata) from input stream (in cases when you have no MPEG-TS input
> stream). Useful for developers who use FFmpeg libraries and want to
> generate MPEG-TS stream with subtitles from non-MPEG-TS sources.
> 4) Multiple languages in single stream support via comma separated values
> in metadata fields.
> 5) DVB subtitles copy work
> Looking forward for your comments.
> Andriy Lysnevych
> On Mon, Dec 30, 2013 at 4:24 PM, JULIAN GARDNER
> <joolzg at btinternet.com>wrote:
>> > From: Clément Bœsch <u at pkh.me>
>> >To: FFmpeg development discussions and patches
> <ffmpeg-devel at ffmpeg.org>
>> >Cc: serhii.marchuk at gmail.com
>> >Sent: Monday, 30 December 2013, 13:50
>> >Subject: Re: [FFmpeg-devel] BUG in use of extradata and extradata_size
>> with dvb subtitles and teletext
>> >On Mon, Dec 30, 2013 at 11:53:48AM +0200, Andriy Lysnevych wrote:
>> >> Hi,
>> >> We are almost done with patch that fixes DVB subtitles and
>> >> We are doing 2 things in this patch:
>> >> 1) Removing dependency on extradata. All the values that currently
>> >> in extradatata will be generated from metadata. For example in
> case of
>> >> subtitles metadata will hold the following values:
>> >> language
>> >> subtitling_type
>> >> composition_page_id
>> >> ancillary_page_id
>> >> This values will be used for correct PMT generation. The values
> can be
>> >> comma separated because one DVB subtitle stream can carry few
>> >> substreams of different language, type, etc.
>> >> a) In case of copy scenario the values will be copied from
> metadata of
>> >> MPEGTS demuxer subtitle stream to metadata of MPEGTS muxer
>> >> b) In case when you generate subtitles (i.e. using FFmpeg
> libraries and
>> >> subtitles encoder) you should set the fields in metadata correctly
>> >> output subtitles stream of MPEGTS muxer otherwise default values
> will be
>> >> used.
>> >> 2) Currently there 2 different formats of DVB subtitles payload in
>> >> AVPacket.data. Fore details you can read this thread
>> >> https://trac.ffmpeg.org/ticket/2989
Well it seems to work fine without your patch as long as the input ids are 0x0001 which ffmpeg uses as default for its output, the discussion i started pointed ths out in detail and the reason it was failing in copy was due to the not copying of the ids from the input stream to the output stream. Thats all that was needed.
>> >> We are fixing FFmpeg so only one common format of DVB subtitles
> will be
>> >> used across all the components. AVPacket payload of DVB subtitles
>> >> contain all the fields from standard:
>> >> data_identifier 8bit - always set to 0x20
>> >> subtitle_stream_id 8bit - always set to 0x00
>> >> subtitling_segments - actual payload
>> >> end_of_PES_data_field_makrer 8bit - always set to 0xFF
>> >> Feel free to ask any questions.
>> >Can we see the patch, even if it's a work in progress? What's
>> >I'm uncertain about using metadata for the information you're
> trying to
>> >transmit: typical problem is that it will be transmitted to the muxer.
>> >Typically you might end up with a format adding strings metadata in the
>> >destination format if it doesn't understand them.
>> >Clément B.
>> >ffmpeg-devel mailing list
>> >ffmpeg-devel at ffmpeg.org
>> Please can we see your patches as I would like to make sure all the work i
>> have done wont be wasted for one.
>> Also want to check some of the problems i found and fixed as as the moment
>> the only thing not working is the dvbsubs copy
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
OK but as you said we now need to fix teletext as with this patch the pmt generation is broken.
I did post a patch which fixed these problems but the patch was not upto scratch to be accepted :-), this took care of the DVB TTX descriptor decoding and re encoding
More information about the ffmpeg-devel