streaming a webcam feed over rtsp using ffmpeg & ffserver to an android client

淺唱寂寞╮ 提交于 2019-12-08 04:16:00

问题


I am trying to stream my webcam over rtsp and open the stream using android. I managed to get the first part working (rtsp stream) using ffserver and ffmpgeg. Here is my ffserver.conf file :

HTTPPort 8000
RTSPPort 8001
HTTPBindAddress 192.168.1.74
RTSPBindAddress 192.168.1.74
MaxClients 100
MaxBandwidth 10000
NoDefaults

<Feed witty.ffm>
   File /tmp/witty.ffm
   FileMaxSize 20M
</Feed>

<Stream witty.mov>
   Feed witty.ffm
   Format rtp
   VideoSize 640x480
   VideoQMin 1
   VideoQMax 20
   VideoFrameRate 30
   VideoBitRate 500
   AVOptionVideo flags +global_header
   VideoCodec libx264
   AVPresetVideo baseline
   NoAudio
</Stream>

ffserver :

ffserver -f -d ffserver.conf // luch the server

and then I use FFmpeg to open the webcam (Mac OS)

ffmpeg -f avfoundation -i "default" http://192.168.1.74:8000/witty.ffm

I can open the stream from VLC but on android using a videoView i am getting an error (1,-38) and an alert view saying "can't play this video".


回答1:


<Stream witty.mov>

.mov (QuickTime) is not among the Android supported video formats.

Use a supported format like 3GP etc.

You can find the full list of supported formats here.



来源:https://stackoverflow.com/questions/29218581/streaming-a-webcam-feed-over-rtsp-using-ffmpeg-ffserver-to-an-android-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!