I'm a happy user of ZM for about a year. but have a small issue with privacy zones. in other words... it works great but....
For some reason i have to choose between either:
Having video with privacy zones in the recordings without audio (x264 encode) or
no privacy zones with audio (H264 and this was to be expected as it does not process the stream).
My current set-up does not allow working without privacy zones (government regulation. in the distance you can see public/other private areas) but i would also like to have some audio.
If i run ffmpeg manually from commandline of the device it captures audio (so it seems from the output). i found this command line here: viewtopic.php?t=28094. I have to include quotation marks in the URL or else ffmpeg will not run
Code: Select all
root@<hostname>:/home/test# ffmpeg -i "rtmp://192.168.1.121/bcs/channel0_main.bcs?channel=0&stream=0&user=XXX&password=XXX" -c:v copy -c:a aac foo.mp4
ffmpeg version 4.3.1-0york0~18.04 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version='0york0~18.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libzimg --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, flv, from 'rtmp://192.168.1.121/bcs/channel0_main.bcs?channel=0&stream=0&user=XXX&password=XXX':
Metadata:
displayWidth : 2560
displayHeight : 1920
Duration: 00:00:00.00, start: 145772.257000, bitrate: N/A
Stream #0:0: Data: none
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
Stream #0:2: Video: h264 (High), yuv420p(progressive), 2560x1920, 11 fps, 12 tbr, 1k tbn
Stream mapping:
Stream #0:2 -> #0:0 (copy)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to 'foo.mp4':
Metadata:
displayWidth : 2560
displayHeight : 1920
encoder : Lavf58.45.100
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 2560x1920, q=2-31, 11 fps, 12 tbr, 16k tbn, 1k tbc
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc58.91.100 aac
frame= 551 fps= 13 q=-1.0 size= 9728kB time=00:00:45.82 bitrate=1738.9kbits/s speed=1.08x
root@<hostname>-1:/home/test# ffmpeg -i "rtmp://192.168.1.121/bcs/channel0_main.bcs?channel=0&stream=0&user=XXX&password=XXX" -c:v copy -c:a aac foo.mp4
ffmpeg version 4.3.1-0york0~18.04 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version='0york0~18.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libzimg --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, flv, from 'rtmp://192.168.1.121/bcs/channel0_main.bcs?channel=0&stream=0&user=XXX&password=XXX':
Metadata:
displayWidth : 2560
displayHeight : 1920
Duration: 00:00:00.00, start: 145772.257000, bitrate: N/A
Stream #0:0: Data: none
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
Stream #0:2: Video: h264 (High), yuv420p(progressive), 2560x1920, 11 fps, 12 tbr, 1k tbn
Stream mapping:
Stream #0:2 -> #0:0 (copy)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to 'foo.mp4':
Metadata:
displayWidth : 2560
displayHeight : 1920
encoder : Lavf58.45.100
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 2560x1920, q=2-31, 11 fps, 12 tbr, 16k tbn, 1k tbc
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc58.91.100 aac
frame= 551 fps= 13 q=-1.0 size= 9728kB time=00:00:45.82 bitrate=1738.9kbits/s speed=1.08x
I'm using ZoneMinder, v1.34.22 in a docker container (using host as network).
I have RLC-410-5MP cameras with H.264 capability turned on
I'm using the following stream URL: rtmp://XXX.XXX.XXX.XXX/bcs/channel0_main.bcs?channel=0&stream=0&user=XXX&password=XXX (worked fine and has a nice resolution but using X264 encode results in no audio... and this is odd)
I have mounted the storage path on the device to a NAS and events show up and stay in place.
As it does record sound but the ffmpeg somehow needs the quotation marks... this might be related to my issue with zoneminder or (this is most probably) it's a mistake on my end
if i run the command without quotation marks it spits out all sorts of errors depending on what comes after the url
Code: Select all
root@hostname:/home/test# ffmpeg -i rtmp://192.168.1.121/bcs/channel0_main.bcs?channel=0&stream=0&user=XXX&password=XXX -c:v copy -c:a aac foo.mp4
[13] 27212
[14] 27213
[15] 27214
bash: -c:v: command not found
[14] Done stream=0