Opened 6 years ago

Last modified 5 years ago

#912 open defect

mpegts muxer does not follow TS buffering requirements specified in iso13818-1 section

Reported by: jenf Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mpegts
Cc: michael Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


The mpegts muxer in ffmpeg (tested with 0.9.1) does not respect the 512 byte transport buffer for each pid as described in iso13818-1 section

Streams created with ffmpeg (with the muxrate option) have been seen to send over 100 packets in sequence (at least on video data) which exceeds the maximum buffer extraction rate for streams in the Main Level (as defined in iso13818-2 table 8-13). The same also applies to audio packets, albeit with different limits.

For any stream >18mbit/sec the maximum number of packets for a PID that can be inserted in sequence is 2 or 3 (assuming an empty buffer prior to insertion).

This can cause errors in decoding the ts on certain hardware.
The packets should therefore be ordered appropriately in the stream to comply with the TS buffer limit of 512 bytes when the muxrate parameter is specified.

Change History (4)

comment:1 Changed 6 years ago by cehoyos

  • Keywords ts added

Please test current git head.

Please provide a command line (if possible without using external libraries like x264 or faac) and complete, uncut console output.

comment:2 Changed 5 years ago by michael

  • Keywords tsenc added
  • Status changed from new to open
  • Version changed from unspecified to git-master

I can confirm that the packet interleaving is not fully compliant for high bitrates. A patch improving this would be welcome, if you want to work on it. Also if you want/could document all the cases where we arent compliant to the specs, this too would help.

thanks, and sorry that this still hasnt been fixed ...

comment:3 Changed 5 years ago by michael

  • Cc michael added

comment:4 Changed 5 years ago by cehoyos

  • Keywords mpegts added; ts tsenc removed
Note: See TracTickets for help on using tickets.