2016-03-03 100 views
1

我有一個beaglebone黑色,我試圖將流媒體直播到OSX電腦。如果我將它指向本地ffserver,流式客戶端藥水似乎可行。debian ffmpeg網絡攝像頭流式傳輸到遠程服務器錯誤

[email protected]:~# ffmpeg -f v4l2 -s 320x240 -r 30 -i /dev/video0 http://127.0.0.1:8090/feed1.ffm 
ffmpeg version N-78848-gf114839 Copyright (c) 2000-2016 the FFmpeg developers 
    built with gcc 4.9.2 (Debian 4.9.2-10) 
    configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags='-O3 -I/root/ffmpeg_build/include -mfpu=neon -mtune=cortex-a8' --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-libass --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree 
    libavutil  55. 19.100/55. 19.100 
    libavcodec  57. 27.101/57. 27.101 
    libavformat 57. 27.100/57. 27.100 
    libavdevice 57. 0.101/57. 0.101 
    libavfilter  6. 38.100/6. 38.100 
    libswscale  4. 0.100/4. 0.100 
    libswresample 2. 0.101/2. 0.101 
    libpostproc 54. 0.100/54. 0.100 
Input #0, video4linux2,v4l2, from '/dev/video0': 
    Duration: N/A, start: 101977.117890, bitrate: 36864 kb/s 
    Stream #0:0: Video: rawvideo (YUY2/0x32595559), yuyv422, 320x240, 36864 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc 
Output #0, ffm, to 'http://127.0.0.1:8090/feed1.ffm': 
    Metadata: 
    creation_time : 2016-03-03 05:32:52 
    encoder   : Lavf57.27.100 
    Stream #0:0: Video: mjpeg, yuv422p, 320x240, q=2-31, 100 kb/s, 30 fps, 1000k tbn, 20 tbc 
    Metadata: 
     encoder   : Lavc57.27.101 mjpeg 
    Side data: 
     cpb: bitrate max/min/avg: 200000/0/100000 buffer size: 200000 vbv_delay: -1 
Stream mapping: 
    Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native)) 
Press [q] to stop, [?] for help 

但是,如果我點它在遠程(我的電腦)ffserver的它拋出一個錯誤

[email protected]:~# ffmpeg -f v4l2 -s 320x240 -r 30 -i /dev/video0 http://192.168.200.40:8090/feed1.ffm 
ffmpeg version N-78848-gf114839 Copyright (c) 2000-2016 the FFmpeg developers 
    built with gcc 4.9.2 (Debian 4.9.2-10) 
    configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags='-O3 -I/root/ffmpeg_build/include -mfpu=neon -mtune=cortex-a8' --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-libass --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree 
    libavutil  55. 19.100/55. 19.100 
    libavcodec  57. 27.101/57. 27.101 
    libavformat 57. 27.100/57. 27.100 
    libavdevice 57. 0.101/57. 0.101 
    libavfilter  6. 38.100/6. 38.100 
    libswscale  4. 0.100/4. 0.100 
    libswresample 2. 0.101/2. 0.101 
    libpostproc 54. 0.100/54. 0.100 
Input #0, video4linux2,v4l2, from '/dev/video0': 
    Duration: N/A, start: 102012.942038, bitrate: 36864 kb/s 
    Stream #0:0: Video: rawvideo (YUY2/0x32595559), yuyv422, 320x240, 36864 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc 
[ffm @ 0x1427df0] no encoder found for codec id 141 
http://192.168.200.40:8090/feed1.ffm: Invalid argument 

它會在此AVCodecID枚舉的141nd編解碼器是AV_CODEC_ID_VP8/AV_CODEC_ID_PICTOR取決於是否AV_CODEC_ID_MPEG2VIDEO_XVMC是否定義? https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/avcodec.h

還包括我的ffserver配置。

HTTPPort 8090 
HTTPBindAddress 0.0.0.0 
MaxHTTPConnections 2000 
MaxClients 1000 
MaxBandwidth 10000   

CustomLog - 
NoDaemon      

<Feed feed1.ffm>    
    File ./feed1.ffm   
    Truncate 
    ACL allow localhost   
    ACL allow 192.168.200.0 192.168.200.255  
</Feed> 

<Stream test.mjpg> 
    Feed feed1.ffm 
    Format mpjpeg 
    NoAudio 
    VideoSize 320x240   
    VideoFrameRate 30   
    StartSendOnKey 
    VideoBitRate 400   
    VideoIntraOnly    
    Strict -1     
    PreRoll 0     
</Stream> 

<Stream status.html>      
    Format status 
    ACL allow localhost 
    ACL allow 192.168.0.0 192.168.255.255 
</Stream> 

反正我不知道如何解決這個問題。任何指針將不勝感激。

回答

1

你是否試圖檢查問題是否是服務器端?你有沒有在http://192.168.200.40:8090中使用ping?服務器響應?我說這是因爲它可能是由防火牆問題引起的,例如。

+0

謝謝,但沒有骰子。這都是沒有防火牆的本地。我用gstreamer取得了更多的成功。 – James

相關問題