Re: [FFmpeg-user] Feeding DVR to ffserver

2016-02-24 Thread Alex Povolotsky

On 24.02.2016 18:04, Moritz Barsnick wrote:
> Hi Alex,
> although there's a lot of confusion on this thread, there is one thing
> I can likely say:
> 
> On Wed, Feb 24, 2016 at 17:41:47 +0300, Alex Povolotsky wrote:
> 
>> [mpeg1video @ 0x808476400] MPEG1/2 does not support 3/1 fps
> [...]
>> Error while opening encoder for output stream #0:0 - maybe incorrect 
>> parameters such as bit_rate, rate, width or height
> 
> I'm sure these two are related. The 3 fps comes from this line in your
> config:
> VideoFrameRate 3
> 
> Use a different codec or a different fps to circumvent this
> restriction (which is not ffmpeg's restriction).

Video stream is clearly NOT 3 FPS. Are there any way to find out
required params?

Alex
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Feeding DVR to ffserver

2016-02-24 Thread Moritz Barsnick
Hi Alex,
although there's a lot of confusion on this thread, there is one thing
I can likely say:

On Wed, Feb 24, 2016 at 17:41:47 +0300, Alex Povolotsky wrote:

> [mpeg1video @ 0x808476400] MPEG1/2 does not support 3/1 fps
[...]
> Error while opening encoder for output stream #0:0 - maybe incorrect 
> parameters such as bit_rate, rate, width or height

I'm sure these two are related. The 3 fps comes from this line in your
config:
VideoFrameRate 3

Use a different codec or a different fps to circumvent this
restriction (which is not ffmpeg's restriction).

Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Feeding DVR to ffserver

2016-02-24 Thread Alex Povolotsky
On 24.02.2016 17:36, Alex Povolotsky wrote:
>>> 
>>> File /tmp/feed1.ffm
>>
>> Can ffserver write to this location?

Yes.

Just in case:

[16:59] superbook:~ % ls -ls /tmp/feed1.ffm
5 -rw-r--r--  1 root  wheel  4096 Feb 24 17:39 /tmp/feed1.ffm
[17:39] superbook:~ % date
Wed Feb 24 17:39:33 MSK 2016

Yes I know that running ffserver as root is bad, but I'm doing it only
as long as I'm testing the whole thing.

>>> AudioChannels 0
>>
>> Instead of AudioChannels 0 use NoAudio

Done.

# /usr/local/bin/tanidvr -m 1 -c 1 -m 1 -t dvr -u admin -w admin |
ffmpeg -i -  http://localhost:8090/feed1.ffm

...

INFO (main): Media container: DHAV
Invalid UE golomb code
Last message repeated 1 times
Input #0, matroska,webm, from 'pipe:':
  Metadata:
encoder : TaniDVR 1.4.1
  Duration: 00:00:00.27, start: 0.00, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 352x288,
SAR 12:11 DAR 4:3, 24.98 fps, 24.98 tbr, 1000k tbn, 2000k tbc
[mpeg1video @ 0x808476400] bitrate tolerance 21333 too small for bitrate
64000, overriding
[mpeg1video @ 0x808476400] too many threads/slices (9), reducing to 8
[mpeg1video @ 0x808476400] MPEG1/2 does not support 3/1 fps
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
  Metadata:
encoder : TaniDVR 1.4.1
creation_time   : 2016-02-24 17:41:07
Stream #0:0: Video: mpeg1video, none, 160x128, q=2-31, 64 kb/s, SAR
16:15 DAR 4:3, 25 fps, 3 tbc
Metadata:
  encoder : Lavc56.60.100 mpeg1video
Stream #0:1: Video: msmpeg4v3 (msmpeg4), none, 352x240, q=2-31, 256
kb/s, SAR 10:11 DAR 4:3, 24.98 fps, 15 tbc
Metadata:
  encoder : Lavc56.60.100 msmpeg4
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg1video (native))
  Stream #0:0 -> #0:1 (h264 (native) -> msmpeg4v3 (msmpeg4))
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height
FATAL ERROR (main): Unable to write to target: -1.


Same error here

Alex
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Feeding DVR to ffserver

2016-02-24 Thread Jimmy Asher
Ffserver documentation: https://ffmpeg.org/ffserver.html
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Feeding DVR to ffserver

2016-02-24 Thread Alex Povolotsky


On 24.02.2016 17:28, Jimmy Asher wrote:
> FYI: This thread considers top posing “rude"
> 
> 
> 
> On 2/24/16, 9:16 AM, "ffmpeg-user on behalf of Alex Povolotsky" 
>  wrote:
> 
>> Skipping comments:
>>
>> HTTPPort 8090
>> HTTPBindAddress 0.0.0.0
>> MaxHTTPConnections 2000
>> MaxClients 1000
>> MaxBandwidth 1000
>> CustomLog -
>>
>> 
>> File /tmp/feed1.ffm
> 
> Can ffserver write to this location?
> 
>> FileMaxSize 200K
>> ACL allow 127.0.0.1
>> 
>>
>> 
>> Feed feed1.ffm
>> Format mpeg
>> AudioChannels 0
> 
> Instead of AudioChannels 0 use NoAudio
> 
>> VideoBitRate 64
>> VideoBufferSize 40
>> VideoFrameRate 3
>> VideoSize 160x128
>> VideoGopSize 12
>> 
>>
>> 
>> Feed feed1.ffm
>> Format asf
>> VideoFrameRate 15
>> VideoSize 352x240
>> VideoBitRate 256
>> VideoBufferSize 40
>> VideoGopSize 30
>> AudioBitRate 64
>> StartSendOnKey
>> 
>> 
>> Format status
>> 
>>
>>
>> 
>> URL http://www.ffmpeg.org/
>> 
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 

Okay. Sorry for top posting.

I'm clearly doing something stupid with ffmpeg. Can't you please point
me to my mistake and suggest good codec options for video compressing?

Alex
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Feeding DVR to ffserver

2016-02-24 Thread Jimmy Asher
FYI: This thread considers top posing “rude"



On 2/24/16, 9:16 AM, "ffmpeg-user on behalf of Alex Povolotsky" 
 wrote:

>Skipping comments:
>
>HTTPPort 8090
>HTTPBindAddress 0.0.0.0
>MaxHTTPConnections 2000
>MaxClients 1000
>MaxBandwidth 1000
>CustomLog -
>
>
>File /tmp/feed1.ffm

Can ffserver write to this location?

>FileMaxSize 200K
>ACL allow 127.0.0.1
>
>
>
>Feed feed1.ffm
>Format mpeg
>AudioChannels 0

Instead of AudioChannels 0 use NoAudio

>VideoBitRate 64
>VideoBufferSize 40
>VideoFrameRate 3
>VideoSize 160x128
>VideoGopSize 12
>
>
>
>Feed feed1.ffm
>Format asf
>VideoFrameRate 15
>VideoSize 352x240
>VideoBitRate 256
>VideoBufferSize 40
>VideoGopSize 30
>AudioBitRate 64
>StartSendOnKey
>
>
>Format status
>
>
>
>
>URL http://www.ffmpeg.org/
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Feeding DVR to ffserver

2016-02-24 Thread Alex Povolotsky
Skipping comments:

HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -


File /tmp/feed1.ffm
FileMaxSize 200K
ACL allow 127.0.0.1



Feed feed1.ffm
Format mpeg
AudioChannels 0
VideoBitRate 64
VideoBufferSize 40
VideoFrameRate 3
VideoSize 160x128
VideoGopSize 12



Feed feed1.ffm
Format asf
VideoFrameRate 15
VideoSize 352x240
VideoBitRate 256
VideoBufferSize 40
VideoGopSize 30
AudioBitRate 64
StartSendOnKey


Format status




URL http://www.ffmpeg.org/


it is running, stat.html is responding with

ffserver Status

Available Streams

PathServed
Conns   
bytes   Format  Bit rate
kbits/s Video
kbits/s 
Codec   Audio
kbits/s 
Codec   Feed
cam1-2.mpg  1   63  mpeg128 64  mpeg1video  64  
mp2 feed1.ffm
test.asf0   0   asf_stream  320 256 msmpeg4 64  
wmav2   feed1.ffm
stat.html   2   2105-   -   -   -   
index.html  0   3536-   -   -   -   
Feed feed1.ffm

Stream  typekbits/s codec   Parameters
0   audio   64  mp2 0 channel(s), 22050 Hz
1   video   64  mpeg1video  160x128, q=2-31, fps=3
2   audio   64  wmav2   1 channel(s), 22050 Hz
3   video   256 msmpeg4 352x240, q=2-31, fps=15
Connection Status

Number of connections: 1 / 1000
Bandwidth in use: 0k / 1000k
#   FileIP  Proto   State   Target bits/sec Actual bits/sec Bytes 
transferred
1   stat.html   10.187.11.6 HTTP/1.1HTTP_WAIT_REQUEST   
0   0   0
Generated at Wed Feb 24 17:16:10 2016


On 24.02.2016 17:09, Jimmy Asher wrote:
> 
> 
> 
> 
> 
> On 2/24/16, 9:04 AM, "ffmpeg-user on behalf of Alex Povolotsky" 
>  wrote:
> 
>> Hello
>>
>> I'm working with pretty aged video recorer for surveillance cams, trying
>> to connect it to zoneminder instead of weird propiertary surveillance soft.
>>
>> tanidvr gets video stream, but all attempts to send it to ffserver
>> failed so far.
>>
>> === ffserver.conf ===
>> 
>> File /tmp/feed1.ffm
>> FileMaxSize 200K
>> ACL allow 127.0.0.1
>> 
>> === ffserver.conf ===
> 
> 
> If this is the complete ffserver config you do not set up the config file 
> correctly
> 
>>
>> than
>>
>>
>>
>> I'm new to video processing and maybe I'm doing lots of dumb errors, but
>> googling for error yielded nothing meaningful.
>>
>> What should I do to feed ffserver with video and what are good codec
>> params to compress the video?
> 
> Did you start FFServer before you invoked Ffmpeg?
> 
> 
>>
>> Where can I find good introduction for video processing with ffmpeg?
> 
> FFmpeg Streaming Guide (good place to start)
> https://trac.ffmpeg.org/wiki/StreamingGuide
> 
> 
>>
>> Alex
>> ___
>> ffmpeg-user mailing list
>> ffmpeg-user@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 

-- 
Александр Поволоцкий
Системный администратор
АО "Инфотел"
119021 г. Москва, ул. Льва Толстого 23 стр 3 (адрес юридический и почтовый)
115088 г. Москва, 2-ой Южнопортовый пр-д, д 20А стр.4, 2-й подъезд, 1-й
этаж (фактический адрес/ для курьерской доставки)
+7(495) 744-0918 (тел.)
+7(495) 744-0922 (факс)
www.infotel.ru
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Feeding DVR to ffserver

2016-02-24 Thread Jimmy Asher
See https://trac.ffmpeg.org/wiki/ffserver for example ffserver config files
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] Feeding DVR to ffserver

