Opened 13 years ago

Last modified 12 years ago

#912 open defect

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

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

Description

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 2.4.2.3.

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 by Carl Eugen Hoyos, 13 years ago

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 by Michael Niedermayer, 12 years ago

Keywords: tsenc added
Status: newopen
Version: unspecifiedgit-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 by Michael Niedermayer, 12 years ago

Cc: Michael Niedermayer added

comment:4 by Carl Eugen Hoyos, 12 years ago

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