0

我正在尝试使用avserver包重新流式传输我的 IP 摄像机的流,以便能够记录此流并远程访问它,而不必从摄像机流式传输两次,以避免无线网络过载。

按照链接https://libav.org/avserver.html,我想出了以下命令:

avserver -f /etc/avserver.conf & avconv -i http://user:password@192.168.1.121/videostream.asf http://localhost:80/feed1.ffm

这给了我以下输出

avserver version 0.8.3-6:0.8.3-6ubuntu2, Copyright (c) 2000-2012 the Libav developers
built on Oct  1 2012 15:03:26 with gcc 4.7.2
avconv version 0.8.3-6:0.8.3-6ubuntu2, Copyright (c) 2000-2012 the Libav developers
built on Oct  1 2012 15:03:26 with gcc 4.7.2
Mon Jan 13 20:13:44 2014 AVserver started.
[asf @ 0x153cac0] max_analyze_duration reached
[asf @ 0x153cac0] Estimating duration from bitrate, this may be inaccurate
Input #0, asf, from 'http://admin:gafit@192.168.1.121/videostream.asf':
Duration: N/A, start: 0.000000, bitrate: 32 kb/s
Stream #0.0: Video: mjpeg, yuvj422p, 320x240, 100 tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: adpcm_ima_wav, 8000 Hz, 1 channels, s16, 32 kb/s
Incompatible pixel format 'yuvj422p' for codec 'mpeg1video', auto-selecting format 'yuv420p'
[buffer @ 0x153ec80] w:320 h:240 pixfmt:yuvj422p
[avsink @ 0x1544820] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x1543460] w:320 h:240 fmt:yuvj422p -> w:320 h:240 fmt:yuv420p flags:0x4
[mp2 @ 0x1544aa0] Requested sampling rate unsupported using closest supported (16000)
Mon Jan 13 20:13:50 2014 Feed '/tmp/feed1.ffm.ffm' stream number does not match registered feed
Output #0, ffm, to 'http://localhost:80/feed1.ffm':
Metadata:
encoder         : Lavf53.21.0
Stream #0.0: Video: mpeg1video, yuv420p, 320x240 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 1000k tbn, 60 tbc
Stream #0.1: Audio: mp2, 16000 Hz, 1 channels, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg -> mpeg1video)
Stream #0:1 -> #0:1 (adpcm_ima_wav -> mp2)
Press ctrl-c to stop encoding
Mon Jan 13 20:13:50 2014 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 4096

当我尝试通过VLC 媒体播放器打开此流时,使用

http://192.168.1.15/test.asf

我得到以下附加输出

Mon Jan 13 20:17:39 2014 192.168.1.6 - - [GET] "/test.asf HTTP/1.1" 200 115s dup=12210 drop=0
Mon Jan 13 20:17:39 2014 Codec for stream 0 does not use global headers but container format requires global headers
Mon Jan 13 20:17:39 2014 Codec for stream 1 does not use global headers but container format requires global headers

我在 VLC 媒体播放器上一无所获。我不太确定发生了什么或如何解决它,因此非常欢迎对此提供任何启发。

4

1 回答 1

0

请尝试使用其他格式,例如 mp3

只是

须藤 vim /etc/avserver.conf

#<stream test.asf>
#</Stream>

取消注释 mp3 部分并尝试使用它。

<stream test.mp3></Stream>

如果您正在使用仅是音频的流,这将起作用。

对于视频

只需使用未注释的部分

<Stream test1.mgp><Stream>
于 2017-02-14T10:08:05.780 回答