[FFmpeg-trac] #3823(avformat:closed): RTP encoding of MJPEG from Trendnet TV-IP651WI (IP cam) gives undecodable stream

FFmpeg trac at avcodec.org
Thu Jul 16 09:18:13 CEST 2015

#3823: RTP encoding of MJPEG from Trendnet TV-IP651WI (IP cam) gives undecodable
             Reporter:  Krieger     |                    Owner:
                 Type:  defect      |                   Status:  closed
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:  invalid
             Keywords:  mjpeg rtp   |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |

Comment (by cehoyos):

 Replying to [comment:9 cehoyos]:
 > The samplevideo.mjpeg sample cannot be sent over rtp because it uses
 non-standard Huffman tables which the rfc also doesn't allow. A patch was
 just merged that prints an error now instead of silently sending an
 invalid stream.

 > My guess is that dump.mkv had the same issue.

 My guess was correct, this was sent:
 [mjpeg @ 0x38d3d20] marker=c4 avail_size_in_buf=15220
 [mjpeg @ 0x38d3d20] class=0 index=0 nb_codes=10
 [mjpeg @ 0x38d3d20] class=1 index=0 nb_codes=249
 [mjpeg @ 0x38d3d20] class=0 index=1 nb_codes=10
 [mjpeg @ 0x38d3d20] class=1 index=1 nb_codes=249
 And this is what the decoder on the receiving side sees:
 [mjpeg @ 0x7f3810001960] marker=c4 avail_size_in_buf=15010
 [mjpeg @ 0x7f3810001960] class=0 index=0 nb_codes=12
 [mjpeg @ 0x7f3810001960] class=0 index=1 nb_codes=12
 [mjpeg @ 0x7f3810001960] class=1 index=0 nb_codes=251
 [mjpeg @ 0x7f3810001960] class=1 index=1 nb_codes=251
 Thanks to the original debug output!

 > There is still an issue with quantisation tables (that I will try to
 fix) but it isn't easy to trigger because of above issues.

 Should be fixed in 9901e5318730ad5f9fb3272aa370e7affe168ddb
 I attached a sample that allows testing with jpeg 4:2:2.

Ticket URL: <https://trac.ffmpeg.org/ticket/3823#comment:10>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list