Opened 5 years ago

Closed 5 years ago

#3936 closed defect (wontfix)

RTP packetizing for H.263 (RFC 2190)

Reported by: thovo Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: rtp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


The MPEG encoder adds the side data "AV_PKT_DATA_H263_MB_INFO" for the codec H.263 if this features is activated via MpegEncContext?->mb_info. This additional data is needed for RTP packetizing according to RFC2190 (function "ff_rtp_send_h263_rfc2190").
But at the end of avcodec_encode_video2(), the function av_packet_merge_side_data() is called. This function resets the side data of the packet again, after the side data was merged with the packet buffer:

pkt->side_data_elems = 0;
pkt->side_data = NULL;

This behavior of av_packet_merge_side_data() breaks the RTP packetizer.

Change History (5)

comment:1 Changed 5 years ago by cehoyos

  • Keywords rtp added
  • Reproduced by developer unset

Is this a regression? (Did it work with older versions of FFmpeg?)
How can I reproduce the problem?

comment:2 Changed 5 years ago by thovo

The function av_packet_merge_side_data() was introduced in commit 94eadee7efc2c5d19ecfe92d36f0556663468080. This first version had already this behavior.

Last edited 5 years ago by thovo (previous) (diff)

comment:3 Changed 5 years ago by thovo

A patch for this bug was sent to the mailing list:
"mux: make sure that the AV_PKT_DATA_H263_MB_INFO side data is received by the H.263/RTP packetizer (rfc2190)"

comment:4 Changed 5 years ago by thovo

This report can be closed because:
The bug is related to the behavior of the used application. It places itself between the AV muxer and the RTP muxer. This is useful to create verbose statistics about each individual data stream in the application. Moreover, this structure is needed to use also proprietary RTP packetizers beside the ones from ffmpeg. The resulting scenario is this:

FFmpeg(AV muxer) ==> APP ==> FFmpeg(RTP muxer)

But in this context, the application forwarded only the data of each received AV packet from the AV-muxer to the RTP-muxer. The idea behind the patch was: allow the app for instructing ffmpg to tunnel side-data of each packet. This can be done via a merge of the side-data with existing packet data. As a result of this, both the packet data and the side-data can be forwarded as one single buffer. This allows the RTP-muxer to extract possible side-data from the received single data buffer. Especially, in case of H.263 the side-data is needed for the ffmpeg internal RTP packetizer (rfc2190).

The app was redesigned in cooperation with Michael. Thx.

comment:5 Changed 5 years ago by thovo

  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.