Hey Guys,
I've been trying to work around a solution for a few weeks now and I'm still pulling my hair trying to get this accomplished.
I have a few of the older Axis 211,212 & 221 IP Cameras that I would like to use on a Dahua NVR. The dahua NVR will support H.264 & MJPEG formats using rtsp. The cameras that I listed are older and do not have ONVIF support and only output MJPEG on http which the dahua will not support (invalid url using http).
I've looked at transcoding and I've installed ffserver & ffmpeg in order to get this to work but no success thus far. I wanted to know if anyone has had any success or trying something like this or maybe I have a format incorrect.
My ffserver & ffmpeg configs are very basic :
# ffserver.conf
HTTPPort 1234
RTSPPort 1235
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 2M
ACL allow 127.0.0.1
</Feed>
<Stream camera1.sdp>
Feed feed1.ffm
Format rtp
VideoCodec mjpeg
NoAudio
</Stream>
# ffmpeg command to read from camera/convert and write to ffserver
ffmpeg -i rtsp://camera1:port/stream -an -r 5 -c:v mjpeg -b:v 64k http://localhost:1234/feed1.ffm
I can verify that this works by opening VLC and I can pull the stream over rtsp but no luck from the NVR. I don't see any errors and actually it looks like the NVR does not even try to connect.
I guess just simply has there been any real life instances of transcoding or do I need to setup something a little bit more complicated in for this to work ?
I also tried using VLC to transcode but I could not get that to work :
vlc -I http --stop-time 3600 --loop --clock-jitter=1000 --cr-average=1000 --clock-synchro=0 --sout-mux-caching=1000 --network-caching=1000 --live-caching=1000 --sout-rtp-caching=1000 --sout-rtp-proto=udp --postproc-q=6 "http://root:root@192.168.1.165/mjpg/video/mjpg" --sout-keep --sout='#transcode{vcodec=h264,vb=1440,venc=x264{aud,profile=baseline,level=21,keyint=2,bframes=1,threads=1,ref=3},acodec=mp4a,ab=32,channels=1}:gather:rtp{sdp=rtsp://:5554/stream}'
It really sucks because if I use the NVR's customized camera setting the NVR does connect to the camera and I can see the bitrate going back and forth but I can't see the video because its mpeg4 and the NVR won't transcode . I have a direct line to Dahua and they said they would not change the firmware to allow mpeg4 streams.