[FFmpeg-trac] #3679(undetermined:new): Some HTTP MJPEG streams are not recognized
FFmpeg
trac at avcodec.org
Wed May 28 07:24:16 CEST 2014
#3679: Some HTTP MJPEG streams are not recognized
-------------------------------------+-------------------------------------
Reporter: Krieger | Type: defect
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: mjpeg | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Some HTTP MJPEG streams are perfectly recognized automatically, like ones
from Axis cameras. But there is a problem with streams from Arecont Vision
cameras.
PCAP network dump and textual ngrep output will be attached.
How to reproduce:
{{{
$ ffmpeg -loglevel debug -i http://172.16.1.213/mjpeg
ffmpeg version N-63469-g5863207 Copyright (c) 2000-2014 the FFmpeg
developers
built on May 27 2014 16:46:13 with gcc 4.7.3 (Gentoo 4.7.3-r1 p1.4,
pie-0.5.5)
configuration: --enable-gpl --enable-libx264 --enable-encoder=libx264
--disable-stripping --enable-debug --extra-cflags='-O0 -g -ggdb' --enable-
libopus --enable-libvpx --enable-x11grab --enable-libfreetype --enable-
filter=drawtext
libavutil 52. 87.100 / 52. 87.100
libavcodec 55. 65.100 / 55. 65.100
libavformat 55. 41.100 / 55. 41.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 5.100 / 4. 5.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument
'http://172.16.1.213/mjpeg'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file http://172.16.1.213/mjpeg.
Successfully parsed a group of options.
Opening an input file: http://172.16.1.213/mjpeg.
[http @ 0x2a9d280] request: GET /mjpeg HTTP/1.1
User-Agent: Lavf/55.41.100
Accept: */*
Range: bytes=0-
Connection: close
Host: 172.16.1.213
[http @ 0x2a9d280] header='HTTP/1.0 200 OK'
[http @ 0x2a9d280] http_code=200
[http @ 0x2a9d280] header='Content-Type: multipart/x-mixed-
replace;boundary=fbdr'
[http @ 0x2a9d280] header=''
[AVIOContext @ 0x2a9cc20] Statistics: 1049703 bytes read, 0 seeks
http://172.16.1.213/mjpeg: Invalid data found when processing input
}}}
But it works if input format is specified explicitly:
{{{
$ ffmpeg -loglevel debug -f mjpeg -analyzeduration 0 -probesize 32 -i
http://172.16.1.213/mjpeg
ffmpeg version N-63469-g5863207 Copyright (c) 2000-2014 the FFmpeg
developers
built on May 27 2014 16:46:13 with gcc 4.7.3 (Gentoo 4.7.3-r1 p1.4,
pie-0.5.5)
configuration: --enable-gpl --enable-libx264 --enable-encoder=libx264
--disable-stripping --enable-debug --extra-cflags='-O0 -g -ggdb' --enable-
libopus --enable-libvpx --enable-x11grab --enable-libfreetype --enable-
filter=drawtext
libavutil 52. 87.100 / 52. 87.100
libavcodec 55. 65.100 / 55. 65.100
libavformat 55. 41.100 / 55. 41.100
libavdevice 55. 13.101 / 55. 13.101
libavfilter 4. 5.100 / 4. 5.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'mjpeg'.
Reading option '-analyzeduration' ... matched as AVOption
'analyzeduration' with argument '0'.
Reading option '-probesize' ... matched as AVOption 'probesize' with
argument '32'.
Reading option '-i' ... matched as input file with argument
'http://172.16.1.213/mjpeg'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file http://172.16.1.213/mjpeg.
Applying option f (force format) with argument mjpeg.
Successfully parsed a group of options.
Opening an input file: http://172.16.1.213/mjpeg.
[http @ 0x2e85fe0] request: GET /mjpeg HTTP/1.1
User-Agent: Lavf/55.41.100
Accept: */*
Range: bytes=0-
Connection: close
Host: 172.16.1.213
[http @ 0x2e85fe0] header='HTTP/1.0 200 OK'
[http @ 0x2e85fe0] http_code=200
[http @ 0x2e85fe0] header='Content-Type: multipart/x-mixed-
replace;boundary=fbdr'
[http @ 0x2e85fe0] header=''
[mjpeg @ 0x2e859e0] Before avformat_find_stream_info() pos: 0 bytes
read:629 seeks:0
[mjpeg @ 0x2e8fd60] marker=d8 avail_size_in_buf=103685
[mjpeg @ 0x2e8fd60] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x2e8fd60] marker=db avail_size_in_buf=103683
[mjpeg @ 0x2e8fd60] index=0
[mjpeg @ 0x2e8fd60] qscale[0]: 4
[mjpeg @ 0x2e8fd60] index=1
[mjpeg @ 0x2e8fd60] qscale[1]: 9
[mjpeg @ 0x2e8fd60] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x2e8fd60] marker=dd avail_size_in_buf=103549
[mjpeg @ 0x2e8fd60] restart interval: 16
[mjpeg @ 0x2e8fd60] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x2e8fd60] marker=c0 avail_size_in_buf=103543
[mjpeg @ 0x2e8fd60] sof0: picture: 1280x800
[mjpeg @ 0x2e8fd60] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x2e8fd60] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x2e8fd60] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x2e8fd60] pix fmt id 21111100
[mjpeg @ 0x2e8fd60] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x2e8fd60] marker=c4 avail_size_in_buf=103524
[mjpeg @ 0x2e8fd60] class=0 index=0 nb_codes=12
[mjpeg @ 0x2e8fd60] class=1 index=0 nb_codes=251
[mjpeg @ 0x2e8fd60] class=0 index=1 nb_codes=12
[mjpeg @ 0x2e8fd60] class=1 index=1 nb_codes=251
[mjpeg @ 0x2e8fd60] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x2e8fd60] escaping removed 410 bytes
[mjpeg @ 0x2e8fd60] marker=da avail_size_in_buf=103104
[mjpeg @ 0x2e8fd60] component: 0
[mjpeg @ 0x2e8fd60] component: 1
[mjpeg @ 0x2e8fd60] component: 2
[mjpeg @ 0x2e8fd60] marker parser used 102687 bytes (821496 bits)
[mjpeg @ 0x2e8fd60] marker=d3 avail_size_in_buf=254
[mjpeg @ 0x2e8fd60] restart marker: 3
[mjpeg @ 0x2e8fd60] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x2e8fd60] marker=d9 avail_size_in_buf=246
[mjpeg @ 0x2e8fd60] decode frame unused 246 bytes
[mjpeg @ 0x2e859e0] Probe buffer size limit of 32 bytes reached
[mjpeg @ 0x2e859e0] Stream #0: not enough frames to estimate rate;
consider increasing probesize
[mjpeg @ 0x2e859e0] After avformat_find_stream_info() pos: 104316 bytes
read:104316 seeks:0 frames:1
Input #0, mjpeg, from 'http://172.16.1.213/mjpeg':
Duration: N/A, bitrate: N/A
Stream #0:0, 1, 1/1200000: Video: mjpeg, yuvj422p(pc), 1280x800, 1/25,
25 tbr, 1200k tbn, 25 tbc
Successfully opened the file.
At least one output file must be specified
[AVIOContext @ 0x2e85260] Statistics: 104316 bytes read, 0 seeks
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3679>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list