2016-02-24 Thread Alex Povolotsky
Hello

I'm working with pretty aged video recorer for surveillance cams, trying
to connect it to zoneminder instead of weird propiertary surveillance soft.

tanidvr gets video stream, but all attempts to send it to ffserver
failed so far.

=== ffserver.conf ===

File /tmp/feed1.ffm
FileMaxSize 200K
ACL allow 127.0.0.1

=== ffserver.conf ===

than

# /usr/local/bin/tanidvr -m 1 -c 1 -m 1 -t dvr1 -u admin -w admin |
ffmpeg -i - -vcodec h264 -r 1/30 -f lavfi -i aevalsrc=0 -c:a libmp3lame
http://localhost:8090/feed1.ffm
ffmpeg version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers
  built with FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final
208032) 20140512
  configuration: --prefix=/usr/local --mandir=/usr/local/man
--datadir=/usr/local/share/ffmpeg
--pkgconfigdir=/usr/local/libdata/pkgconfig --enable-shared --enable-gpl
--enable-postproc --enable-avfilter --enable-avresample
--enable-pthreads --disable-libstagefright-h264 --disable-libutvideo
--disable-libsoxr --cc=cc --extra-cflags='-msse
-I/usr/local/include/vorbis -I/usr/local/include'
--extra-ldflags='-L/usr/local/lib ' --extra-libs=-lpthread
--disable-libaacplus --disable-indev=alsa --disable-outdev=alsa
--disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libass
--disable-libbs2b --disable-libcaca --disable-libcdio --disable-libcelt
--disable-libdc1394 --disable-debug --enable-htmlpages --disable-libfaac
--disable-libfdk-aac --enable-ffserver --disable-libflite
--disable-fontconfig --disable-libfreetype --enable-frei0r
--disable-libfribidi --disable-libgme --disable-libgsm --enable-iconv
--disable-libilbc --disable-indev=jack --disable-ladspa
--disable-libmp3lame --disable-libbluray --enable-mmx
--disable-libmodplug --disable-openal --disable-indev=openal
--disable-opencl --enable-libopencv --disable-opengl
--enable-libopenh264 --disable-libopenjpeg --disable-libopus
--disable-libpulse --disable-indev=pulse --disable-outdev=pulse
--disable-libquvi --enable-runtime-cpudetect --enable-librtmp
--enable-libschroedinger --disable-ffplay --disable-outdev=sdl
--disable-libsmbclient --disable-libsnappy --disable-libspeex
--enable-sse --disable-libssh --enable-libtheora --disable-libtwolame
--disable-libv4l2 --disable-indev=v4l2 --disable-outdev=v4l2
--disable-vaapi --disable-vdpau --disable-libvidstab --enable-libvorbis
--disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libvpx
--disable-libwavpack --disable-libwebp --disable-x11grab
--enable-libx264 --disable-libx265 --disable-libxcb --enable-libxvid
--disable-outdev=xv --disable-libzmq --disable-libzvbi --disable-gnutls
--enable-openssl --enable-version3 --enable-nonfree
  libavutil  54. 31.100 / 54. 31.100
  libavcodec 56. 60.100 / 56. 60.100
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  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
  libpostproc53.  3.100 / 53.  3.100
