[FFmpeg-trac] #5023(avformat:closed): Can no longer read mjpeg from Mobotix camera

FFmpeg trac at avcodec.org
Fri Feb 5 17:43:18 CET 2016


#5023: Can no longer read mjpeg from Mobotix camera
-------------------------------------+-------------------------------------
             Reporter:  hackeron     |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  important    |                Component:  avformat
              Version:  git-master   |               Resolution:  fixed
             Keywords:  mjpeg        |               Blocked By:
  mpjpeg regression                  |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by hackeron):

 I am experiencing issues with ffmpeg compiled from git-2016-02-05-9556446:

 {{{
 $ ffmpeg -i 'http://admin:meinsm@192.168.100.233/cgi-
 bin/faststream.jpg?stream=full&fps=5.0&noaudio&data=v.mjpeg' -y test.mkv
 ffmpeg version git-2016-02-05-9556446 Copyright (c) 2000-2016 the FFmpeg
 developers
   built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
   configuration: --enable-libx264 --enable-libfdk_aac --enable-gpl
 --enable-nonfree --enable-shared --enable-pic
   libavutil      55. 17.100 / 55. 17.100
   libavcodec     57. 24.101 / 57. 24.101
   libavformat    57. 24.100 / 57. 24.100
   libavdevice    57.  0.101 / 57.  0.101
   libavfilter     6. 28.100 /  6. 28.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
 [mjpeg @ 0x1da7100] Changing bps to 8
 [mpjpeg @ 0x1da4380] Expected boundary '--' not found, instead found a
 line of 7 bytes
 Input #0, mpjpeg, from 'http://admin:meinsm@192.168.100.233/cgi-
 bin/faststream.jpg?stream=full&fps=5.0&noaudio&data=v.mjpeg':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
 1280x480 [SAR 1:1 DAR 8:3], 25 tbr, 25 tbn, 25 tbc
 No pixel format specified, yuvj420p for H.264 encoding chosen.
 Use -pix_fmt yuv420p for compatibility with outdated media players.
 [libx264 @ 0x1da9a40] using SAR=1/1
 [libx264 @ 0x1da9a40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
 [libx264 @ 0x1da9a40] profile High, level 3.1
 [libx264 @ 0x1da9a40] 264 - core 148 r2 a01e339 - H.264/MPEG-4 AVC codec -
 Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1
 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3
 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, matroska, to 'test.mkv':
   Metadata:
     encoder         : Lavf57.24.100
     Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc),
 1280x480 [SAR 1:1 DAR 8:3], q=-1--1, 25 fps, 1k tbn, 25 tbc
     Metadata:
       encoder         : Lavc57.24.101 libx264
     Side data:
       unknown side data type 10 (24 bytes)
 Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 [mpjpeg @ 0x1da4380] Expected boundary '--' not found, instead found a
 line of 9 bytes
 http://admin:meinsm@192.168.100.233/cgi-
 bin/faststream.jpg?stream=full&fps=5.0&noaudio&data=v.mjpeg: Invalid data
 found when processing input
 frame=    2 fps=0.0 q=-1.0 Lsize=     118kB time=00:00:00.08
 bitrate=12094.2kbits/s speed=0.425x
 video:117kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.637398%
 [libx264 @ 0x1da9a40] frame I:1     Avg QP:29.08  size:106721
 [libx264 @ 0x1da9a40] frame P:1     Avg QP:31.83  size: 12769
 [libx264 @ 0x1da9a40] mb I  I16..4:  1.0% 96.0%  3.0%
 [libx264 @ 0x1da9a40] mb P  I16..4:  0.2%  1.2%  0.0%  P16..4: 12.3%  6.1%
 5.5%  0.0%  0.0%    skip:74.8%
 [libx264 @ 0x1da9a40] 8x8 transform intra:95.9% inter:87.4%
 [libx264 @ 0x1da9a40] coded y,uvDC,uvAC intra: 93.5% 77.0% 27.5% inter:
 15.4% 6.0% 0.5%
 [libx264 @ 0x1da9a40] i16 v,h,dc,p: 32% 14%  0% 54%
 [libx264 @ 0x1da9a40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 15% 26%  6%  6%
 9%  8%  7% 10%
 [libx264 @ 0x1da9a40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 14% 19%  8%  5%
 10%  6%  4%  9%
 [libx264 @ 0x1da9a40] i8c dc,h,v,p: 50% 26% 20%  4%
 [libx264 @ 0x1da9a40] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 0x1da9a40] kb/s:11949.00
 }}}

 However if the stream is not live, then it works:

 {{{
 $ wget 'http://admin:meinsm@192.168.100.233/cgi-
 bin/faststream.jpg?stream=full&fps=5.0&noaudio&data=v.mjpeg'
 --2016-02-05 16:40:48--  http://admin:*password*@192.168.100.233/cgi-
 bin/faststream.jpg?stream=full&fps=5.0&noaudio&data=v.mjpeg
 Connecting to 192.168.100.233:80... connected.
 HTTP request sent, awaiting response... 401 Unauthorized
 Authentication selected: Basic realm="MOBOTIX Camera User"
 Connecting to 192.168.100.233:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: unspecified [multipart/x-mixed-replace]
 Saving to: ‘faststream.jpg?stream=full&fps=5.0&noaudio&data=v.mjpeg’

 eam.jpg?stream=full&fps=5.0&noaudio&data=v.mjpe     [                <=>
 ]   2.11M   305KB/s             ^C

 $ ffmpeg -i faststream.jpg\?stream\=full\&fps\=5.0\&noaudio\&data\=v.mjpeg
 -y test.mkv
 ffmpeg version git-2016-02-05-9556446 Copyright (c) 2000-2016 the FFmpeg
 developers
   built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
   configuration: --enable-libx264 --enable-libfdk_aac --enable-gpl
 --enable-nonfree --enable-shared --enable-pic
   libavutil      55. 17.100 / 55. 17.100
   libavcodec     57. 24.101 / 57. 24.101
   libavformat    57. 24.100 / 57. 24.100
   libavdevice    57.  0.101 / 57.  0.101
   libavfilter     6. 28.100 /  6. 28.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
 [mjpeg @ 0x10be380] Format mjpeg detected only with low score of 25,
 misdetection possible!
 [mjpeg @ 0x10bf480] Changing bps to 8
 Input #0, mjpeg, from
 'faststream.jpg?stream=full&fps=5.0&noaudio&data=v.mjpeg':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
 1280x480 [SAR 1:1 DAR 8:3], 25 tbr, 1200k tbn, 25 tbc
 No pixel format specified, yuvj420p for H.264 encoding chosen.
 Use -pix_fmt yuv420p for compatibility with outdated media players.
 [libx264 @ 0x10c24a0] using SAR=1/1
 [libx264 @ 0x10c24a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
 [libx264 @ 0x10c24a0] profile High, level 3.1
 [libx264 @ 0x10c24a0] 264 - core 148 r2 a01e339 - H.264/MPEG-4 AVC codec -
 Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1
 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3
 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, matroska, to 'test.mkv':
   Metadata:
     encoder         : Lavf57.24.100
     Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc),
 1280x480 [SAR 1:1 DAR 8:3], q=-1--1, 25 fps, 1k tbn, 25 tbc
     Metadata:
       encoder         : Lavc57.24.101 libx264
     Side data:
       unknown side data type 10 (24 bytes)
 Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 frame=   18 fps=9.5 q=-1.0 Lsize=     460kB time=00:00:00.64
 bitrate=5894.1kbits/s speed=0.337x
 video:460kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.188253%
 [libx264 @ 0x10c24a0] frame I:1     Avg QP:24.52  size:140713
 [libx264 @ 0x10c24a0] frame P:9     Avg QP:27.27  size: 28553
 [libx264 @ 0x10c24a0] frame B:8     Avg QP:32.14  size:  9033
 [libx264 @ 0x10c24a0] consecutive B-frames: 11.1% 88.9%  0.0%  0.0%
 [libx264 @ 0x10c24a0] mb I  I16..4:  0.6% 97.2%  2.2%
 [libx264 @ 0x10c24a0] mb P  I16..4:  0.1%  1.6%  0.1%  P16..4: 22.4% 15.2%
 16.8%  0.0%  0.0%    skip:43.7%
 [libx264 @ 0x10c24a0] mb B  I16..4:  0.1%  0.2%  0.0%  B16..8: 25.5%  4.6%
 3.1%  direct: 3.2%  skip:63.3%  L0:50.6% L1:38.5% BI:10.8%
 [libx264 @ 0x10c24a0] 8x8 transform intra:95.3% inter:91.0%
 [libx264 @ 0x10c24a0] coded y,uvDC,uvAC intra: 90.7% 81.5% 35.4% inter:
 26.6% 10.2% 1.3%
 [libx264 @ 0x10c24a0] i16 v,h,dc,p: 40% 22% 16% 22%
 [libx264 @ 0x10c24a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 15% 28%  5%  6%
 9%  8%  7% 10%
 [libx264 @ 0x10c24a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 14% 22%  5%  7%
 14%  6%  4%  7%
 [libx264 @ 0x10c24a0] i8c dc,h,v,p: 47% 26% 21%  5%
 [libx264 @ 0x10c24a0] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 0x10c24a0] ref P L0: 55.6%  6.3% 19.2% 18.8%
 [libx264 @ 0x10c24a0] ref B L0: 78.4% 21.6%
 [libx264 @ 0x10c24a0] kb/s:5221.74
 }}}

 Any ideas why the stream is not detected correctly when live? - Any
 solution?

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5023#comment:16>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list