[FFmpeg-user] h264 stream from Arecont camera

Jannes Faber jannes.faber at gmail.com
Wed Jan 13 16:05:02 CET 2016


On 13 January 2016 at 14:46, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Jannes Faber <jannes.faber <at> gmail.com> writes:
>
> > Is there any way ffmpeg can deal with such a stream directly?
>
> I believe it deals fine with the stream;-)
>

Wow you're right! I just tried to play it from the file and it just works!

However, I just tested the direct stream again:

ffplay 'http://10.1.1.233/h264stream1?ssn=1223&res=half&qp=1'

Takes about a minute of waiting and then only 1 frame appears.

(full output below, maybe I should have run it more vebose)

Piping curl to ffplay -  doesn't seem to work at all.

Knowing that it does work when first dumped into a file, would there be a
trick to get it to work while streaming? I ask because I was intending to
use tee to both record the stream as well as broadcast it over the network
(as this overpriced proprietary piece of xx doesn't support multicast
either).

And one more question if you don't mind: do you see any sort of (absolute)
timestamp in these frames? The camera is supposed to do 15 fps, but
depending on the uptime that slows down to 1fps or less. I would be awesome
to have some sort of time indication it is a security camera afterall.


> And even with your sed magic, I believe
> that the trailing 0's do not disappear, so
> remuxing may not have any advantages...
>
> I opened #5154 for your issue, on of the problems is
> that I was unable to find a specification;-(
>

Thank you! Just to add some more information, just in case it's relevant.

The device is 4 cameras in one dome, so there are 4 channels. You can see ETag:
Channel=1 in each of the "headers" in the h264stream.dump file I provided.

When I change the URL from 10.1.1.233/h264stream1
<http://10.1.1.233/h264stream1?ssn=1223&res=half&qp=1> to
10.1.1.233/h264stream <http://10.1.1.233/h264stream1?ssn=1223&res=half&qp=1>
(without the channel nr in the end) I get one stream that alternates ALL 4
channels. So each header will have  ETag: Channel=1  or  ETag: Channel=2
etc. Some way to split those out into 4 streams within ffmpeg would be
cool, but I understand that that's a whole different feature request.

The device also has some other proprietary streaming protocol over TFTP.
They offer NDA's for whoever want to use that. I've only had a cursory look
at that, but I could make some wireshark captures there if you wish.

http://www.arecontvision.com/pr/forcedown.php?file_name=ekViK2tsY2ZjRFlXeDdzVmFQd0Rvc0hRMzNxQjQzbm9BbVRCRnExTmNNQT0=&file_path=ZXo5V1dWSEhIL3F3SHNCbDJ0ZEtkbDlpaGFNTXkwNnNyMVgvWlljWUZIZz0=&file_path=Wkh5Q2FBc2VCSFhEeXFhQWNUTy9aL0ZzL0plaE9sWGd4VUpncUxOMzNPMD0=
contains some mentions of the fbdr boundary thing.


Please don't hesitate to ask if you need more information or want me to
test anything.

Thanks,
Jannes



ffplay version 2.8.4 Copyright (c) 2003-2015 the FFmpeg developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2
-g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
--enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls
--enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394
--disable-indev=jack --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg
--enable-libopus --enable-libpulse --enable-libschroedinger
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis
--enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libx265
--enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample
--enable-postproc --enable-pthreads --disable-static --enable-shared
--enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64
--enable-runtime-cpudetect
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[h264 @ 0x7f3fec009260] Stream #0: not enough frames to estimate rate;
consider increasing probesize
Input #0, h264, from 'http://10.1.1.233/h264stream1?ssn=1223&res=half&qp=1':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuv420p, 1280x960, 25 fps, 25 tbr,
1200k tbn, 50 tbc
    nan M-V:    nan fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0


More information about the ffmpeg-user mailing list