Answer the question
In order to leave comments, you need to log in
How to stream video from a camera (rtsp/mjpeg) to a website (mms/wmv1)?
Hello colleagues.
There is a D-Link DCS-2230 camera, which gives an rtsp stream with sound. You need to stream it to a site that is on Bitrix with the Windows Media Player plugin.
avprobe says the stream formats are:
Stream #0.0: Video: mjpeg, 1k tbr, 90k tbn, 90k tbc
Stream #0.1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
Port 8080
BindAddress 0.0.0.0
MaxClients 200
MaxBandwidth 20000
CustomLog /var/log/avserver.log
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 3M
ACL allow 127.0.0.1
ACL allow 10.1.129.18
ACL allow 10.1.1.131
</Feed>
<Stream test1.mpg>
Feed feed1.ffm
Format mpeg
AudioBitRate 128
AudioChannels 1
AudioSampleRate 16000
VideoSize hd720
VideoQMin 1
VideoQMax 5
Preroll 2
</Stream>
# avserver && avconv -f rtsp -i rtsp://10.1.1.36:554/live1.sdp \
-acodec copy -vcodec copy http://10.1.1.131:8080/feed1.ffm
Input #0, rtsp, from 'rtsp://10.1.1.36:554/live1.sdp':
Metadata:
title : RTSP/RTP stream 1 from cab253
comment : live1.sdp with v2.0
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, 15k tbr, 90k tbn, 90k tbc
Stream #0.1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
Output #0, ffm, to 'http://10.1.1.131:8080/feed1.ffm':
Metadata:
title : RTSP/RTP stream 1 from cab253
comment : live1.sdp with v2.0
encoder : Lavf53.21.1
Stream #0.0: Audio: pcm_mulaw, 8000 Hz, 1 channels, 64 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Press ctrl-c to stop encoding
^Csize= 240kB time=29.31 bitrate= 67.1kbits/s
video:0kB audio:229kB global headers:0kB muxing overhead 4.803493%
[mjpeg @ 0x1061be0] Found EOI before any SOF, ignoring
[mjpeg @ 0x1061be0] No JPEG data found in image
[mjpeg @ 0x1061be0] mjpeg: unsupported coding type (ca)
[mjpeg @ 0x1061be0] [IMGUTILS @ 0x7fff17eef1b0] Picture size 46022x42308 is invalid
Stream #0.0: Video: mpeg4 (Simple Profile), yuv420p, 480x270 [PAR 1:1 DAR 16:9], 1k tbr, 90k tbn, 30k tbc
Stream #0.1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
Answer the question
In order to leave comments, you need to log in
@victor1234 the camera doesn't look outside and I can't do it, unfortunately (for a number of reasons beyond my control). Yes, there is (in the camera it is indicated as Mode) JPEG, MPEG4, H.264. C JPEG avplay does not output anything. With MPEG4 and H.264 the picture is blurry.
MPEG4
H.264
At the same time, VLC gives a normal picture.
Through avserver + avconv the result does not change - the output is empty.
Streaming with MPEG4 and H.264:
MPEG4
H.264
video:7636kB audio:1612kB global headers:0kB muxing overhead 1.987552%
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question