[libav-api] Accessing HTTP/MJPEG Stream from Axis Encoder

Michael Rice michaelarice at gmail.com
Wed Feb 6 16:20:48 CET 2013


The resulting file is a collection of jpeg images separated by a MIME
boundary, such as the following snapshot (dumped using hexdump). After the
12544 bytes in the first image, there is another MIME boundary.

00000000  2d 2d 6d 79 62 6f 75 6e  64 61 72 79 0d 0a 43 6f
 |--myboundary..Co|
00000010  6e 74 65 6e 74 2d 54 79  70 65 3a 20 69 6d 61 67  |ntent-Type:
imag|
00000020  65 2f 6a 70 65 67 0d 0a  43 6f 6e 74 65 6e 74 2d
 |e/jpeg..Content-|
00000030  4c 65 6e 67 74 68 3a 20  31 32 35 34 34 0d 0a 0d  |Length:
12544...|
00000040  0a ff d8 ff e0 00 10 4a  46 49 46 00 01 02 00 00
 |.......JFIF.....|
00000050  0a 00 0b 00 00 ff fe 00  0f 0a 01 51 12 73 93 3b
 |...........Q.s.;|
00000060  51 12 73 93 3b 01 ff fe  00 0f 0a 00 00 a5 05 14
 |Q.s.;...........|
00000070  01 00 40 8c cc 7a 5e ff  db 00 43 00 0a 07 07 08
 |.. at ..z^...C.....|
00000080  07 06 0a 08 08 08 0b 0a  0a 0b 0e 18 10 0e 0d 0d
 |................|
00000090  0e 1d 15 16 11 18 23 1f  25 24 22 1f 22 21 26 2b
 |......#.%$"."!&+|
000000a0  37 2f 26 29 34 29 21 22  30 41 31 34 39 3b 3e 3e
 |7/&)4)!"0A149;>>|
000000b0  3e 25 2e 44 49 43 3c 48  37 3d 3e 3b ff db 00 43
 |>%.DIC<H7=>;...C|
000000c0  01 0a 0b 0b 0e 0d 0e 1c  10 10 1c 3b 28 22 28 3b
 |...........;("(;|
000000d0  3b 3b 3b 3b 3b 3b 3b 3b  3b 3b 3b 3b 3b 3b 3b 3b
 |;;;;;;;;;;;;;;;;|
*
00000100  3b ff c0 00 11 08 01 e0  02 c0 03 01 22 00 02 11
 |;..........."...|
00000110  01 03 11 01 ff c4 00 1f  00 00 01 05 01 01 01 01
 |................|
00000120  01 01 00 00 00 00 00 00  00 00 01 02 03 04 05 06
 |................|
00000130  07 08 09 0a 0b ff c4 00  b5 10 00 02 01 03 03 02
 |................|
00000140  04 03 05 05 04 04 00 00  01 7d 01 02 03 00 04 11
 |.........}......|
00000150  05 12 21 31 41 06 13 51  61 07 22 71 14 32 81 91
 |..!1A..Qa."q.2..|


On Tue, Feb 5, 2013 at 7:40 PM, Luca Barbato <lu_zero at gentoo.org> wrote:

> On 05/02/13 16:20, Michael Rice wrote:
> > I am currently using "10_alpha1", at least that's what version.h says.
> The
> > tarball that I downloaded is "libav-HEAD-e034cc6.tar.gz" on 16 Jan 2013
> (I
> > used the git snapshot URL link).
> >
> > I just got the latest nightly snapshot and it has the same results (see
> > below). Are the two patches from Vladimir in the nightly snapshot?
> >
> > $ ./avprobe http://192.168.1.11/axis-cgi/mjpg/video.cgi
> > avprobe version v9-373-ge66240f, Copyright (c) 2007-2013 the Libav
> > developers
> >   built on Feb  5 2013 09:12:21 with llvm-gcc 4.2.1 (LLVM build
> 2336.11.00)
> > [ingenient @ 0x7fea8b806600] Could not find codec parameters (Video:
> mjpeg)
> > [ingenient @ 0x7fea8b806600] Estimating duration from bitrate, this may
> be
> > inaccurate
> > http://192.168.1.11/axis-cgi/mjpg/video.cgi: Operation not permitted
> > # avprobe output
>
> wget http://192.168.1.11/axis-cgi/mjpg/video.cgi and try to play the
> resulting file please.
>
> lu
>
> _______________________________________________
> libav-api mailing list
> libav-api at libav.org
> https://lists.libav.org/mailman/listinfo/libav-api
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-api/attachments/20130206/cafc7b5b/attachment.html>


More information about the libav-api mailing list