A query on mpegts and global headers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

A query on mpegts and global headers

Brainiarc7
Hello there,

With mpegts output, should global headers be used or not, set via -fflags
+global_header?

And if there are exceptions to that, based on the codec type wrapped in
mpegts, when should global headers be used for mpegts?

I ask because of the dump_extra bitstream filter documentation, which shows
a similar use case:
https://ffmpeg.org/ffmpeg-bitstream-filters.html#dump_005fextra

Which implies that global headers should not be used with mpegts, *but*
even if that's the case, it can be corrected via the video bitstream filter
dump_extra.

Another example of this, cited by Gyan in this answer on Stackoverflow:
https://video.stackexchange.com/a/25797/19326

Please help on clarifying this. The ffmpeg documentation can be a bit
daunting at times.

Regards,

Dennis.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: A query on mpegts and global headers

Gyan Doshi-2


On 30-08-2020 06:52 pm, Dennis Mungai wrote:
> Hello there,
>
> With mpegts output, should global headers be used or not, set via -fflags
> +global_header?

No.

> And if there are exceptions to that, based on the codec type wrapped in
> mpegts, when should global headers be used for mpegts?

Global header is for formats that store codec parameters out of band
i.e. in container metadata. Enabling the flag tells the encoder to store
parameters in AVStream->extradata from where it is used by muxers of
such formats. Additionally, the flag also suppresses periodic
announcement of these parameters within the stream (in-band).

MPEG-TS has no global header since it is meant for use as a 'continuous'
transport stream. to which clients may start listening at an arbitrary
point. So periodic parameter set transmission is required.

When generating an output for use by a single muxer, the muxer has a
flag which will be conveyed to the encoder automatically, so the user
doesn't have to set anything. However in case of the tee muxer, which
sends data to multiple muxers, some of which require global headers, the
flag has to be manually set and periodic parameter sets reinserted using
dump_extra for muxers such as mpegts.

Regards,
Gyan
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: A query on mpegts and global headers

Brainiarc7
On Sun, 30 Aug 2020 at 18:11, Gyan Doshi <[hidden email]> wrote:

>
>
> On 30-08-2020 06:52 pm, Dennis Mungai wrote:
> > Hello there,
> >
> > With mpegts output, should global headers be used or not, set via -fflags
> > +global_header?
>
> No.
>
> > And if there are exceptions to that, based on the codec type wrapped in
> > mpegts, when should global headers be used for mpegts?
>
> Global header is for formats that store codec parameters out of band
> i.e. in container metadata. Enabling the flag tells the encoder to store
> parameters in AVStream->extradata from where it is used by muxers of
> such formats. Additionally, the flag also suppresses periodic
> announcement of these parameters within the stream (in-band).
>
> MPEG-TS has no global header since it is meant for use as a 'continuous'
> transport stream. to which clients may start listening at an arbitrary
> point. So periodic parameter set transmission is required.
>
> When generating an output for use by a single muxer, the muxer has a
> flag which will be conveyed to the encoder automatically, so the user
> doesn't have to set anything. However in case of the tee muxer, which
> sends data to multiple muxers, some of which require global headers, the
> flag has to be manually set and periodic parameter sets reinserted using
> dump_extra for muxers such as mpegts.
>
> Regards,
> Gyan
>
>
Many thanks for clearing that up, Gyan. Most appreciated.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".