[FFmpeg-trac] #5921(avformat:open): Can not read mjpeg from IP camera
FFmpeg
trac at avcodec.org
Sun Jan 15 21:38:13 EET 2017
#5921: Can not read mjpeg from IP camera
-------------------------------------+-------------------------------------
Reporter: qqqzhouhk | Owner:
Type: defect | Status: open
Priority: important | Component: avformat
Version: git-master | Resolution:
Keywords: mpjpeg | Blocked By:
regression | Reproduced by developer: 1
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by hackeron):
I'm having the same issue:
{{{
$ ffmpeg -i 'http://admin:meinsm@192.168.100.232/cgi-
bin/faststream.jpg?stream=full&fps=5.0&noaudio&data=v.mjpeg' -y test.mkv
ffmpeg version N-83119-g0ba0187 Copyright (c) 2000-2017 the FFmpeg
developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --enable-libx264 --enable-libfdk_aac --enable-gpl
--enable-nonfree --enable-shared --enable-pic --enable-openssl
libavutil 55. 43.100 / 55. 43.100
libavcodec 57. 72.100 / 57. 72.100
libavformat 57. 62.100 / 57. 62.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 69.100 / 6. 69.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, mpjpeg, from 'http://admin:meinsm@192.168.100.232/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),
640x480 [SAR 1:1 DAR 4: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 @ 0x20bb920] using SAR=1/1
[libx264 @ 0x20bb920] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x20bb920] profile High, level 3.0
[libx264 @ 0x20bb920] 264 - core 148 - 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.62.100
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc),
640x480 [SAR 1:1 DAR 4:3], q=-1--1, 25 fps, 1k tbn, 25 tbc
Metadata:
encoder : Lavc57.72.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[mpjpeg @ 0x20b60e0] Expected boundary '--' not found, instead found a
line of 39 bytes
http://admin:meinsm@192.168.100.232/cgi-
bin/faststream.jpg?stream=full&fps=5.0&noaudio&data=v.mjpeg: Invalid data
found when processing input
frame= 2 fps=0.7 q=-1.0 Lsize= 64kB time=00:00:00.04
bitrate=12706.7kbits/s speed=0.0153x
video:63kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.235873%
[libx264 @ 0x20bb920] frame I:1 Avg QP:29.30 size: 57648
[libx264 @ 0x20bb920] frame P:1 Avg QP:31.82 size: 6004
[libx264 @ 0x20bb920] mb I I16..4: 0.7% 98.2% 1.1%
[libx264 @ 0x20bb920] mb P I16..4: 0.0% 8.3% 0.0% P16..4: 1.7% 1.8%
0.5% 0.0% 0.0% skip:87.8%
[libx264 @ 0x20bb920] 8x8 transform intra:98.4% inter:93.5%
[libx264 @ 0x20bb920] coded y,uvDC,uvAC intra: 99.7% 2.5% 2.4% inter: 3.9%
0.1% 0.0%
[libx264 @ 0x20bb920] i16 v,h,dc,p: 100% 0% 0% 0%
[libx264 @ 0x20bb920] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 7% 32% 39% 3% 2%
2% 4% 3% 7%
[libx264 @ 0x20bb920] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 17% 29% 4% 3%
3% 4% 5% 7%
[libx264 @ 0x20bb920] i8c dc,h,v,p: 98% 1% 1% 0%
[libx264 @ 0x20bb920] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x20bb920] kb/s:6365.20
$
}}}
I cannot use the -f mjpeg workaround because I'm using ffmpeg through
openCV where there is no option to pass this parameter.
Any ideas?
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5921#comment:13>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list