INFO (main): Identifying type of media container in stream...
INFO (buffer): Starting DVR session controller...
DETAIL (buffer): DVR session controller started. Waiting for data from
that...
INFO (DVR streamer): DVR session controller started.
INFO (main): Media container: DHAV
Invalid UE golomb code
Last message repeated 1 times
Input #0, matroska,webm, from 'pipe:':
  Metadata:
encoder : TaniDVR 1.4.1
  Duration: 00:00:00.27, start: 0.00, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 352x288,
SAR 12:11 DAR 4:3, 24.98 fps, 24.98 tbr, 1000k tbn, 2000k tbc
Input #1, lavfi, from 'aevalsrc=0':
  Duration: N/A, start: 0.00, bitrate: 2822 kb/s
Stream #1:0: Audio: pcm_f64le, 44100 Hz, mono, dbl, 2822 kb/s
[mpeg1video @ 0x808478200] bitrate tolerance 21333 too small for bitrate
64000, overriding
[mpeg1video @ 0x808478200] too many threads/slices (9), reducing to 8
[mpeg1video @ 0x808478200] MPEG1/2 does not support 3/1 fps
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
  Metadata:
encoder : TaniDVR 1.4.1
creation_time   : 2016-02-24 17:01:01
Stream #0:0: Audio: mp2, 22050 Hz, mono, s16, 64 kb/s
Metadata:
  encoder : Lavc56.60.100 mp2
Stream #0:1: Video: mpeg1video, none, 160x128, q=2-31, 64 kb/s, SAR
16:15 DAR 4:3, 25 fps, 3 tbc
Metadata:
  encoder : Lavc56.60.100 mpeg1video
Stream #0:2: Audio: wmav2, 22050 Hz, 1 channels, fltp, 64 kb/s
Metadata:
  encoder : Lavc56.60.100 wmav2
Stream #0:3: Video: msmpeg4v3 (msmpeg4), none, 352x240, q=2-31, 256
kb/s, SAR 10:11 DAR 4:3, 24.98 fps, 15 tbc
Metadata:
  encoder : Lavc56.60.100 msmpeg4
Stream mapping:
  Stream #1:0 -> #0:0 (pcm_f64le (native) -> mp2 (native))
  Stream #0:0 -> #0:1 (h264 (native) -> mpeg1video (native))
  Stream #1:0 -> #0:2 (pcm_f64le (native) -> wmav2 (native))
  Stream #0:0 -> #0:3 (h264 (native) -> msmpeg4v3 (msmpeg4))
Error while