[FFmpeg-devel] [PATCH] Add support for BDAV/m2ts-mode muxing

Fredrik Axelsson fraxbe at gmail.com
Sat Aug 13 15:51:35 CEST 2011

This patch enables m2ts/BDAV muxing in mpegtsenc.c. Each source packet of a
regular mpeg transport stream is prefixed by a 32-bit header where the
first two bits are related to copyright, the remaining 30 bits is a
timestamp from the 27 MHz system clock (of the reference decoder). The
written timestamp is the remainder from (system_clock_time / 2^30). This
patch leaves the copyright bits set to 0.

The patch enables m2ts mode by default for files that have the .m2ts extension.
There is also an option to control m2ts mode explicitly.

I can successfully mux video for my Sharp Aquos TV using ffmpeg with this patch applied.

Best Regards,

Fredrik Axelsson

Fredrik Axelsson (1):
  Add support for BDAV/m2ts-mode muxing

 libavformat/mpegtsenc.c |   42 +++++++++++++++++++++++++++++++++++-------
 1 files changed, 35 insertions(+), 7 deletions(-)


More information about the ffmpeg-devel mailing list