問題描述
使用“avserver”將輸入流式傳輸到流式輸出 (Stream input to stream output using 'avserver')
/p>
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 媒體播放器上什麼也得不到。我不太確定發生了什麼或如何解決它,因此非常歡迎對此有任何啟發。
參考解法
方法 1:
please try using another format like mp3
just
sudo vim /etc/avserver.conf
comment out the section with
#<stream test.asf>
#</Stream>
uncomment the mp3 section and try using that.
<stream test.mp3></Stream>
this would work if you are working with a stream that is only audio only.
for a video
just use the uncommented section for
<Stream test1.mgp><Stream>
(by Gustavo Sgarbi Campos、tiras muturi)